Split logic into weather.js