Marionette refactoring