Implemented Snapshot serialization.