Optimized the pathfinding(for the last time?(probably not...))
Merged.