Renamed DistPair to NodeDist, and added tests