Change NodeList and WeightTable to PathGraph