Sorted dict 1

Pull request for SortedDict and BalancedTree23 taking into account Kevin Squire's feedback from the past 12 days.
From a superficial glance that seems reasonable, but I'll have to take a more careful look at this whole change.