At the moment, the distanceToNode method just returns 1000, instead of calculating the actual shortest path distance.