Registration cleaning code