Bug fixes

This fixes #7 and #1.

I've also added jshint as a dependency, and it's is now called before the build process on Makefile