fixing some geolocation bugs and adding in a working main method with threads