Implement interrupts and a few other things