Initial pass at the Document Protocol.
Massive indexes rewrite.