add option to generate TOC for html (for now)
remove onload, just run the code at the end of the HTML