Refactoring LogicController