Added feature so that spectra are re-normalized against template and template is then re-calculated using the re-normalized spectra.