Move all the map stuff into a map class