symptoms you describe are of a fuel system that is compensating to the rich side in response to a perceived lean condition. Obviously, since you know it is in closed loop, you have access to a scan tool that can read live data; cool! This makes diagnosis a little easier.
It probably runs better at idle in park because most feedback systems go open loop in park at idle, and there also is no load on the engine at this time.
When it is in closed loop, take a look at the fuel trims: Block learn is long term fuel correction, and Integrator counts repreesent short term fuel corrections. The midpoint that they should be around is 128 for both values; lower #s indicate subtracting fuel, and higher #s indicate adding fuel. From your description of the symptoms I am suspecting youa re going to see closed loop fuel corrections going high (adding fuel in response to a perceived lean condition).
If this is so, the next values to look at would be O2 voltage, O2 crosscounts, and MAP. O2 should be varying fairly regularly above and below .45 volt in closed loop. Crosscounts are how many times per second the O2 crosses this median value. If the O2 is reading to teh lean side (below .45v) or the crosscounts are hanging around zero, yet the car seems to be running rich (black exhaust/ rich smell), then teh O2 sensor is probably worn out and needs to be replaced. This is a tune up part anyway;l if it is old, install a new one before going any further, so that you know youa re getting a good O2 signal.
If MAP is low, measure engine vacuum and compare it to MAP reading (you may need a conversion chart to correlaate MAP voltage to vacuum measurement); if it does not agree, look for leaks in the MAP vacuum hose or replace the sensor. If engine vacuum is low, you need to find out why and correct the problem... This could be a result of a learge vacuum leak, clogged exhaust/ failed CAT, EGR valve sticking open, or an internal mechanical fault such as a leaking engine valve. Low engine vacuum tells the computer that the engine is under load and the programming calls for a rich fuel mixture under high load conditions such as acceleration.
I hope this is helpful to you; if so, clicking my accept button would be most appreciated! Thanks!