Added histogram rescaling code
Added final event categorization histograms
bug fixes