Fixing deprecated code
Slightly improving code quality in PathFindingCore