changes the location and weather getting code to make it more javascripty. also moves parts of it to another file