Moved all of the map management functions into the KhanMap object. Added comments.