Refactor FilteredCursor to split out factory