Changed so index queries and all-node queries use Iterator instead of Iterable