     dd = date.getDate()
     dd = "0#{dd}" if dd < 10
 
-    return yyyy + '-' + mm + '-' + dd
+    return "#{yyyy}-#{mm}-#{dd}"
 
   addMarker: (lineNo, hash, rowCls, lineStr) ->
-    item = document.createElement('div')
-    item.classList.add 'blame-gutter-inner'
-    item.classList.add rowCls
+    item = @markerInnerDiv rowCls
 
     # no need to create objects and events on blank lines
     if lineStr.length > 0
       item.appendChild(@copySpan hash)
-      item.appendChild(@wrap lineStr)
-      item.addEventListener 'click', => @itemClicked(hash)
+      item.appendChild(@lineSpan lineStr, hash)
 
-    resizeHandle = document.createElement('div')
-    resizeHandle.addEventListener 'mousedown', @resizeStarted
-    resizeHandle.classList.add 'blame-gutter-handle'
-
-    item.appendChild resizeHandle
+    item.appendChild @resizeHandleDiv()
 
     marker = @editor.markBufferRange([[lineNo, 0], [lineNo, 0]])
     @editor.decorateMarker marker, {

    }
    @markers.push marker

  wrap: (str) ->
    span = document.createElement('span')
    span.innerHTML = str
    span

  copySpan: (hash) ->
    span = document.createElement('span')
    span.setAttribute('data-hash', hash)
    span.classList.add 'icon-copy'
    span.addEventListener 'click', @copyClicked
    span

  removeAllMarkers: ->
    marker.destroy() for marker in @markers
    @markers = []


  resizeStarted: (e) =>
    document.addEventListener 'mousemove', @resizeMove

    e.preventDefault()

  setGutterWidth: (width) ->
    @state.width = Math.max(50, Math.min(width, 500))

    sheet = document.getElementById('blame-gutter-style')
    unless sheet
      sheet = @gutterStyle()
      document.head.appendChild sheet

    sheet.innerHTML = """
      atom-text-editor::shadow .gutter[gutter-name="blame"] {
        width: #{@state.width}px;
      }
    """

  deactivate: ->
    @subscriptions.dispose()
