Updated item serialization code