     private var nextUserWindowTopLeftPoint: NSPoint = NSPoint.zero
 
     deinit { log.debug("deinit") }
-}
-
-// MARK: - Object Lifecycle
-extension MainViewController {
-    override func awakeFromNib() {
-        super.awakeFromNib()
-        MainViewController.shared = self
-    }
 }
 
 // MARK: - NSViewController Functions

    }

    func showHandleNameAddViewController(live: Live, chat: ChatMessage) {
        let handleNameAddViewController =
            StoryboardScene.MainWindowController.handleNameAddViewController.instantiate()
        handleNameAddViewController.handleName = (defaultHandleName(live: live, chat: chat) ?? "") as NSString
        handleNameAddViewController.completion = { (cancelled: Bool, handleName: String?) -> Void in
            if !cancelled, let handleName = handleName {
                HandleNameManager.shared.updateHandleName(
                    for: chat.userId, in: live.communityId, name: handleName)
                MainViewController.shared.refreshHandleName()
            }

            self.dismiss(handleNameAddViewController)
            // TODO: deinit in handleNameViewController is not called after this completion
        }

        presentAsSheet(handleNameAddViewController)
    }

    private func defaultHandleName(live: Live, chat: ChatMessage) -> String? {

    enum ConnectionStatus { case disconnected, connecting, connected }

    // MARK: Properties
    weak var delegate: MainViewControllerDelegate?

    // MARK: Main Outlets
