you say it runs good with tps unplugged, this means its in limp mode. purely running off the afm, sounds like there is a conflict between the tps and afm, I would check wiring from tps, also check for crack in intake tube from afm to TB.i would recheck valve lash, may have a tight intake valve, double check timing