Adding better JS for the menu and TOC