* Always create main window. * Properly handle netowrk manager - it was created twice, leading to potential crashes.