Refactor user model