Refactor out all prefs / settings into a separate class