Dijkstra: implement supposedly an algorithm shortcut for determining shortest path, but commented out for now. Uncomment to test it.