Moved a lot of logic out of StatsController and into StatsControllerHelp...

...er. And some cleanup...