Fixed geolocation; tidied up