add clean up logic to remove events handlers when an object is destroyed