got rid of a lot of global code for stat handling that wasn't used anymore