Updated serialization API