Refactor filters to use channels instead of functions