Refractor all those stuffy settings functions into its own class, SettingsHook.