JS-Code cleanup 

This makes exactly the same.
Merge pull request #12 from CodeInsider/patch-4

JS-Code cleanup