divided frmMain into partial classes