         {
             return currentDocument.boxes
         }
+        set(newValue)
+        {
+            currentDocument.boxes = newValue
+        }
     }
 
     var selectionLayer: CAShapeLayer!

            
            tableArrayController.addObserver(self, forKeyPath: "selection", options: nil, context: nil)
            observing = true
//            tableArrayController.setSelectionIndex(1)
//            tableArrayController.setSelectionIndex(0) // Move the selection so the observer sees the change and updates the display
            currentDocument.createPageIndex()
//            tableView.scrollRowToVisible(0)
//            tableView.becomeFirstResponder()
        }

    }

    // 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!)
    {
