More changes, more tweaking, attempted to add friendly tank detection, but hasn't been tested yet.