works and add demo index.html
misc fixes