Refactor grep call to remove .each

Grep already yields the matching keys to the given block.