Refactor Plate marshaling