Remove some needless dependencies and handle keyboard interrupts