Cleaned up implementation of MapsGraph by abstracting out some work to be done in MapsEngine.