new toc code
great speed-up in TOC related code
Merge pull request #207 from clovis/master

Speed-up TOC code