     (save-mark-and-excursion
      (org-with-point-at marker
        (org-narrow-to-subtree)
-       (timeline-tools-map-clock-lines-and-entries
+       (timeline-tools-map-clocklines
         (lambda (start end)
           (push (cons (org-time-string-to-seconds start)
                       (org-time-string-to-seconds end))


;;; Manipulating Clock Lines

(defun timeline-tools-insert-clockline (time-1 time-2)
  "Insert new clock line from TIME-1 to TIME-2.

Insertion will be done at the beginning of the current line.
TIME-1 and TIME-2 must be given in a format understandable by
`format-time-string’, which see.  Saves mark and point."
  (let ((timestamp-format (concat "[" (substring (cdr org-time-stamp-formats) 1 -1) "]")))
    (save-mark-and-excursion
     (beginning-of-line)
     (indent-according-to-mode)
     (insert "CLOCK: ")
     (insert (format-time-string timestamp-format time-1))
     (insert "--")
     (insert (format-time-string timestamp-format time-2))
     (org-clock-update-time-maybe))))

(defun timeline-tools-insert-clockline-to-current-task (starting-time ending-time)
  ;; XXX: this function has a similar name to the next one, but does something
  ;; different
  "Add clock line from STARTING-TIME to ENDING-TIME to task under point."
  (interactive
   (list (org-read-date 4 'totime nil
                        "Start:" (current-time) nil t)
         (org-read-date 4 'totime nil
                        "End:" (current-time) nil t)))
  (if (not (eq major-mode 'org-mode))
      (user-error "Must be in org mode")
    (save-mark-and-excursion
     (org-clock-find-position nil)
     (open-line 1)
     (timeline-tools-insert-clockline starting-time ending-time))))

(defun timeline-tools-add-clockline-to-marker (target-marker start end)
  "Add clock line to task under TARGET-MARKER from START to END.


             (setq times nil))))
      task-clock-times)))

(defun timeline-tools-timeline (tstart tend &optional files)
  "Return list of clocked times between TSTART and TEND from FILES.

Each element in this list is of the form
