data: refactoring for IncomingMessage, OutgoingMessage