AQCU-1070: Slightly simplified code
AQCU-1070: Slightly simplified code

thongsav-usgs/repgen,zmoore-usgs/repgen,zmoore-usgs/repgen,lindsaycarr/repgen,mhines-usgs/repgen,lindsaycarr/repgen,thongsav-usgs/repgen,dpattermann-usgs/repgen,USGS-R/repgen,dpattermann-usgs/repgen,mhines-usgs/repgen,lindsaycarr/repgen,USGS-R/repgen,dpattermann-usgs/repgen,zmoore-usgs/repgen,USGS-R/repgen,mhines-usgs/repgen,thongsav-usgs/repgen