separated the firebase code from the map and ui drawing code