         notes[setIndex][collectionIndex.noteIndex] = tuplet
     }
 
+    /**
+     TODO: docstring
+     
+     - parameter index: The index of the note in the specified note set.
+     - parameter setIndex: The index of the note set holding the note.
+     - throws:
+        - `MeasureError.invalidTieState`
+        - `MeasureError.noteIndexOutOfRange`
+        - `MeasureError.removeNoteFromTuplet`
+        - `TupletError.invalidIndex`
+        - `TupletError.internalError`
+     */
     internal mutating func removeNote(at index: Int, inSet setIndex: Int, skipTies skipTieConfig: Bool) throws {
         var newMeasure = self
 

            case .begin?:
                guard var lastNote = newCollections.last?.last else {
                    assertionFailure("last note was nil")
                    throw TupletError.internalError
                }
                try lastNote.modifyTie(.begin)
                try modifyCollections(atFirst: false, with: lastNote)
            case .end?:
                guard var firstNote = newCollections.first?.first else {
                    assertionFailure("first note was nil")
                    throw TupletError.internalError
                }
                try firstNote.modifyTie(.end)
                try modifyCollections(atFirst: true, with: firstNote)

        self = newMeasure
    }

    /**
     Adds a new `noteCollection` at the end of the note set.
     
     - parameter noteCollection: `NoteCollection` to add.
     - parameter setIndex: Note set index.
     */
    public mutating func append(_ noteCollection: NoteCollection, inSet setIndex: Int = 0) {
        notes[setIndex].append(noteCollection)
    }

    /**
     Inserts a new `noteCollection` at note `index`.
     
     - parameter noteCollection: `NoteCollection` to insert.
     - parameter index: The index of the note in the specified note set.
     - parameter setIndex: Note set index.
     - throws:
        - `MeasureError.invalidTupletIndex`
        - `MeasureError.noteIndexOutOfRange`
        - `MeasureError.invalidTieState`
     */
    public mutating func insert(_ noteCollection: NoteCollection, at index: Int, inSet setIndex: Int = 0) throws {
        try insert(noteCollection, at: index, inSet: setIndex, skipTies: false)
    }

    /**
     Inserts `noteCollections` at note `index`.
     
     - parameter noteCollections: Array of `NoteCollection` to insert.
     - parameter index: The index of the note in the specified note set.
     - parameter setIndex: Note set index.
     - throws:
        - `MeasureError.invalidTupletIndex`
        - `MeasureError.noteIndexOutOfRange`
        - `MeasureError.invalidTieState`
     */
    internal mutating func insert(_ noteCollections: [NoteCollection], at index: Int, inSet setIndex: Int = 0) throws {
        try insert(noteCollections, at: index, inSet: setIndex, skipTies: false)
    }

    /**
     Removes a single note from `index`.
     
     - parameter index: The index of the note in the specified note set.
     - parameter setIndex: Note set index.
     - throws:
        - `MeasureError.invalidTieState`
        - `MeasureError.noteIndexOutOfRange`
        - `MeasureError.removeNoteFromTuplet`
        - `TupletError.invalidIndex`
        - `TupletError.internalError`
     */
    public mutating func removeNote(at index: Int, inSet setIndex: Int = 0) throws {
        try removeNote(at: index, inSet: setIndex, skipTies: false)
    }

    /**
     Removes array of notes from range.
     
     - parameter indexRange: Notes range.
     - parameter setIndex: Note set index.
     - throws:
        - `MeasureError.internalError`
        - `MeasureError.incompleteTuplet`
        - `MeasureError.invalidTieState`

     */
    public mutating func removeNotesInRange(_ indexRange: CountableClosedRange<Int>, inSet setIndex: Int = 0) throws {
        try removeNotesInRange(indexRange, inSet: setIndex, skipTies: false)
    }

    /**
     Creates a `Tuplet` from a note range. See `Tuplet.init` for more details. This function also makes sure that the
     `noteRange` does not start or end across a `Tuplet` boundary.

     - throws:
        - `MeasureError.incompleteTuplet`
        - `MeasureError.internalError`
        - `MeasureError.invalidTieState`
        - `MeasureError.invalidTupletIndex`
        - `MeasureError.noteIndexOutOfRange`
    */
    public mutating func createTuplet(_ count: Int, _ baseNoteDuration: NoteDuration, inSpaceOf baseCount: Int? = nil, fromNotesInRange noteRange: CountableClosedRange<Int>, inSet setIndex: Int = 0) throws {
        var newMeasure = self
        let startCollectionIndex = try newMeasure.noteCollectionIndex(fromNoteIndex: noteRange.lowerBound, inSet: setIndex)
