Added clean handling of Ctrl-C in main loop