update style & some refactoring for demo/test_2.html
some refactoring to demo/js/index.js