Refactoring including marionette boilerplate