Updated type serialization