Refactored to use dynamic classes. ruby_zoho passes.

[ci skip]