bug fixes and add missing JS file
Merge pull request #160 from clovis/master

bug fixes and add missing JS file