A few weeks ago I took my car into auto zone and had a cel checked. I don't remember the codes but one of them was for a misfire and the other was for the maf sensor. They recommend new plugs, wires, and maf. Changed all of them and the car ran fine. About a week later the cel came back on. The car ran fine up until a few days ago. I was stopped at a light and when I accelerated it hesitated then kept going. Stopped again and idled fine. Started going and noticed a flashing cel light. A mile later and I was home. Turned off the car and waited a minute and started it. Cel was steady so I took it around the block and no issues. The next day I drove it to work and about a mile on the highway the cel started flashing and noticed a reduction in power. I pulled over shut off the engine. Popped the hood and checked all the connections. Started it and no more flashing cel. Proceeded to work without issue and back home. I took it back to auto zone and the codes were misfire cylinder 2 and knock sensor bank 1. Took it home and decided to pull the battery and reset the codes. Wenter a bit 10 miles with no issues then the cel came back on. About a mile later there was some engine hesitation and vibration. Pulled over and let it idle. I then started out again and it ran fine for a few more miles and hesitated again. This time I just backed off the gas and hit it and the car ran fine all the way home. What could be wrong???