There's a few things you can check here. Check the AFM, easiest way is to swap with a known working one if know anyone with the same car.
When you replaced the CAS did you put the new one back in the same position as the old one? (Assuming the old one was in the correct position to start with) This affects the ignition timing.
Misfiring could also be caused by faulty coil packs which is a known problem with these. If it's still running old original coil packs this could be an issue.