Removed some duplication in the User model