More exception handling for geolocation and PEP8 cleaning