Clean up undefined map and commented old code