Refactoring geolocation code to use watchPosition() for tracking mode.