Clean up and refactored the map package