Tightening up types representing a document.