Added smarty support