the Grand Finale
reset()

A function to ensure everything is as it was at the start

function reset() {
  stop(); cs(); home(); bg(); pc(); pw();
}
additions to globals.js
var g_running=false;
var g_delay=1000;
var g_timer;