Cleaned up remap.py. Removed old functions.