added Smarty (updated to 3.0.8) and Twig libraries. Fixed a Smarty bug