Added ability to specify the type of an event