Refactored code, added grunt with jshint.