refactoring legal design