Unsubscribe to events on shutdown. Closes gh-17