Finished pathfinder implementation.