     func selectAssetGroup(_ groupId: String?) {
         self.selectedGroupId = groupId
         self.updateTitleView()
-        self.collectionView!.reloadData()
+        self.collectionView?.reloadData()
     }
     
 	open func updateTitleView() {
         guard let selectedGroupId = self.selectedGroupId else { return }
-        
-        guard let group = self.imagePickerController.groupDataManager.fetchGroup(with: selectedGroupId) else {
+
+        guard let imagePickerController = imagePickerController else {
+            assertionFailure("Expect imagePickerController")
+            return
+        }
+
+        guard let group = imagePickerController.groupDataManager.fetchGroup(with: selectedGroupId) else {
             assertionFailure("Expect group")
             return
         }
 		self.title = group.groupName
 		
-		let groupsCount = self.imagePickerController.groupDataManager.groupIds?.count ?? 0
+		let groupsCount = imagePickerController.groupDataManager.groupIds?.count ?? 0
 		self.selectGroupButton.setTitle(group.groupName + (groupsCount > 1 ? "  \u{25be}" : "" ), for: .normal)
 		self.selectGroupButton.sizeToFit()
 		self.selectGroupButton.isEnabled = groupsCount > 1

    }
    
    private func startAutoScrollingIfNeeded(location: CGPoint) {
        let minLocationY = self.collectionView.contentOffset.y
        let maxLocationY = self.collectionView.bounds.height + self.collectionView.contentOffset.y

        debugPrint("minLocationY:\(minLocationY) maxLocationY:\(maxLocationY) current:\(location.y)")
        

	}
    
    @objc func showGroupSelector() {
        guard let groupListVC = groupListVC else {
            assertionFailure("Expect groupListVC")
            return
        }
        DKPopoverViewController.popoverViewController(groupListVC, fromView: selectGroupButton)
    }
    
    func fetchAsset(for index: Int) -> DKAsset? {
