Changed sort_hand to use OrderedDict.