Introduce "makeEffectAndTargetingCodeFromJson", use it.

This method is not very beautiful, but it makes the different effects
consumers more similar (and hopefully will help merge them).