Simple Histogram support. Code is a bit sloppy. Merge if you think it is useful.