[UserSettings] refactor, add tests