Remove unnecessary uses of main.grep