Implemented Smarty Template Engine