Refactored common tree.