AQCU-1547: less gross code/refactor
AQCU-1547: less gross code/refactor

zmoore-usgs/repgen,mhines-usgs/repgen,USGS-R/repgen,mhines-usgs/repgen,zmoore-usgs/repgen,zmoore-usgs/repgen,USGS-R/repgen,mhines-usgs/repgen,USGS-R/repgen