Refactor grunt task