Refactored to use bulk handling for filters.