Move types and functions to being local to Pathfinder.cpp