its a renix system,clean the iac (idle air control) then check the map sensor on the firewall be sure it is hooked to the TB and is getting vac. rough idle after she warms up means that when the computer releases control of the rig to the sensors one of them is not working correctly. I also agree with Steve on the O2 sensor , but will add, get a good one, factory if you can afford it ,XJ's dont take well to the aftermarket variety