Serialization improvements