Switched to using encoding/gob for serializing invocations