Clean up stats module a bit