Making dataprep script a little more general