Improved how Map is created and destroyed.