03 Mazdaspeed Protégé Sputtery at 3-3.5k no matter the gear

I’ve recently started having an issue on my 2003 Mazdaspeed Protégé when I accelerate in any gear at about 3 or 3.5k it feels as if somone is continually stomping on the accelerator and than backing off and the car gets very sputtery. I’ve gotten the check engine light checked and Autozone suggested a mass airflow sensor.

I’ve replaced the coilpacks and spark plugs with in the past 2/3 months.

The only way to get the car to Rev past that point is to ease into it very gently, and even then it gets very sputtery.

Edit
Error code: P0170 ‘System too lein’ (bank 1)

Although I’ve had this code for a substantial amount of time before this started happening