Moved scripts out of html file