Phy refactoring