Ok, this sounds like you may have a bad MAF. Try unplugging the MAF and starting it. It may take a bit of throttle to keep running but should smooth out and run on its own eventually. Also, check ALL your vac. lines as the up down up down idle sounds like a vac leak. Also, if you get it to run smoothly w/o the MAF plugged in then don't go out an beat on it and get into boost as you will destroy something and will most likely be swapping motors again. Just be gentle on it.
Since you have an 04, did you completely clean the entire TB while it was loose? They like to get carboned up and screw with all sorts of things like this.
If you have a throttle position sensor issue then check that its connected tightly. After a motor swap its easy to miss a connector or 2.