Consolidate scripts into two scripts