Datastructures cleanup

This boosts coverage of OrderedDict to 100% (and found a couple of bugs along the way!), gets rid of some unused methods that aren't in collections.OrderedDict, and cleans up the code a little bit.