     }
     
     
-    // Functions handling different filters provided in the app.
-    @IBAction func onNegativeFilter(_ sender: UIButton) {
-        filterName = "negative"
-        enableCompareButton()
-        if(sender.isSelected) {
-            imageView.image = image
-            sender.isSelected = false
-        } else {
-            applyFilter(filterName: filterName!)
-            sender.isSelected = true
-        }
-    }
-    
-    @IBAction func onRedFilter(_ sender: UIButton) {
-        filterName = "redFilter"
-        enableCompareButton()
-        if(sender.isSelected) {
-            imageView.image = image
-            sender.isSelected = false
-        } else {
-            applyFilter(filterName: filterName!)
-            sender.isSelected = true
-        }
-    }
-    
-    @IBAction func onBlueFilter(_ sender: UIButton) {
-        filterName = "blueFilter"
-        enableCompareButton()
-        if(sender.isSelected) {
-            imageView.image = image
-            sender.isSelected = false
-        } else {
-            applyFilter(filterName: filterName!)
-            sender.isSelected = true
-        }
-    }
-    
-    @IBAction func onGreenFilter(_ sender: UIButton) {
-        filterName = "greenFilter"
-        enableCompareButton()
-        if(sender.isSelected) {
-            imageView.image = image
-            sender.isSelected = false
-        } else {
-            applyFilter(filterName: filterName!)
-            sender.isSelected = true
-        }
-    }
-
-    @IBAction func onAlphaFilter(_ sender: UIButton) {
-        filterName = "alphaFilter"
-        enableCompareButton()
-        if(sender.isSelected) {
-            imageView.image = image
-            sender.isSelected = false
-        } else {
-            applyFilter(filterName: filterName!)
-            sender.isSelected = true
-        }
-    }
+//    // Functions handling different filters provided in the app.
+//    @IBAction func onNegativeFilter(_ sender: UIButton) {
+//        filterName = "negative"
+//        enableCompareButton()
+//        if(sender.isSelected) {
+//            imageView.image = image
+//            sender.isSelected = false
+//        } else {
+//            applyFilter(filterName: filterName!)
+//            sender.isSelected = true
+//        }
+//    }
+//    
+//    @IBAction func onRedFilter(_ sender: UIButton) {
+//        filterName = "redFilter"
+//        enableCompareButton()
+//        if(sender.isSelected) {
+//            imageView.image = image
+//            sender.isSelected = false
+//        } else {
+//            applyFilter(filterName: filterName!)
+//            sender.isSelected = true
+//        }
+//    }
+//    
+//    @IBAction func onBlueFilter(_ sender: UIButton) {
+//        filterName = "blueFilter"
+//        enableCompareButton()
+//        if(sender.isSelected) {
+//            imageView.image = image
+//            sender.isSelected = false
+//        } else {
+//            applyFilter(filterName: filterName!)
+//            sender.isSelected = true
+//        }
+//    }
+//    
+//    @IBAction func onGreenFilter(_ sender: UIButton) {
+//        filterName = "greenFilter"
+//        enableCompareButton()
+//        if(sender.isSelected) {
+//            imageView.image = image
+//            sender.isSelected = false
+//        } else {
+//            applyFilter(filterName: filterName!)
+//            sender.isSelected = true
+//        }
+//    }
+//
+//    @IBAction func onAlphaFilter(_ sender: UIButton) {
+//        filterName = "alphaFilter"
+//        enableCompareButton()
+//        if(sender.isSelected) {
+//            imageView.image = image
+//            sender.isSelected = false
+//        } else {
+//            applyFilter(filterName: filterName!)
+//            sender.isSelected = true
+//        }
+//    }
     
     
     // Functions handling image views and button actions.

            hideSlider()
            sender.isSelected = false
        } else {
            if self.secondaryMenu.isDescendant(of: self.view) {
                filterButton.isSelected = false
                hideSecondaryMenu()
            }
            showSlider()
            sender.isSelected = true

        }
    }
    
    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
//        print(indexPath.row)
        switch indexPath.row {
        case 0:
            filterName = "negative"
        case 1:
            filterName = "redFilter"
        case 2:
            filterName = "blueFilter"
        case 3:
            filterName = "greenFilter"
        case 4:
            filterName = "alphaFilter"
        default:
            print("Nothing to Do!")
        }
        if filterName != nil {
            applyFilter(filterName: filterName!)
            enableCompareEditButton()
        }
    }
    
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return filters.count
    }
    
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "FilterIdentifier", for: indexPath) as! FilterPhotoCell
//        cell.backgroundColor = UIColor.black
        cell.filterImage.image = filters[indexPath.row]
        return cell
    }
