refactoring legal design model