Refactor forecastfragment class