A few small refactorings while re-familiarising myself ... need to change the approach so that statistics are gathered at a level above the current state, so that state-changes don't reset the statistics and cause toggling