First make sure you get a timing light on there and mess around with your initial timing advance. If you need to retard it a bit but it won't idle you can open up the primary a bit (idle speed screw), like one extra turn or so and it should idle better.
I recently swapped a 20r head on my 22r and was having trouble with pre-detonation on 87 octane. I ended up finding 2 different things that helped out. These are in the range of "micro-tuning", tiny changes that make large differences,
First I swapped to one step colder spark plugs than stock, gapped .004" less than stock gap. I use autolite 64 normally gapped at .032", then I switched to autolite 63", gapped at .028 and no more pinging. You wouldn't think it would make any difference but it did.
Then I was messing with my carb and ended up changing out the main jet for one a little richer. I changed from a 116 je to a 118 jet. Then it would run just fine with the autolite 64 plugs again on 87 octane 10% ethanol.
You can use Hitachi jets:
http://www.jetsrus.com/a_jets_by_carburetor_type/jets_hitachi_main_4H7.html