Yet more work on the pathfnding