Added a preferences wrapper