Ok, with all due respect to the request of HybridZ admins, i wont post the pic here, but will provide the link.
http://socalz.org/afm%20copy.jpg
Now, the red arrow is where you adjust the tension on the spring. The tighter the spring is, it will provide the engine with less fuel/air. When this happens, the engine will starve itself if the AFM spring is too tight. The more slack in the spring, more fuel/air would be given to the engine under rpms. If it is too loose, the slightest rpms could make the engine run very rich, or even bog down from being too rich. The spring has to be set in a precise spot in order for the engine to run as it is supposed to.
Now, the yellow arrow points to where you can adjust the amount of fuel given to the air, which in turn creates the correct air/fuel mixture. If you will notice, you can see the arm that swipes along the computer board down at the bottom. That is where the reading for fuel is sent to the ecu.
This is how you adjust these two in unison. First, set the spring to where it should be by running the engine at normal operating temps. You will either 1)have rough idle, or 2) have a good idle. Now, if you have a rough idle, give or take on the spring a little. Try tightening it, or loosening it, whatever way works to smoothen the engine out. Now once you get it idling smooth, you move on to higher rpm settings.
Rev the engine to about 4k. Yes it will be loud You will tell if the fuel mixture arm needs to be adjusted if it its missing and popping. While you have it at 4k, and it is not running correct, adjust the arm that the yellow arrow points to.
Hopefully, if your AFM is good, this will make the engine run smooth and have power throughout the rpm range. But i must insist that you check your temperature sensors first and check for vacumm leaks. The most common leaks are at the AFM to Throttle Body rubber boot. You can also find more on the hoses on top of the Intake manifold.
Your intake/exhaust manifold may also be bad.
Good luck Chris.