Improve pathfinder