fix up ref hrefs, numbering