Adding filter() and associated tests.