Add support for serializing and deserializing code.