Added qemu killswitch.
Modularized code.