statistics API cleanup