Added a bunch of badly written javascript.