Memory Leak/Corruption Fixes, PulseAudio Detection Fixes

Valgrind (leak + corruption) fixes
PulseAudio detection fixes