Decouple mt code