Fix destruction of backing surface on window close
Fix memory leaks identified by static analysis
Add close sound data
Rename some sound functions