Fixes from contributed document

First set of fixes for weirdnesses in document contributed in the list. More, relating to excess spans in headers, to follow in a different commit. Tests will be added when I get permission to cut and paste from his document.