Made it possible to unregister event listeners