This is more of a rant than anything else, but I'm more than open to suggestions. Well, I have to do this(phase 2), and I'm pretty much finished, it's just calculating the imbalances (right, left, size) is giving me some problems (they don't seem to add up). Phase 3 is going to be really fun if I don't get this finished. At least phase 1 was really easy (I already had a bst class, I just had to make it use templates).