 
     if (sound !is null)
     {
-        // Create a scene node with a SoundSource component for playing the sound. The SoundSource component plays
+        // Create a SoundSource component for playing the sound. The SoundSource component plays
         // non-positional audio, so its 3D position in the scene does not matter. For positional sounds the
         // SoundSource3D component would be used instead
-        Node@ soundNode = scene_.CreateChild("Sound");
-        SoundSource@ soundSource = soundNode.CreateComponent("SoundSource");
+        SoundSource@ soundSource = scene_.CreateComponent("SoundSource");
+        soundSource.autoRemoveMode = REMOVE_COMPONENT;
         soundSource.Play(sound);
         // In case we also play music, set the sound volume below maximum so that we don't clip the output
         soundSource.gain = 0.7f;
-
-        // Subscribe to the "sound finished" event generated by the SoundSource for removing the node once the sound has played
-        // Note: the event is sent through the Node (similar to e.g. node physics collision and animation trigger events)
-        // to not require subscribing to the particular component
-        SubscribeToEvent(soundNode, "SoundFinished", "HandleSoundFinished");
     }
 }
 
 void HandlePlayMusic(StringHash eventType, VariantMap& eventData)
 {
-    // Check if the music player node/component already exist
-    if (scene_.GetChild("Music") !is null)
-        return;
-
     Sound@ music = cache.GetResource("Sound", "Music/Ninja Gods.ogg");
     // Set the song to loop
     music.looped = true;
 
-    // Create a scene node and a sound source for the music
-    Node@ musicNode = scene_.CreateChild("Music");
-    SoundSource@ musicSource = musicNode.CreateComponent("SoundSource");
-    // Set the sound type to music so that master volume control works correctly
-    musicSource.soundType = SOUND_MUSIC;
     musicSource.Play(music);
 }
 
 void HandleStopMusic(StringHash eventType, VariantMap& eventData)
 {
-    // Remove the music player node from the scene
-    scene_.RemoveChild(scene_.GetChild("Music"));
+    musicSource.Stop();
 }
 
 void HandleSoundVolume(StringHash eventType, VariantMap& eventData)


void CreateUI()
{
    // Create a scene which will not be actually rendered, but is used to hold SoundSource components while they play sounds
    scene_ = Scene();

    XMLFile@ uiStyle = cache.GetResource("XMLFile", "UI/DefaultStyle.xml");
    // Set style to the UI root so that elements will inherit it
    ui.root.defaultStyle = uiStyle;

    "Sounds/Powerup.wav"
};

SoundSource@ musicSource;

void Start()
{
    // Execute the common startup for samples
    SampleStart();

    // Create a scene which will not be actually rendered, but is used to hold SoundSource components while they play sounds
    scene_ = Scene();

    // Create music sound source
    @musicSource = scene_.CreateComponent("SoundSource");
    // Set the sound type to music so that master volume control works correctly
    musicSource.soundType = SOUND_MUSIC;

    // Enable OS cursor
    input.mouseVisible = true;
