Make the audio player able to run in the background while searching. Fix reference leaks in the dialog cleanup code.