Pathfinding class with basic pathfinding functions