Added save settings function
Added persistent configuration