Added pruning of waveforms
Minor bugfix in test harness