Separated javascript from the html file