     
     // The music.
     private var targetMusicVolume:Number = 0;
-    private var music:FlxSound;
     private static const MUSIC_VOLUME_FACTOR:Number = 1.3;
     private static const MIN_MUSIC_VOLUME:Number = 0.2;
     private static const MAX_MUSIC_VOLUME:Number = 0.8;
+    private var playMusic:Boolean;
 
     // Flixel Methods
     // --------------

      if ((didTheEnd && FlxG.mouse.justPressed()) || FlxG.keys.justPressed('Q'))
      {
        var fadeDuration:Number = 3;
        music.fadeOut(fadeDuration);
        gameStatePollInterval.stop();
        gameStatePollInterval.start(fadeDuration, 1,
          function(onTimer:FlxTimer):void {

        targetMusicVolume = (platform.startingPoint.y - player.cameraFocus.y) / platform.distanceToTravel.y;
        targetMusicVolume = Math.pow(targetMusicVolume, MUSIC_VOLUME_FACTOR);
      }
      FlxG.music.volume += (targetMusicVolume - FlxG.music.volume) / player.cameraSpeed;
      FlxG.music.volume = FlxU.bound(FlxG.music.volume, MIN_MUSIC_VOLUME, MAX_MUSIC_VOLUME);
    }
    private function updateGameState(doChecks:Boolean=false):void
    {
