Renamed nodes variable to path in opt2 function
Cache distances in Graph class, points 8.8 -> 12.1