Improve cross-references and tidy up formatting.