clean up some of the multi/single pass code sharing