Added more pathfinding code.