Clean up code of SoundManager and add some documentation