Restructured framework to accommodate phi as a subtree module.