Added generics so that nodes/trees can be of any type that implements IComparable.