Add headings and correct internal links