using grunt for testing and running jshint. refactorings based on jshint