Start adding php refactoring