84 is the first model year. That's almost always bad. The XJ was no exception. Engine, transmission, CAD front axle, weak front drive shaft, weak rear axle, etc.
I don't know how CA smog works but what comes into play when you're looking at an engine swap?
Honestly, I'm not sure I'd put anything into such a rig. Around here you could get your money back by scrapping the body and recycling the cat and battery. YMMV
My build thread has pics again. http://www.jeepforum.com/forum/f177/kevin108s-2000-xj-build-867428/