emit same Event object with custom data inside

emitEvent now wraps the data object passed in to it inside an Event
object withthe event metadata on it.