Added saving of settings.
Added saving of settings.