waveform cleanup