Added a function to clean up the 'by_month' data