mainwindow and downloadmanager are commonized