cleaned up application.js, implementing more accurate geolocation