Refactor for common root