Added ways to compute shortest path.