isEmpty and updated removePeaks