Remove event handlers when destroying classes