Refactor marionette controllers