     for entry in @redoStack by -1
       switch entry.constructor
         when Checkpoint
-          redoStack.unshift(getCheckpointSnapshot(entry))
-        when Transaction
-          redoStack.unshift(getTransactionSnapshot(entry))
+          redoStack.unshift(snapshotFromCheckpoint(entry))
+        when Transaction
+          redoStack.unshift(snapshotFromTransaction(entry))
 
       break if redoStack.length is maxEntries
 

    for entry in @undoStack by -1
      switch entry.constructor
        when Checkpoint
          undoStack.unshift(getCheckpointSnapshot(entry))
        when Transaction
          undoStack.unshift(getTransactionSnapshot(entry))
          undoStackPatches.unshift(entry.patch)

      break if undoStack.length is maxEntries

      newText: change.newText
    })

  {
    type: 'transaction',
    changes,
    markersBefore: transaction.markerSnapshotBefore
    markersAfter: transaction.markerSnapshotAfter
  }

transactionFromSnapshot = ({changes, markersBefore, markersAfter}) ->
  patch = new Patch
  for {oldStart, oldEnd, oldText, newStart, newEnd, newText} in changes by -1
    oldExtent = traversal(oldEnd, oldStart)
    newExtent = traversal(newEnd, newStart)
    patch.splice(oldStart, oldExtent, newExtent, oldText, newText)

  # TODO: Return raw patch if there's no markersBefore && markersAfter
  new Transaction(markersBefore, patch, markersAfter)
