Factoring out the userPreferences in own object to allow reuse