Working on event serialization for API