code highlight and fix up some bad refs