Clean up operation stats code