Starting to refactor setFilter.