Cleaned up IRQ code