 destroy = ->
   styleNode.parentNode?.removeChild styleNode
 
-  for attribute in [linkColorAttrName, linkSmallAttrName, linkLargeAttrName, linkContainerIdAttrName]
+  for attribute in [linkColorAttrName, linkSmallAttrName, linkLargeAttrName, containerIdAttrName]
     Array::forEach.call document.querySelectorAll("[#{ attribute }]"), (node) ->
       node.removeAttribute attribute
 

linkColorAttrName = 'data-smart-underline-link-color'
linkSmallAttrName = 'data-smart-underline-link-small'
linkLargeAttrName = 'data-smart-underline-link-large'
linkContainerIdAttrName = 'data-smart-underline-container-id'

performanceTimes = []
time = -> + new Date

        if fontSize >= 20
          link.setAttribute linkLargeAttrName, ''

        id = container.getAttribute containerIdAttrName

        if id
          containers[id].links.push link
        else
          id = uniqueLinkContainerID()
          container.setAttribute containerIdAttrName, id
          containers[id] =
            id: id
            container: container
            links: [link]

  styles = ''

  containersWithPrecedence = sortContainersForCSSPrecendence containers

  for container in containersWithPrecedence
    linkColors = {}
    linkColors[getLinkColor link] = true for link in container.links

    backgroundColor = getBackgroundColor container.container

    for color of linkColors
      linkSelector = """[#{ containerIdAttrName }="#{ container.id }"] a[#{ linkColorAttrName }="#{ color }"]"""
      linkSmallSelector = """#{ linkSelector }[#{ linkSmallAttrName }]"""
      linkLargeSelector = """#{ linkSelector }[#{ linkLargeAttrName }]"""

