Added loop to clean_up() to delete duplicate spectra.