Merge pull request #1 from szymonkaliski/master

rewritten from coffee
Moved var declarations where they are used