Filtering functionality: Refactoring.