Added batch mode processing.