Simplified and cleaned up preferences-related code.
96 files changed