Minor cleanup and refact in ds2ds