More statistics code moving