In addition to fixing the typos etc. found by Daniel, I've added a bunch of index entries and cross-references and some clarifying paragraphs about scoping.