Added serialization for the Event class