Separate out marshalling work

Test Plan: -

Reviewers: marcua

Reviewed By: marcua

Differential Revision: https://phabricator.locu.com/D7223