Refactored transform and with into chainable module