Removal of inserted residues for unified processing