Moving the wire protocol more into the wire, or something (refactoring for greater clarity and separation of concerns)