Patch for pickle

Maybe we should add this part for now, as it's at least a start towards full pickling.