Refactored and simplified SettingsController