Cleaned up statistics creation

cleaned up the bullshit code