So far you have done the best first thing.. Start with a fresh tune up. Next look at all the codes and determine what could cause all of them. And the P0340 code is a big indicator. P0340 Camshaft Position Sensor Circuit Malfunction Camshaft Position Sensor Testing
A clogged cat would cause : codes p0340, p0300,p0302, p0304 but not p0340. You can use a back pressure tester in-place of the o2sensor and you need to see less than 1 1/2 psi or it is clogged.