Factored stats stuff out of server