Fix exit in batch mode. Also change ExitCommand class.