More idiomatic js
Merge pull request #1 from Ryckes/master

More idiomatic js