Code cleanup. Settings are now saved.