Added support for custom fields for events.