Simplify the serialization format

Simplifes the serialization format by getting not pickling the payload separately.