remove depracted functions of twig and dead code