Added track line, separated javascript out of html page