Split some of the functionality in StatsActivity into StatsActivity/StatsView