Moved values of FitRange to a separate function. Adapted plotting file to deal with empty histograms!