     }
 
 
+    /// Returns the index corresponding to the tree node’s type in the type pop-up menu.
+    /// - parameter treeNode: The tree node whose type pop-up menu index is being returned.
     private func typePopUpMenuItemIndexOfTreeNode(treeNode: PropertyListTreeNode) -> Int {
         return treeNode.item.propertyListType.typePopUpMenuItemIndex
     }
 
 
+    /// Sets the type for the specified tree node. 
+    ///
+    /// This method works by first converting the existing property list item of the tree node
+    /// to the new type and then invoking `‑setValue:ofTreeNode:needsChildRegeneration:` with
+    /// the new value. Child regeneration is needed when the type of the given tree goes from
+    /// being a scalar to a collection or vice versa.
+    ///
+    /// - parameter key: The key being set. If the dictionary already contains this key, has no
+    ///       effect. This should not be possible because of our implementation of 
+    //        `‑control:textShouldEndEditing:`.
+    /// - parameter treeNode: The tree node whose key is being set.
     private func setType(type: PropertyListType, ofTreeNode treeNode: PropertyListTreeNode) {
         let wasCollection = treeNode.item.isCollection
-        let value = treeNode.item.propertyListItemByConvertingToType(type)
-        let isCollection = value.isCollection
-
-        // We only need child regeneration if we changed from being a scalar to a collection or vice
-        // versa.  If we changed types from one collection to another, we convert the children
-        // automatically, so we will have the right number of nodes.
-        self.setValue(value, ofTreeNode: treeNode, needsChildRegeneration: wasCollection != isCollection)
-    }
-
-
+        let newValue = treeNode.item.propertyListItemByConvertingToType(type)
+        let isCollection = newValue.isCollection
+
+        // We only need child regeneration if we changed from being a scalar to a collection or
+        // vice versa.  If we changed types from one collection to another, we keep our children
+        // as part of type conversion, so the node hierarchy doesn’t change at all.
+        self.setValue(newValue, ofTreeNode: treeNode, needsChildRegeneration: wasCollection != isCollection)
+    }
+
+
+    /// Returns the object value to display in the Value column for the specified tree node.
+    /// - parameter treeNode: The tree node whose object value is being returned.
     private func valueOfTreeNode(treeNode: PropertyListTreeNode) -> AnyObject {
         switch treeNode.item {
         case .ArrayItem:

    }


    private func itemForAdding() -> PropertyListItem {
        return PropertyListItem(propertyListType: .StringType)
    }

// MARK: - Property List Type Pop-Up Menu

private extension PropertyListType {
    /// Returns the `PropertyListType` instance that corresponds to the specified index of the
    /// type pop-up menu, or `nil` if the index doesn’t have a known type correspondence.
    /// - parameter index: The index of the type pop-up menu whose type is being returned.
    init?(typePopUpMenuItemIndex index: Int) {
        switch index {
        case 0:
