Fix a large number of JSLint errors
Merge pull request #6 from panuhorsmalahti/master

Fix a large number of JSLint errors