Shorten the filtering scope code

It also no longer depends on a method with no documentation.