Stick with the codes to start, change the o2 (factory recomendation is every 27K) then the CPS . clear the codes and see what happens. What you are experianceing is not uncommon with the XJ , we see it quite often and a bad o2 can make an xj run like dookie !!!