cleanups and work on idt table