Fix omissions in conditioning init of globals, remove some unneeded logic, update html