cosmetic changes, plus js for external links (inc tests)