Major interface changes and PHP code cleanup