TPS is a easy and free first thing to do, but I am thinking that maybe when the downpipe was changed, possibly the lambda sensor, or wiring may have been damaged. This would explain why the engine is misbehaving since you replaced the downpipe. It would be where I would be looking first. second would be the Idle air control valve.
I did have a similar fault on my car, but it disappeared after a day and has not come back, although I have serviced the engine and replaced the plugs since.
I also picked up a spare IACV from our sponsor the other day, just in case as they can act up when dirty.
Get a plug in diagnosis, it may help to narrow it down a bit!