Moved the js code into the html file.