Separate filtering from handling.