Added helper methods to PathfinderCommon for code reusability