Separated javascript from main html file