Cleaned up IDT code
Cleaned up IDT code