Start pathfinding refactoring