Implemented first pass at histogram storage