Re: tps
the throttle position sensor is just a variable resistor, when you push the accelerator pedal the TPS will change its resistance (moving along a carbon film track changes resistance as throttle position changes) which will adjust the voltage signal that returns to the ecu from the TPS. the ecu uses this information when determining fueling and ignition.
i've never come across a flat spot that was caused by a TPS fault, however fitting a scrapyard throttle body is the easiest and cheapest way to test your theory.