Changes to histogram cleaning, might work now