Did a lot of refactoring and reorg with php project. Still verymuch
incomplete.