simplify IRQ handling, minor cleanup