Separated the Javascript from the HTML