integrated Daniel Reed's general unit scripts.