PHP client code cleanup