remove trailing whitespace and tabs
DO NOT MERGE: Work in progress, refactoring how statistics are calculated
Undo whitespace changes