Remove singleton dimensions, WeightedMedian test cleanup