Added entity pointer serialization/deserialization