Modular refactor