refactoring grunt tasks to avoid redundancy