Updated smarty integration