Restructured code
Updated frmSettings