Used JSCS and fixed violations
Merge pull request #386 from mrjoelkemp/jscs

Used JSCS and fixed violations