Batch mode; move to packages