Added filtering logic to summaries, with tests.