Refactored code, added grunt with jshint.

I made your code way better :p