Grunt task refactoring