Reverted to Zend coding standard and PHP 5.2 compatibility