Refactor and fix content_filter require_all logic, add some unit tests.