Use external js file for datapoints, tidy up index.html