Moved pathfinding to dedicated class