diff --git a/app/Operations/CenterOp.cpp b/app/Operations/CenterOp.cpp
index fc63791d754d27bbf2f5f29c44028b4fd755db0d..9780e78bddf9361373ce3de51cf7496edca6eec2 100644
--- a/app/Operations/CenterOp.cpp
+++ b/app/Operations/CenterOp.cpp
@@ -22,8 +22,6 @@
 
 #include <Operation.h>
 #include <Image.h>
-#include <ImgWidget.h>
-
 
 #include "CenterOp.h"
 
diff --git a/app/Operations/CombineColorOp.cpp b/app/Operations/CombineColorOp.cpp
index 3ae0bcf6c4543812c1a85688bb691dc032050aed..0bba5373d5c76a2977300ac53cd3f3bc29f179a5 100644
--- a/app/Operations/CombineColorOp.cpp
+++ b/app/Operations/CombineColorOp.cpp
@@ -27,7 +27,6 @@
 #include <GrayscaleImage.h>
 #include <Converter.h>
 
-#include <ImgWidget.h>
 #include <Widgets/ImageListBox.h>
 
 #include "CombineColorOp.h"
@@ -53,10 +52,10 @@ void CombineColorOp::operator()(const imagein::Image*, const std::map<const imag
     dialog->setLayout(layout);
 
 
-    int nChannel = 3;
+    unsigned int nChannel = 3;
     ImageListBox** imageBoxes = new ImageListBox*[nChannel];
 
-    for(int i=0; i < nChannel; ++i) {
+    for(unsigned int i=0; i < nChannel; ++i) {
         imageBoxes[i] = new ImageListBox(dialog, NULL, imgList);
         QLabel* label = new QLabel(Tools::colorName(i, nChannel), dialog);
         layout->insertRow(i, label, imageBoxes[i]);
@@ -77,7 +76,9 @@ void CombineColorOp::operator()(const imagein::Image*, const std::map<const imag
     unsigned int maxWidth = numeric_limits<unsigned int>::max();
     unsigned int maxHeight = numeric_limits<unsigned int>::max();
     for(unsigned int c = 0; c < nChannel; ++c) {
-        channels[c] = Converter<GrayscaleImage>::convert(*imageBoxes[c]->currentImage());
+        const Image* img = imageBoxes[c]->currentImage();
+        if(img == NULL) return;
+        channels[c] = Converter<GrayscaleImage>::convert(*img);
         maxWidth = min(maxWidth, channels[c]->getWidth());
         maxHeight = min(maxHeight, channels[c]->getHeight());
     }
diff --git a/app/Operations/FFTOp.cpp b/app/Operations/FFTOp.cpp
index 2e96c30ea3e0c7f2707f64c0ce46de0b7d809691..6f07ced37b76d061d252f88a3db5fae5dfdd28f1 100644
--- a/app/Operations/FFTOp.cpp
+++ b/app/Operations/FFTOp.cpp
@@ -16,7 +16,6 @@
  * You should have received a copy of the GNU General Public License
  * along with EIImage.  If not, see <http://www.gnu.org/licenses/>.
 */
-#include "ImgWidget.h"
 #include "FFTOp.h"
 #include "../Tools.h"
 #include "../Algorithms/FFT.h"
diff --git a/app/Operations/FlipOp.cpp b/app/Operations/FlipOp.cpp
index 934eb3d2412d6bc372ee1af9f71a42137bf42a56..4c789089901e4ef727dd60cf52a35172db1330ff 100644
--- a/app/Operations/FlipOp.cpp
+++ b/app/Operations/FlipOp.cpp
@@ -21,7 +21,6 @@
 
 #include <Image.h>
 
-#include "ImgWidget.h"
 #include "FlipOp.h"
 
 using namespace std;
diff --git a/app/Operations/IFFTOp.cpp b/app/Operations/IFFTOp.cpp
index 86fada1c549d627591d3359ea56b561e48eb5f6f..0cfa60b4e9b8d0c2d003db9aa252a6fa28171802 100644
--- a/app/Operations/IFFTOp.cpp
+++ b/app/Operations/IFFTOp.cpp
@@ -26,7 +26,6 @@
 #include <QRadioButton>
 
 #include "IFFTOp.h"
-#include "ImgWidget.h"
 #include "../Tools.h"
 #include "../Algorithms/FFT.h"
 #include <cmath>
@@ -100,6 +99,7 @@ void IFFTOp::operator()(const imagein::Image_t<double>*, const map<const imagein
 
         const Image_t<double>* magnitudeImg = magtdImgBox->currentImage();
         const Image_t<double>* phaseImg = phaseImgBox->currentImage();
+        if(magnitudeImg == NULL || phaseImg == NULL) return;
         unsigned int width = min(nearestUpPower2(magnitudeImg->getWidth()), nearestUpPower2(phaseImg->getWidth()));
         unsigned int height = min(nearestUpPower2(magnitudeImg->getHeight()), nearestUpPower2(phaseImg->getHeight()));
         unsigned int channels = min(magnitudeImg->getNbChannels(), phaseImg->getNbChannels());
@@ -151,6 +151,7 @@ void IFFTOp::operator()(const imagein::Image_t<double>*, const map<const imagein
 
         const Image_t<double>* realImg = realImgBox->currentImage();
         const Image_t<double>* imagImg = imagImgBox->currentImage();
+        if(realImg == NULL || imagImg == NULL) return;
         unsigned int width = min(nearestUpPower2(realImg->getWidth()), nearestUpPower2(imagImg->getWidth()));
         unsigned int height = min(nearestUpPower2(realImg->getHeight()), nearestUpPower2(imagImg->getHeight()));
         unsigned int channels = min(realImg->getNbChannels(), imagImg->getNbChannels());
diff --git a/app/Operations/PointOp.cpp b/app/Operations/PointOp.cpp
index e4f86cf89b49f73b86fb900c4a139704bd5cbb2c..535c4b5fddfe9b96027c01c42c2158101645e1dc 100644
--- a/app/Operations/PointOp.cpp
+++ b/app/Operations/PointOp.cpp
@@ -30,7 +30,6 @@
 #include <QGroupBox>
 
 #include "PointOp.h"
-#include "ImgWidget.h"
 #include <Widgets/ImageListBox.h>
 #include <Widgets/ImageWidgets/StandardImageWindow.h>
 #include <Widgets/ImageWidgets/DoubleImageWindow.h>
diff --git a/app/Operations/RotateOp.cpp b/app/Operations/RotateOp.cpp
index 0338e6efb33ee7da7131dd6240041a14eee7e81a..659ebcfc9fb80c606f5c15faa1ebf08a8f572ae1 100644
--- a/app/Operations/RotateOp.cpp
+++ b/app/Operations/RotateOp.cpp
@@ -23,8 +23,6 @@
 #include <QSpinBox>
 #include <QCheckBox>
 
-#include "ImgWidget.h"
-
 #include "RotateOp.h"
 #include "../Tools.h"
 
diff --git a/app/Operations/SplitColorOp.cpp b/app/Operations/SplitColorOp.cpp
index aaad265d9ecd036ea0ecf8f90ad7b8a50ebb3b3b..2ae27c83a91559c57733824b50ef4692cecc31b9 100644
--- a/app/Operations/SplitColorOp.cpp
+++ b/app/Operations/SplitColorOp.cpp
@@ -18,8 +18,6 @@
 */
 #include <GrayscaleImage.h>
 
-#include "ImgWidget.h"
-
 #include "SplitColorOp.h"
 #include "../Tools.h"
 
diff --git a/app/Operations/ThresholdOp.cpp b/app/Operations/ThresholdOp.cpp
index b2731a788d307a2fa0c0f2a5cd0dc98c43860786..fd08985a1c40a2fc0b94a711099850b5a42ee04f 100644
--- a/app/Operations/ThresholdOp.cpp
+++ b/app/Operations/ThresholdOp.cpp
@@ -1,5 +1,3 @@
-#include "ImgWidget.h"
-
 #include "Algorithm/Binarization.h"
 #include "Converter.h"
 
diff --git a/app/Operations/TranslateOp.cpp b/app/Operations/TranslateOp.cpp
index f33c72db723d4a4c718f4a4f230c291f826c8bd7..b05f5d680edd14a0e403b29a3d995aa88d6bae70 100644
--- a/app/Operations/TranslateOp.cpp
+++ b/app/Operations/TranslateOp.cpp
@@ -4,8 +4,6 @@
 #include <QSpinBox>
 #include <QCheckBox>
 
-#include "ImgWidget.h"
-
 #include "TranslateOp.h"
 #include "../Tools.h"
 using namespace std;
diff --git a/app/Services/OperationService.cpp b/app/Services/OperationService.cpp
index 1a22784c30e754062f28a4cb4b344e6b8db30f63..f641356a0831144de466841b8f21f284897254c9 100644
--- a/app/Services/OperationService.cpp
+++ b/app/Services/OperationService.cpp
@@ -21,7 +21,6 @@
 #include <GenericInterface.h>
 #include <Widgets/ImageWidgets/DoubleImageWindow.h>
 #include <Widgets/ImageWidgets/StandardImageWindow.h>
-#include <ImgWidget.h>
 #include "EIImageService.h"
 
 #include <QMessageBox>
diff --git a/core/Operation.h b/core/Operation.h
index de7893d802b4b1396acb4fe3af676f09e5a60c6f..bc98465761658078fdb15309af5ce3bf2e9bae0d 100644
--- a/core/Operation.h
+++ b/core/Operation.h
@@ -23,7 +23,6 @@
 #include <map>
 #include <string>
 
-#include "Output.h"
 #include "Image.h"
 
 class QWidget;
diff --git a/core/PlugOperation.cpp b/core/PlugOperation.cpp
index 51173599eb4856c86a808a597bf64ac470fedd74..669585fa6af2950ab912b6552bd8326649acae14 100644
--- a/core/PlugOperation.cpp
+++ b/core/PlugOperation.cpp
@@ -43,10 +43,6 @@ void PlugOperation::addInput(const Input& input) {
     this->_inputs.push_back(input.clone());
 }
 
-void PlugOperation::addOutput(const Output& output) {
-    _outputs.push_back(output.clone());
-}
-
 bool PlugOperation::isValidImgWnd(const genericinterface::ImageWindow* imgWnd) const {
     if(!this->needCurrentImg()) {
         return true;
diff --git a/core/PlugOperation.h b/core/PlugOperation.h
index cf800b4718d52910ea9e3ccf85421e172133c92c..2baa8da720fda38c32da8a36df35516084c82d1b 100644
--- a/core/PlugOperation.h
+++ b/core/PlugOperation.h
@@ -25,7 +25,6 @@
 
 #include "Input.h"
 #include "Parameter.h"
-#include "Output.h"
 #include <Image.h>
 #include "Operation.h"
 
diff --git a/plugins/Segmentation/segmentation.cpp b/plugins/Segmentation/segmentation.cpp
index 4cc39217070639514b8ce8f35b219be71d6c9764..3cfe55bbc9a2cbde668db5d3dea7b5632e5891de 100644
--- a/plugins/Segmentation/segmentation.cpp
+++ b/plugins/Segmentation/segmentation.cpp
@@ -73,6 +73,7 @@ class Dithering : public PlugOperation {
   public:
     Dithering() : PlugOperation("Dithering") {
         this->addParam(CurrentImg(), &Dithering::img);
+//        this->addParam(ImgParam("Image"), &Dithering::img);
     }
     
     void operation() {