Finished getting the preferences working.