added plot spectra and cleaned up the interactive parts