Refactor how to do grunt directly