enclose the html demo code, to not trample global vars
optimize build commands, updated build