More path finding implementation.