Added Comments and fixed $tpl->assign placement