Make map data private and use encapsulating functions everywhere