Refactored user into class