Added JS Geolocation API

Cleanup unnecessary code