Refined pathfinding