Refactor fetch weather and get preferred location