fixed the bad practices in the javascript
Merge pull request #8 from kristiankyvik/fix_polluted_javascript

fixed the bad practices in the javascript