clean up and remap