small cleanup of toc js stuff