Audio fixes, etc

Fixes problems with the audio library and other source files.