private <N> void doExpansion (List<N> leafNodes, int id,
				  NodeGetter<N> plex) {
	List<NodeGetter<N>> toExpand = new ArrayList<NodeGetter<N>> ();
	toExpand.add (plex);

	while (!toExpand.isEmpty ()) {
	    NodeGetter<N> ng = toExpand.remove (0);
	    while (ng.hasMoreNodes ()) {
		leafNodes.add (ng.getNextNode (branchFactor));
	    }
	    if (ng.hasMoreData ()) {
		int lowId = id++;
		int highId = id++;
		toExpand.addAll (ng.split (lowId, highId));
	    }
	}
    }