onSettingsEdited for saving state - not working, but not a bad try