static SVNode createSVTree(ArrayList<Img<Color>> allEls, ArrayList<Img<Color>> testEls, int maxD, int minImprovement,
			Color currentTag)
	{
		if (maxD == 0) { return null; }
		SVNode node = new SVNode();
		node.sv = findBestSV(allEls, testEls);
		if (node.sv == null) {
			return null;
		}
		ArrayList<Img<Color>> aList = new ArrayList<Img<Color>>();
		ArrayList<Img<Color>> bList = new ArrayList<Img<Color>>();
		int aError = 0;
		int bError = 0;
		for (Img<Color> e : testEls) {
			if (node.sv.classify(e).equals(node.sv.aTag)) {
				if (!e.tag.equals(node.sv.aTag)) {
					aError++;
				}
				aList.add(e);
			} else {
				if (!e.tag.equals(node.sv.bTag)) {
					bError++;
				}
				bList.add(e);
			}
		}
		
		if (aError > minImprovement) {
			node.aBranch = createSVTree(allEls, aList, maxD - 1, minImprovement, node.sv.aTag);
		}
		if (bError > minImprovement) {
			node.bBranch = createSVTree(allEls, bList, maxD - 1, minImprovement, node.sv.bTag);
		}
		return node;
	}