When running with the sensor plugged in, tap on it moderately hard to see if it has an effect on the idle. That's what we used to do many years ago. Have you watched the MAF reading at warm idle? Usually in the middle single digits, like 4-6gr/sec and relatively steady. I know you mentioned a new TPS. What is the idle voltage? I saw mention of the EGR clicking too. The EGR should not be active at idle, no clicking to be heard.