Histogram creation.
Fixing histogram bugs.