I ran back through and re-read your thread. This might help you based on your descriptions:
You said "Under full throttle there are no issues, it’s all at idle. When I let off the motor drops to less then 700 rpms if not completely dies. Idle when cold is anything but. Also it pulsates idling, the check engine light comes on when idling. Driving around it goes away. "
That indicates your TPS is sticking or mis-oriented or possibly an ISC problem.
JJ did a great job of covering your fuel pressure issue, and that should have taken care of your smoking problem.
You said, "it threw a Code 51" - "I figured it was the TPS, so I replaced it with another one"
As JJ said, that is a real time code and can indicate an open IDL circuit, again indicating a TPS problem. You said you changed it, so mis-orientation is very likely a problem. Code 51 also indicates an AC signal. Just turn off your AC when checking codes.
You said, "well the car was working. i mean i did some full speed runs and then nothing." - "And nothing still the same
It wont rev over 2000 rpm, If I put the pedal all the way done it wont go over 1000rpms"
That is a likely indicator that no AFM frequency is getting to the ECU. And is a totally different problem than what you described in the first place. Tyically, the AFM goes bad because someone tried to clean it, or the elec. connector is corroded. When an engine starts having trouble, th first thing most people do is grab a can of carb spray and start cleaning things. What most people don't know is carb spray immediately kills the AFM electronics.
You said "if i were to guess on the problem right now it would be the mass air flow sensor. but the car idles fine (when hot) "
It will idle fine with no AFM signal as long at the IDL switch within the TPS is closed (TPS is oriented correctly) and the rest of the motor is reasonably solid. When the IDL switch is closed, the ECU will be running a preset IDL map and ignore the O2 input and various other sensors.
Jetjock said, "you should be able to drive around all day long with the AFM disconnected".
That's not correct. The AFM is telling the ECU the air flow into the engine. If the TPS output compared to the karmon frequency rises above the threshold in the ECU, the engine goes into limp mode and falls on it's face. It won't rev above about 1,600RPM. If the IDL switch is not closed, the ECU is trying to use the frequency and O2 sensor to adjust idle and can't due to sensor inaccuracies caused by low temps (O2) and too little flow (mirror can't make a reliable frequency), which is why the engine hunts or pulsates.
For the won't rev >2,000RPM - I would swap the AFM for a known good AFM at this point and see what happens. If the new AFM doesn't fix the problem on your car, see if your AFM works on the other car. If it does work on the other car, you have a wiring problem related to AFM.
For the won't idle, pulsates - Check your TPS and ISC.
Between those three things, you will likely solve your problems. Hope that helps.
-Rich