Adding support for addListener/removeListener events.