 
     timeline_chart.render Repo.commits
     Repo.add_files commit.files
-    Repo.calculate_files_of commit
     Repo.timestamp_to_d3 commit
-
-  add_commits: (commits) ->
-    Repo.parsed_commits = 0
-    for commit in Repo.commits
-      if commit.files? and commit.files.length > 0
-        console.log("already had files!!!")
-        Repo.parse_commit(commit)
-      else
-        $.getJSON window.location.origin + '/commits/' + commit.id + ".json", Repo.parse_commit
-
-    Repo.render_timeline() if Object.keys(Repo.commits).length > 0
-    console.log("finished parsing")
-
 
   timestamp_to_d3: (commit) ->
     commit.timestamp = d3.time.format("%Y-%m-%dT%XZ").parse(commit.timestamp) if typeof commit.timestamp is "string"


  stack:      d3.layout.stack().offset("zero")
  parse_date: d3.time.format("%Y-%m-%dT%XZ").parse

  # Good place to put this? Jeff
  $x_position: $("#x-position")
  $y_position: $("#y-position")
  draw_tooltip: (e) => 

    @layer = (commits) =>
      deletions = ({x: commit.pos, y: @get_aggregated_additions(commit), y0: 0} for commit in commits)
      additions = ({x: commit.pos, y: @get_aggregated_deletions(commit), y0: @get_aggregated_additions} for commit in commits)
      @stack [deletions, additions]

    @area = d3.svg.area().x((d) => @x d.x).y0((d) => @y d.y0).y1((d) => @y d.y + d.y0)

    @get_timestamp_range = (min_screen_x, max_screen_x) =>
      return false if not @filtered_commits?
      a = Math.round @rx(min_screen_x)
      b = Math.round @rx(max_screen_x)
      [@filtered_commits[a].timestamp, @filtered_commits[b].timestamp]

    @sort_timestamp_asc = (a,b) => a.timestamp - b.timestamp

    @svg = d3.select(@$el.selector)
