Refactoring user model