Cleanup of event handlers.