monthly_averages plot fix and view code cleanup