Adding Smarty
More structure