Added an array to Histogram for sorting
Count total terms in Histogram
Tweaked memory freeing order
Histograms are sortable