Decoupled the Server from the MainWindow.xaml file