Fix up demos
Simplify JS machinery