#312 toc fix, plus JS log cleanup - bug fix