code cleanup in User class.