Cleaning up markup for TOC