Remove unused xhtml classes
Fix pass by reference which is not allowed in newer versions of PHP.
Fixed API merge-conflict