Cleaned up Immutable Red Black tree algorithm