Major improvements to the JavaScripts.
typo