 # Handle the conversion/removal of older version of settings that may have
 # been stored previously by `initUrlShorteners`.
 initUrlShorteners_update = ->
-  update_progress = utils.get 'update_progress'
+  update_progress = store.get 'update_progress'
   update_progress.shorteners ?= []
   # Check if the URL shorteners need updated for 0.1.0.0.
   if update_progress.shorteners.indexOf('0.1.0.0') is -1
     # Update the URL shorteners for 0.1.0.0.
-    utils.rename 'bitlyEnabled',       'bitly',         off
-    utils.rename 'bitlyXApiKey',       'bitlyApiKey',   ''
-    utils.rename 'bitlyXLogin',        'bitlyUsername', ''
-    utils.rename 'googleEnabled',      'googl',         on
-    utils.rename 'googleOAuthEnabled', 'googlOAuth',    on
+    store.rename 'bitlyEnabled',       'bitly',         off
+    store.rename 'bitlyXApiKey',       'bitlyApiKey',   ''
+    store.rename 'bitlyXLogin',        'bitlyUsername', ''
+    store.rename 'googleEnabled',      'googl',         on
+    store.rename 'googleOAuthEnabled', 'googlOAuth',    on
     # Ensure that URL shorteners are not updated for 0.1.0.0 again.
     update_progress.shorteners.push '0.1.0.0'
-    utils.set 'update_progress', update_progress
+    store.set 'update_progress', update_progress
 
 # URL shortener functions
 # -----------------------

  # Update the toolbar/browser action depending on the current settings.
  updateToolbar: ->
    image    = 'images/icon_19.png'
    name     = utils.get 'toolbarTemplateName'
    template = getTemplateWithName name if name
    title    = utils.i18n 'name'
    if utils.get('toolbarPopup') or not template
      # Use Template's details to style the browser action.
      chrome.browserAction.setIcon  path:  chrome.extension.getURL image
      chrome.browserAction.setTitle title: title

    stats.count       = @templates.length
    stats.customCount = stats.count - DEFAULT_TEMPLATES.length
    stats.popular     = popular?.name
    store.set 'stats', stats

  # Update the local list of templates to reflect those persisted.  
  # It is very important that this is called whenever templates may have been
  # changed in order to prepare the popup HTML and optimize performance.
  updateTemplates: ->
    @templates = store.get 'templates'
    @templates.sort (a, b) ->
      a.index - b.index
    buildPopup()
