   # Function for sorting on metadata
   pxl_meta = (node) ->
     if($(node).hasClass('pxl-meta'))
+      $(node).removeData('pxl-meta') # This clears the jQuery cache, allowing it to see the values updated by d3
       $(node).data('pxl-meta')
     else
       node.innerText

    .append("td")
    .attr('class', 'dynamic') # So we can separate this TR from any child TRs
    # Apply attrs and class if the cell data is a hash and has the attribute/class key
    .attr('data-pxl-meta', (d,i) -> d && d['pxl-meta'])
    .classed('pxl-meta', (d,i) -> d && d['pxl-meta'])
    .classed('pxl-td-shrink', (d,i) -> d && d['pxl-td-shrink'])
    .classed('pxl-histogram', (d,i) -> d && d['pxl-histogram'])
    .classed('pxl-hidden', (d,i) -> d && d['pxl-hidden'])

  td.html(ident)




color_table = ->
  $('tr').unbind('mouseenter.pixel1')
  $('tr').bind('mouseenter.pixel1', ->
    for cell in $(this).find('.pxl-histogram')
      color_cell(cell,'#F5F5F5')
  )
  $('tr').unbind('mouseleave.pixel1')
  $('tr').bind('mouseleave.pixel1', ->
    for cell in $(this).find('.pxl-histogram')
      color_cell(cell,'#FFF')
  )
  bgcolor = '#FFF'
  for cell in document.getElementsByClassName('pxl-histogram')
    color_cell(cell,bgcolor)
