Clean up on WaveGenerator close process - threads and processes now seem
to termate cleanly.
New test for find best sigma method.