Renamed myFrame to mainFrame
Added default close action