Moving methods from MainWindow to QGCApplication so that more things can run without a window. Helpful for testing.