When I had similar symptoms with my Mazda, it turned out to be bad injector seals. I replaced a bunch of unnecessary parts before I broke down and took it to the dealer. The codes it was throwing was for misfire on #5, and random misfire. I was thinking I had a spark issue, and ignored the distinct smell of gas under the hood...