Re-organized code in TheWaveGenerator for transfer to multiple input
formats.