Histogram improvements

Closes some histogram related issues