Moved minize and close to class. Now calls #exit() instead of System.exit()