Delete template and hooks