Thanks for the reply and the link to the grounding fix. I spent most of today working on the engine bay ground wiring connections. Also removed the ECU (Subaru PCM) to make sure that it was well grounded. It seemed to improve or fix the hesitation problems but I think I have another problem related to the AT fluid level because it started to play up when the engine/AT was hot. Also found and fixed a small cooling system leak. The knock sensor is a single wire connection so the signal to the ECU is dependant on the engine earth bonding.
I'll check the AT fluid level tomorrow. Also need to check the battery voltage because I saw a reading of 9V on the monitor.
btw, there's no MAF on this model + no inlet manifold leaks, I've checked for that. Exhaust not sure. My monitoring cable/software does not support logging/charting.