Updated File>Close menu item, now works

Updated the close menu item to actually close the form. Additional refactoring.