Added sorting of TOC