Moves weather function to main class