Addition of interrupts and deviceinit functions