         {
             self.window.undoManager.setActionName("Insert Box")
         }
-        currentDocument.boxes.insert(box, atIndex: index)
+        boxes.insert(box, atIndex: index)
     }
 
     func removeBox(index: Int)

        newBox.x2 = box.x2
        box.x2 = newBox.x - 2

        currentDocument.boxes.insert(newBox, atIndex: index + 1)

        currentDocument.createPageIndex()
        updateSelectedCharacterDisplays()

    // TODO: Investigate the method for interpreting characters, see orange book
    override func keyDown(theEvent: NSEvent!)
    {
        self.interpretKeyEvents([theEvent])

    }

    // function for interpretKeyEvents
    override func insertText(insertString: AnyObject!)
    {
        if let characters = insertString as? String
        {
            let selectedIndex = tableArrayController.selectionIndex
            changeCharacter(characters, index: selectedIndex)
        }
    }


    override func encodeRestorableStateWithCoder(coder: NSCoder!)
    {
