Refactor geolocation code. Use watchPosition instead of getCurrentPosition.