Code clean up and added histogramInt