Added functions for histogramming to the .C and .h files