Refactored locations of Grant command code.