Move saveSettings() to settings.js