tweaked performance in a bunch of places. Units only Astar every 10th frame or so