Refactors TOC code
Merge pull request #79 from lukecampbell/naming

Refactors TOC code