Refactored LocationHandler.
Improved algorithm of when to update location.