* the reports mainly followed the same structure but with
different classes, so I took the code and a class as its
parameter
* the method on which reports.data is generated may change
but mostly is count_per_day so made that optional
* grouped the refactored methods to the top, some unrefactored
methods remain but those are a bit harder to refactor, and not
as reusable so I'd like to get this through first
* Overall I believe this patch enhances maintainability :-)