fix broken links and markup