Refactoring, and adding code to allow display of stat overview