Processed several comments from @gyst concerning batch functions