smarty improvments