Added more code to Pathfinder