Added preferences reader/writer for persistant preferences.