Beginning of RB tree implementation.