Removed much of the byref '&' stuff, as objects are passed by ref already in php.