Fix #33 and added a grunt build file

I put most of the code inside the create function in order to create private scoping for instances. This way, it had a minimal impact on the code.

I also added a simple grunt build file. In order to run it, install node.js 0.8, do `npm install` and then `grunt`.