Fix imports, catch keyboard interrupts