Refactor grunt task file