void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            kinectControl = new KinectControl(gestureRecognition, skeletonRepository);

            kinectControl.ColorFrameGot += this.UpdateImage;
            kinectControl.SkeletonRecognized += SkeletonReady;

            try
            {
                kinectControl.StartKinect();
            }
            catch(KinectNotFoundException exception)
            {
                Output.WriteToDebugOrConsole(exception.Message);
                this.Close();
            }

            //Application.Current.Exit += new ExitEventHandler(Current_Exit);
            this.Closed += Current_Exit;

            speechControl = kinectControl.ReturnSpeechControl();
            grammar = createGrammar(mode);
            speechControl.InitializeSpeechRecognition(grammar);
            speechControl.SpeechRecognized += this.SpeechRecognized;
            speechControl.SpeechHypothesized += this.SpeechHypothesized;
        }