Removed obsolete pass-by-reference for PHP 5.3 compatibility
Removed obsolete return-by-reference for PHP 5.3 compatibility
Removed obsolete pass-by-reference for PHP 5.3 compatibility
Better Smarty3 compatibility, added handling for template exceptions