miscellaneous cleanup but includes a fix for VIVO-404