Modal refactoring