Separated the js from the html