Refactors user model