Adding close event
Merge pull request #50 from jonathanmiles/close-event

Adding close event