Updating the de/serialization code for the training pet.