Little improvment and cleanup of batchfile.