minor refactoring to make the map object available to the client, in order to add markers later