refactor toc to not rerender every time you click on stuff