added IRQs

IRQs work properly by now, but need to be rewritten partly to reduce size by using macros.