Refactoring code
xcuserstate