Moved the settings system from using sharedPreferences to SQLite.