Refactoring the ruby trojans to be compliant with the new API.