Refactor User class to reduce complexity