Refactor userstats