Cleanup: introduce a Stats class to aggregate the useful output from