Altered HTML and JS to allow thresholds to be changed.