JS

Adds all the JS to get everything working.