General improvements to title and section handling