The egr is a good place to start, carb cleaner and a set of long harbor freight bristle brushes, to help get out as much of the carbon thats in those ports out as you can, also there is a port on the side of the carb that the egr sends the exhaust back into the carb through [the sub-egr] you want to make sure it's not clogged with carbon, same goes for the port that leads back to the cylinder head. also make sure that you test the egr so you know it functions correctly, inspect the emissions vacuum hoses for any leaks or damage, and if you have a good wide-band gauge, you can set the AFR via the mixture adjustment screw on the carb, but don't mess with it unless you have a good wide-band [I used the innovate LC2], thats how I got my truck to pass CA smog, I made sure the truck was running at a good 14.7-15.0 on my wide-band, after it was all running good, I took the gauge out, put in a new stock o2 sensor and she passed smog on the first try, nox was a bit high [but it was still within limits for a pass], and after the test I discovered one of my vacuum lines was disconnected, the one for the HAI hot air intake flapper, so check your vacuum lines for sure maybe even go to a parts store and replace them all with new stuff just to be on the safe side do 1 at a time tho, it shouldn't cost much they sell it by the foot, also try running 89 octane gasoline CA gas is not what it was in the 80's.