Added support for creating and editing events.