make geolocate more like a library that can be used elsewhere.