Started pathfinding code