Updated the way javascript is handled. Also, updated the way footnotes are displayed.