Various optimizations, non-trivial Pathing implemented