marionette refactoring