Substituted bar plots for histograms, and general rewrite of some parts.