Fix memory leak when resetting config
Eliminate warnings
Reset pac path when update settings
Fix global string free issue
Fix string saving in main