Started implementing a path shortening algorithm.