Began the work of cleaning Preferences. changedm make_csv def. Added new sortby func. Updated types