Remove dependency on ordereddict