refactored a few things and unrefactored options. :)

* rev comments a bit
* renamed a few variables
* added option for template id
* moved code that init's the toc to the index page
* This one includes the changes to the index.html