added mobile optimizations, refactored geolocation