Statistics refactoring.