Ctrl+C more improvements

More changes to improve handling of interruptions.