Add save/restore methods for testing and serialization/deserialization