Improve syntax Smarty, correct bug snippets