Refactor user class