code cleanup:
* move some settings into config files
* create a wav2bad() function and use it in CLI