Refactor incoming command handlers to support protobufs.