captured closing operation of frame. Not doing anything useful with it yet.
made new window creation and closing cleaner. Application stops down when all windows are closed.