Major refactoring of report.py, no functionality changes, this time for real, hopefully