Allow for integer binning.

I also slightly changed the way histogram boundaries are computed