Added event handlers for KeyboardInterrupt and SystemExit so we die gracefully on ^c instead of printing a stacktrace.