Flesh out more table of contents generation logic

Trying to make the tool easy to use while still allowing for a wide
range of customization, for example generating your own table of
contents vs having one autogenerated by the Phindle tool and
TableOfContents class.