Migrate three small idiosyncratic scripts to one parametric