added JS to the demo page
fixes to the JS compilation script