Separated the javascript from the HTML of test.html