Added managed serialization code for deserializing data