Changed serialization/deserialization of events using I/O Streams
Added contract test for testing serialization of async events