more cleanup in BatchDecomposition