First stab at segmented TOCtrees.

Makes sidebar TOC a little funny tho.