Improved histogram
Updated docs and comments