update style
improve js code
improve readability
Merge branch 'master' into gh-pages