rm unused tpl, fix hooks