Merge pull request #15 from varya/master

Linting JavaScript code with JSCS
Fix linting errors
Remove dead code
Allow vars in loops