#312 toc fix, plus JS log cleanup