apparently handler on request for close...

...still doesn't catch just closing the window though
first stab at application flow