 # Check if the map can be used	
 mapReady = ->
 	return L? and map?
-#Commented out because causes a lot of spam needs to be fixed!
-###		
+
+# Render the location of the user on the map (currently broken)
 renderLocation = -> 
 	if Geoloc.isSubscribed()
-		Obs.observe -> # Creates new observe scope, because state changes a lot this spams the console a bit
-			state = Geoloc.track()
+		state = Geoloc.track()
+		Obs.observe ->
 			location = state.get('latlong');
 			if location?
+				log 'Rendered location on the map'
 				location = location.split(',')
 				if mapReady()
 					marker = L.marker(L.latLng(location[0], location[1]))

			toRemove = document.getElementById('OpenStreetMap');
			toRemove.parentNode.removeChild(toRemove);
	setupMap()
	#renderLocation();
	
loadOpenStreetMap = ->
	log "loadOpenStreetMap()"

					marker.addTo(map)
					window.flagCurrentLocation = marker
			else
				log 'Location could not be found'
			Obs.onClean ->
				if mapReady() and flagCurrentLocation?
					map.removeLayer flagCurrentLocation
					window.flagCurrentLocation = null

