Smarty Library updated to 3.1.18
Improved code - Part 2