Implemented pathfinding. Also warn if ticks are slow.