Clean up ordered filtering.