Added saving of settings