Minor refactoring for AddWaveForm window