Further improved pathfinding