Fixed problem with histograms. Many updates.