Add possibility of unregistering in events mechanism.