moved client here, php5ized trident classes