Twig extensions were added twice

Custom extensions were added twice. And also in config it should be possible to pass the objects, because some extensions can have params that should be passed to the constructor.