Cleanup interactive execution and make termination work