Better parser and builder for wire protocol.