Did some more work on stats.cpp