Cleaning before device manufacture