 updatePositionsAndWindowsForAllTabsInWindow = (windowId) ->
   chrome.tabs.getAllInWindow(windowId, (tabs) ->
     for tab in tabs
-      openTabInfo = openTabs[tab.id]
+      openTabInfo = tabInfoMap[tab.id]
       if (openTabInfo)
         openTabInfo.positionIndex = tab.index
         openTabInfo.windowId = tab.windowId)

      chrome.tabs.update(toSelect.id, { selected: true })))

updateOpenTabs = (tab) ->
  openTabs[tab.id] = { url: tab.url, positionIndex: tab.index, windowId: tab.windowId }
  # Frames are recreated on refresh
  delete framesForTab[tab.id]


currentVersion = Utils.getCurrentVersion()

tabQueue = {} # windowId -> Array
tabInfoMap = {} # tabId -> object with various tab properties
keyQueue = "" # Queue of keys typed
validFirstKeys = {}
singleKeyCommands = []
