 		}
 	}
 	
-    // MARK: - Array Controllers and automation (OSX)
- #if os(OSX) && !USE_EMBEDDED_MODULES
-
-
-    // KVO
-    // Those array controllers are Owned by their respective ViewControllers
-    // Those view Controller are observed here to insure a consistent persitency
-
-
-    open var blocksArrayController: NSArrayController?{
-        willSet{
-            // Remove observer on previous array Controller
-            blocksArrayController?.removeObserver(self, forKeyPath: "selectionIndexes", context: &self._KVOContext)
-        }
-        didSet{
-            // Setup the Array Controller in the ManagedCollection
-            self.blocks.arrayController=blocksArrayController
-            // Add observer
-            blocksArrayController?.addObserver(self, forKeyPath: "selectionIndexes", options: .new, context: &self._KVOContext)
-            if let indexes=self.metadata.stateDictionary[BartlebyDocument.kSelectedBlocksIndexesKey] as? [Int]{
-                let indexesSet = NSMutableIndexSet()
-                indexes.forEach{ indexesSet.add($0) }
-                self.blocksArrayController?.setSelectionIndexes(indexesSet as IndexSet)
-             }
-        }
-    }
-        
-    open var boxesArrayController: NSArrayController?{
-        willSet{
-            // Remove observer on previous array Controller
-            boxesArrayController?.removeObserver(self, forKeyPath: "selectionIndexes", context: &self._KVOContext)
-        }
-        didSet{
-            // Setup the Array Controller in the ManagedCollection
-            self.boxes.arrayController=boxesArrayController
-            // Add observer
-            boxesArrayController?.addObserver(self, forKeyPath: "selectionIndexes", options: .new, context: &self._KVOContext)
-            if let indexes=self.metadata.stateDictionary[BartlebyDocument.kSelectedBoxesIndexesKey] as? [Int]{
-                let indexesSet = NSMutableIndexSet()
-                indexes.forEach{ indexesSet.add($0) }
-                self.boxesArrayController?.setSelectionIndexes(indexesSet as IndexSet)
-             }
-        }
-    }
-        
-    open var lockersArrayController: NSArrayController?{
-        willSet{
-            // Remove observer on previous array Controller
-            lockersArrayController?.removeObserver(self, forKeyPath: "selectionIndexes", context: &self._KVOContext)
-        }
-        didSet{
-            // Setup the Array Controller in the ManagedCollection
-            self.lockers.arrayController=lockersArrayController
-            // Add observer
-            lockersArrayController?.addObserver(self, forKeyPath: "selectionIndexes", options: .new, context: &self._KVOContext)
-            if let indexes=self.metadata.stateDictionary[BartlebyDocument.kSelectedLockersIndexesKey] as? [Int]{
-                let indexesSet = NSMutableIndexSet()
-                indexes.forEach{ indexesSet.add($0) }
-                self.lockersArrayController?.setSelectionIndexes(indexesSet as IndexSet)
-             }
-        }
-    }
-        
-    open var nodesArrayController: NSArrayController?{
-        willSet{
-            // Remove observer on previous array Controller
-            nodesArrayController?.removeObserver(self, forKeyPath: "selectionIndexes", context: &self._KVOContext)
-        }
-        didSet{
-            // Setup the Array Controller in the ManagedCollection
-            self.nodes.arrayController=nodesArrayController
-            // Add observer
-            nodesArrayController?.addObserver(self, forKeyPath: "selectionIndexes", options: .new, context: &self._KVOContext)
-            if let indexes=self.metadata.stateDictionary[BartlebyDocument.kSelectedNodesIndexesKey] as? [Int]{
-                let indexesSet = NSMutableIndexSet()
-                indexes.forEach{ indexesSet.add($0) }
-                self.nodesArrayController?.setSelectionIndexes(indexesSet as IndexSet)
-             }
-        }
-    }
-        
-    open var pushOperationsArrayController: NSArrayController?{
-        willSet{
-            // Remove observer on previous array Controller
-            pushOperationsArrayController?.removeObserver(self, forKeyPath: "selectionIndexes", context: &self._KVOContext)
-        }
-        didSet{
-            // Setup the Array Controller in the ManagedCollection
-            self.pushOperations.arrayController=pushOperationsArrayController
-            // Add observer
-            pushOperationsArrayController?.addObserver(self, forKeyPath: "selectionIndexes", options: .new, context: &self._KVOContext)
-            if let indexes=self.metadata.stateDictionary[BartlebyDocument.kSelectedPushOperationsIndexesKey] as? [Int]{
-                let indexesSet = NSMutableIndexSet()
-                indexes.forEach{ indexesSet.add($0) }
-                self.pushOperationsArrayController?.setSelectionIndexes(indexesSet as IndexSet)
-             }
-        }
-    }
-        
-    open var usersArrayController: NSArrayController?{
-        willSet{
-            // Remove observer on previous array Controller
-            usersArrayController?.removeObserver(self, forKeyPath: "selectionIndexes", context: &self._KVOContext)
-        }
-        didSet{
-            // Setup the Array Controller in the ManagedCollection
-            self.users.arrayController=usersArrayController
-            // Add observer
-            usersArrayController?.addObserver(self, forKeyPath: "selectionIndexes", options: .new, context: &self._KVOContext)
-            if let indexes=self.metadata.stateDictionary[BartlebyDocument.kSelectedUsersIndexesKey] as? [Int]{
-                let indexesSet = NSMutableIndexSet()
-                indexes.forEach{ indexesSet.add($0) }
-                self.usersArrayController?.setSelectionIndexes(indexesSet as IndexSet)
-             }
-        }
-    }
-        
-
-
-#endif
-
-    // indexes persistency
-
-    
-    static open let kSelectedBlocksIndexesKey="selectedBlocksIndexesKey"
-    static open let BLOCKS_SELECTED_INDEXES_CHANGED_NOTIFICATION="BLOCKS_SELECTED_INDEXES_CHANGED_NOTIFICATION"
-    dynamic open var selectedBlocks:[Block]?{
-        didSet{
-            if let blocks = selectedBlocks {
-                 let indexes:[Int]=blocks.map({ (block) -> Int in
-                    return self.blocks.index(where:{ return $0.UID == block.UID })!
-                })
-                self.metadata.stateDictionary[BartlebyDocument.kSelectedBlocksIndexesKey]=indexes
-                NotificationCenter.default.post(name:NSNotification.Name(rawValue:BartlebyDocument.BLOCKS_SELECTED_INDEXES_CHANGED_NOTIFICATION), object: nil)
-            }
-        }
-    }
-    var firstSelectedBlock:Block? { return self.selectedBlocks?.first }
-        
-        
-    
-    static open let kSelectedBoxesIndexesKey="selectedBoxesIndexesKey"
-    static open let BOXES_SELECTED_INDEXES_CHANGED_NOTIFICATION="BOXES_SELECTED_INDEXES_CHANGED_NOTIFICATION"
-    dynamic open var selectedBoxes:[Box]?{
-        didSet{
-            if let boxes = selectedBoxes {
-                 let indexes:[Int]=boxes.map({ (box) -> Int in
-                    return self.boxes.index(where:{ return $0.UID == box.UID })!
-                })
-                self.metadata.stateDictionary[BartlebyDocument.kSelectedBoxesIndexesKey]=indexes
-                NotificationCenter.default.post(name:NSNotification.Name(rawValue:BartlebyDocument.BOXES_SELECTED_INDEXES_CHANGED_NOTIFICATION), object: nil)
-            }
-        }
-    }
-    var firstSelectedBox:Box? { return self.selectedBoxes?.first }
-        
-        
-    
-    static open let kSelectedLockersIndexesKey="selectedLockersIndexesKey"
-    static open let LOCKERS_SELECTED_INDEXES_CHANGED_NOTIFICATION="LOCKERS_SELECTED_INDEXES_CHANGED_NOTIFICATION"
-    dynamic open var selectedLockers:[Locker]?{
-        didSet{
-            if let lockers = selectedLockers {
-                 let indexes:[Int]=lockers.map({ (locker) -> Int in
-                    return self.lockers.index(where:{ return $0.UID == locker.UID })!
-                })
-                self.metadata.stateDictionary[BartlebyDocument.kSelectedLockersIndexesKey]=indexes
-                NotificationCenter.default.post(name:NSNotification.Name(rawValue:BartlebyDocument.LOCKERS_SELECTED_INDEXES_CHANGED_NOTIFICATION), object: nil)
-            }
-        }
-    }
-    var firstSelectedLocker:Locker? { return self.selectedLockers?.first }
-        
-        
-    
-    static open let kSelectedNodesIndexesKey="selectedNodesIndexesKey"
-    static open let NODES_SELECTED_INDEXES_CHANGED_NOTIFICATION="NODES_SELECTED_INDEXES_CHANGED_NOTIFICATION"
-    dynamic open var selectedNodes:[Node]?{
-        didSet{
-            if let nodes = selectedNodes {
-                 let indexes:[Int]=nodes.map({ (node) -> Int in
-                    return self.nodes.index(where:{ return $0.UID == node.UID })!
-                })
-                self.metadata.stateDictionary[BartlebyDocument.kSelectedNodesIndexesKey]=indexes
-                NotificationCenter.default.post(name:NSNotification.Name(rawValue:BartlebyDocument.NODES_SELECTED_INDEXES_CHANGED_NOTIFICATION), object: nil)
-            }
-        }
-    }
-    var firstSelectedNode:Node? { return self.selectedNodes?.first }
-        
-        
-    
-    static open let kSelectedPushOperationsIndexesKey="selectedPushOperationsIndexesKey"
-    static open let PUSHOPERATIONS_SELECTED_INDEXES_CHANGED_NOTIFICATION="PUSHOPERATIONS_SELECTED_INDEXES_CHANGED_NOTIFICATION"
-    dynamic open var selectedPushOperations:[PushOperation]?{
-        didSet{
-            if let pushOperations = selectedPushOperations {
-                 let indexes:[Int]=pushOperations.map({ (pushOperation) -> Int in
-                    return self.pushOperations.index(where:{ return $0.UID == pushOperation.UID })!
-                })
-                self.metadata.stateDictionary[BartlebyDocument.kSelectedPushOperationsIndexesKey]=indexes
-                NotificationCenter.default.post(name:NSNotification.Name(rawValue:BartlebyDocument.PUSHOPERATIONS_SELECTED_INDEXES_CHANGED_NOTIFICATION), object: nil)
-            }
-        }
-    }
-    var firstSelectedPushOperation:PushOperation? { return self.selectedPushOperations?.first }
-        
-        
-    
-    static open let kSelectedUsersIndexesKey="selectedUsersIndexesKey"
-    static open let USERS_SELECTED_INDEXES_CHANGED_NOTIFICATION="USERS_SELECTED_INDEXES_CHANGED_NOTIFICATION"
-    dynamic open var selectedUsers:[User]?{
-        didSet{
-            if let users = selectedUsers {
-                 let indexes:[Int]=users.map({ (user) -> Int in
-                    return self.users.index(where:{ return $0.UID == user.UID })!
-                })
-                self.metadata.stateDictionary[BartlebyDocument.kSelectedUsersIndexesKey]=indexes
-                NotificationCenter.default.post(name:NSNotification.Name(rawValue:BartlebyDocument.USERS_SELECTED_INDEXES_CHANGED_NOTIFICATION), object: nil)
-            }
-        }
-    }
-    var firstSelectedUser:User? { return self.selectedUsers?.first }
-        
-        
+
     // MARK: - Schemas
 
 

    }

    // MARK: - Collection Controllers

    fileprivate var _KVOContext: Int = 0

    // The initial instances are proxies
    // On document deserialization the collection are populated.

        }
    }


    
    /**
