more work removing functions from templates
fix get_table_of_contents script, and generate new object for API
Merge pull request #261 from clovis/master

More work removing functions from templates, API changes