Residue treatment