Refactoring for Grunt, Coffeescript and testing