Oxidation of impurities