If for argument sake these green waxy balls had to form in your intestines rather than come from the gallbladder and liver, then it could more likely be a curdling reaction like when you make tofu because magnesium ( Epsom Salts ) is (one of the things) used to make soya milk curdle. So, it could be curdling that happened in the bowel, not a "soap-making reaction". I'm not a Scientist so don't go off at me if I'm wrong. It's just a theory.
-----------------
Yes, it's just a theory. I did many flushes without any salts like Epsom, and result is still the same: Green stones.