Finished the map implementation