Early IR handling code added

Not yet tested...