Improived ScRemoveWaveform functionality