Changed the map class so that it handles all instantiation and problem propagation behind the scenes.