refactoring the malicious ot extension glue code