 
             isPinned: e.classList.contains 'pinned'
         }
-
-
-    # Close all unpinned tabs
-    closeUnpinned: ->
-        activePane = document.querySelector '.pane.active'
-        tabbar = activePane.querySelector '.tab-bar'
-
-        activePane = atom.workspace.getActivePane()
-        tabs = tabbar.querySelectorAll '.tab'
-        for i in [(tabs.length - 1)..0]
-            if !tabs[i].classList.contains('pinned')
-                activePane.itemAtIndex i
-                activePane.destroyItem activePane.itemAtIndex(i)

                try
                    # Find the pane and tab-bar DOM objects for
                    # this pane.
                    pane = panes.children[parseInt key, 10]
                    tabbar = pane.querySelector '.tab-bar'

                    # Pin the first N tabs, since pinned tabs are

                body.classList.add 'pinned-icons-colorless'
            else
                body.classList.remove 'pinned-icons-colorless'
        atom.config.observe 'pinned-tabs.closeUnpinnedTabs', (newValue) =>
            body = document.querySelector 'body'
            if newValue
                body.classList.remove 'close-unpinned'
