Merge pull request #36 from korczis/master

Basic tests
More r.js friendly
Merge pull request #38 from korczis/r.js

R.js
Merge remote-tracking branch 'upstream/master' into r.js