demo/demo.js: strip trailing blanks
incorporate changes to be as supro app module