Many bugfixes. Start implementing code for BAS2WAV, but now
only for debugging.