Moved general use functions to PathfinderCommon