Improving gapfill scripts