         title    : 'Notifications'
       delegate   : @notificationsPopup
 
-    @once 'viewAppended', =>
-      mainView = kd.getSingleton 'mainView'
-      mainView.addSubView @groupSwitcherPopup
+
+    @on 'viewAppended', ->
+
+      mainView.addSubView @accountPopup
       mainView.addSubView @notificationsPopup
-      @groupSwitcherPopup.listControllerPending.on 'PendingGroupsCountDidChange', (count)=>
-        if count > 0
-        then @groupSwitcherPopup.invitesHeader.show()
-        else @groupSwitcherPopup.invitesHeader.hide()
-        @groupsSwitcherIcon.updateCount count
 
-      @attachListeners()
-
-    kd.getSingleton('mainController').on 'accountChanged', =>
-      @groupSwitcherPopup.listController.removeAllItems()
-
-      # Commenting out these lines because of
-      # removal of the groups links from avatar popup. ~Umut
-      # @groupSwitcherPopup.populateGroups()
-      # @groupSwitcherPopup.populatePendingGroups()
-
-  attachListeners:->
-
-    @notificationsPopup.on 'NotificationCountDidChange', (count)=>
-      kd.utils.killWait @notificationsPopup.loaderTimeout
-      @notificationsIcon.updateCount count
+      @notificationsPopup.on 'NotificationCountDidChange', (count)=>
+        kd.utils.killWait @notificationsPopup.loaderTimeout
+        @notificationsIcon.updateCount count
 
 
   pistachio: ->

kd = require 'kd'
KDCustomHTMLView = kd.CustomHTMLView
AvatarAreaIconLink = require './avatarareaiconlink'
AvatarPopupGroupSwitcher = require './avatarpopupgroupswitcher'
AvatarView = require '../commonviews/avatarviews/avatarview'
JView = require '../jview'
PopupNotifications = require '../notifications/popupnotifications'

    """
    {{> @avatar}}
    <a class='profile' href='/#{profile.nickname}' title='Your profile'>#{profile.firstName}</a>
    {{> @accountIcon}}
    {{> @notificationsIcon}}
    """
