Added support for events.