diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/ecl/SimpleEclExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/ecl/SimpleEclExecutor.java
index c3db5d9..579ea71 100644
--- a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/ecl/SimpleEclExecutor.java
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/ecl/SimpleEclExecutor.java
@@ -29,24 +29,37 @@
 import org.slf4j.LoggerFactory;
 
 /**
- * The ECL executor
+ * The ECL executor.
+ *
  * @author Sina Madani
  * @since 1.6
  */
 public class SimpleEclExecutor implements EpsilonLanguageExecutor<MatchTrace> {
 
 	static final Logger logger = LoggerFactory.getLogger(SimpleEclExecutor.class);
-	private final IEclModule module;
-	private final ModuleWrap helper;
 	
+	private final IEclModule module;
+	
+	private final ModuleWrap delegate;
+	
+	/**
+	 * Instantiates a new simple ECL executor that uses an {@link EclModule} as its module.
+	 * @ee {@link EclModule}
+	 */
 	public SimpleEclExecutor() {
 		this(new EclModule());
 	}
 	
+	/**
+	 * Instantiates a new simple ECL executor that uses the provided {@link IEclModule}.
+	 * @see IEclModule
+	 *
+	 * @param mdl 					the ECL module to use
+	 */
 	public SimpleEclExecutor(IEclModule mdl) {
 		logger.info("Creating the EclExecutor");
 		module = mdl;
-		helper = new ModuleWrap(module);
+		delegate = new ModuleWrap(module);
 	}
 
 	@Override
@@ -56,43 +69,43 @@
 	}
 
 	public boolean parse(File file) throws Exception {
-		return helper.parse(file);
+		return delegate.parse(file);
 	}
 
 	public boolean parse(String code) throws Exception {
-		return helper.parse(code);
+		return delegate.parse(code);
 	}
 
 	public List<ParseProblem> getParseProblems() {
-		return helper.getParseProblems();
+		return delegate.getParseProblems();
 	}
 
 	public void addModels(Collection<IModel> models) {
-		helper.addModels(models);
+		delegate.addModels(models);
 	}
 
 	public void addParamters(Map<String, ?> parameters) {
-		helper.addParamters(parameters);
+		delegate.addParamters(parameters);
 	}
 
 	public void addNativeTypeDelegates(Collection<IToolNativeTypeDelegate> nativeDelegates) {
-		helper.addNativeTypeDelegates(nativeDelegates);
+		delegate.addNativeTypeDelegates(nativeDelegates);
 	}
 
 	public Optional<RuleProfiler> getRuleProfiler() {
-		return helper.getRuleProfiler();
+		return delegate.getRuleProfiler();
 	}
 
 	public void disposeModelRepository() {
-		helper.disposeModelRepository();
+		delegate.disposeModelRepository();
 	}
 
 	public void clearModelRepository() {
-		helper.clearModelRepository();
+		delegate.clearModelRepository();
 	}
 
 	public void dispose() {
-		helper.dispose();
+		delegate.dispose();
 	}
 
 	public void preProcess() {
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/SimpleEglExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/SimpleEglExecutor.java
index 1ae4e25..7bdb08d 100644
--- a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/SimpleEglExecutor.java
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/SimpleEglExecutor.java
@@ -28,28 +28,48 @@
 import org.slf4j.LoggerFactory;
 
 /**
- * The EGL executor
+ * The EGL executor.
+ *
  * @author Horacio Hoyos Rodriguez
  * @since 1.6
  */
 public class SimpleEglExecutor implements EpsilonLanguageExecutor<Optional<String>> {
 
 	private static final Logger logger = LoggerFactory.getLogger(SimpleEglExecutor.class);
+	
 	private EglTemplateFactoryModuleAdapter module;
-	private ModuleWrap helper;
+	
+	private ModuleWrap delegate;
 
+	/**
+	 * Instantiates a new simple EGL executor that uses an {@link EglTemplateFactoryModuleAdapter}
+	 * (with an {@link EglTemplateFactory}) as its module.
+	 * @see EglTemplateFactoryModuleAdapter
+	 * @see EglTemplateFactory
+	 */
 	public SimpleEglExecutor() {
 		this(new EglTemplateFactoryModuleAdapter(new EglTemplateFactory()));
     }
 
+	/**
+	 * Instantiates a new simple EGL executor that uses an {@link EglTemplateFactoryModuleAdapter}
+	 * with the provided {@link EglTemplateFactory}
+	 *
+	 * @param templateFactory 		the template factory to use 
+	 */
 	public SimpleEglExecutor(EglTemplateFactory templateFactory) {
 		this(new EglTemplateFactoryModuleAdapter(templateFactory));
 	}
 	
+	/**
+	 * Instantiates a new simple EGL executor that uses the provided {@link EglTemplateFactoryModuleAdapter}
+	 *
+	 * @param mdl 					the Template Factory Module Adapter to use
+	 */
 	public SimpleEglExecutor(EglTemplateFactoryModuleAdapter mdl) {
 		logger.info("Creating the EglExecutor");
 		module = mdl;
-    	helper = new ModuleWrap(module);
+    	delegate = new ModuleWrap(module);
 	}
 	
 	@Override
@@ -61,52 +81,52 @@
 
 	@Override
 	public boolean parse(File file) throws Exception {
-		return helper.parse(file);
+		return delegate.parse(file);
 	}
 
 	@Override
 	public boolean parse(String code) throws Exception {
-		return helper.parse(code);
+		return delegate.parse(code);
 	}
 
 	@Override
 	public List<ParseProblem> getParseProblems() {
-		return helper.getParseProblems();
+		return delegate.getParseProblems();
 	}
 
 	@Override
 	public void addModels(Collection<IModel> models) {
-		helper.addModels(models);
+		delegate.addModels(models);
 	}
 
 	@Override
 	public void addParamters(Map<String, ?> parameters) {
-		helper.addParamters(parameters);
+		delegate.addParamters(parameters);
 	}
 
 	@Override
 	public void addNativeTypeDelegates(Collection<IToolNativeTypeDelegate> nativeDelegates) {
-		helper.addNativeTypeDelegates(nativeDelegates);
+		delegate.addNativeTypeDelegates(nativeDelegates);
 	}
 
 	@Override
 	public Optional<RuleProfiler> getRuleProfiler() {
-		return helper.getRuleProfiler();
+		return delegate.getRuleProfiler();
 	}
 
 	@Override
 	public void disposeModelRepository() {
-		helper.disposeModelRepository();
+		delegate.disposeModelRepository();
 	}
 
 	@Override
 	public void clearModelRepository() {
-		helper.clearModelRepository();
+		delegate.clearModelRepository();
 	}
 
 	@Override
 	public void dispose() {
-		helper.dispose();
+		delegate.dispose();
 	}
 
 	@Override
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/SimpleEgxExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/SimpleEgxExecutor.java
index dcdbdc9..544ad4c 100644
--- a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/SimpleEgxExecutor.java
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/SimpleEgxExecutor.java
@@ -29,7 +29,8 @@
 import org.slf4j.LoggerFactory;
 
 /**
- * The EGX executor
+ * The EGX executor.
+ *
  * @author Horacio Hoyos Rodriguez
  * @since 1.6
  */
@@ -37,20 +38,38 @@
 
 	private static final Logger logger = LoggerFactory.getLogger(SimpleEgxExecutor.class);
 	private IEgxModule module;
-	private ModuleWrap helper;
+	private ModuleWrap delegate;
 	
+	/**
+	 * Instantiates a new simple EGX executor that uses an {@link EgxModule} as its module.
+	 * @see EgxModule
+	 */
 	public SimpleEgxExecutor() {
 		this(new EgxModule());
 	}
 	
+	/**
+	 * Instantiates a new simple EGX executor that uses the provided {@link EglTemplateFactory}
+	 * to create a new {@link EgxModule} to use as its module
+	 * @see EglTemplateFactory
+	 * @see EgxModule
+	 *
+	 * @param templateFactory 		the template factory to use
+	 */
 	public SimpleEgxExecutor(EglTemplateFactory templateFactory) {
 		this(new EgxModule(templateFactory));
 	}
 	
+	/**
+	 * Instantiates a new simple EGX executor with the provided {@link IEgxModule}.
+	 * @see IEgxModule
+	 *
+	 * @param mdl 					the module
+	 */
 	public SimpleEgxExecutor(IEgxModule mdl) {
 		logger.info("Creating the EgxExecutor");
 		module = mdl;
-		helper = new ModuleWrap(module);
+		delegate = new ModuleWrap(module);
 	}
 	
 	@Override
@@ -60,43 +79,43 @@
 	}
 
 	public boolean parse(File file) throws Exception {
-		return helper.parse(file);
+		return delegate.parse(file);
 	}
 
 	public boolean parse(String code) throws Exception {
-		return helper.parse(code);
+		return delegate.parse(code);
 	}
 
 	public List<ParseProblem> getParseProblems() {
-		return helper.getParseProblems();
+		return delegate.getParseProblems();
 	}
 
 	public void addModels(Collection<IModel> models) {
-		helper.addModels(models);
+		delegate.addModels(models);
 	}
 
 	public void addParamters(Map<String, ?> parameters) {
-		helper.addParamters(parameters);
+		delegate.addParamters(parameters);
 	}
 
 	public void addNativeTypeDelegates(Collection<IToolNativeTypeDelegate> nativeDelegates) {
-		helper.addNativeTypeDelegates(nativeDelegates);
+		delegate.addNativeTypeDelegates(nativeDelegates);
 	}
 
 	public Optional<RuleProfiler> getRuleProfiler() {
-		return helper.getRuleProfiler();
+		return delegate.getRuleProfiler();
 	}
 
 	public void disposeModelRepository() {
-		helper.disposeModelRepository();
+		delegate.disposeModelRepository();
 	}
 
 	public void clearModelRepository() {
-		helper.clearModelRepository();
+		delegate.clearModelRepository();
 	}
 
 	public void dispose() {
-		helper.dispose();
+		delegate.dispose();
 	}
 
 	public void preProcess() {
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eml/SimpleEmlExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eml/SimpleEmlExecutor.java
index b606742..838d748 100644
--- a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eml/SimpleEmlExecutor.java
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eml/SimpleEmlExecutor.java
@@ -29,7 +29,7 @@
 import org.slf4j.LoggerFactory;
 
 /**
- * The EML executor
+ * The EML executor.
  *
  * @author Horacio Hoyos Rodriguez
  * @since 1.6
@@ -38,16 +38,26 @@
 
     private static final Logger logger = LoggerFactory.getLogger(SimpleEmlExecutor.class);
 	private IEtlModule module;
-	private ModuleWrap helper;
+	private ModuleWrap delegate;
 	
+    /**
+     * Instantiates a new simple EML executor that uses an {@link EtlModule} as its module.
+     * @see EtlModule
+     */
     public SimpleEmlExecutor() {
     	this(new EtlModule());
     }
     
+    /**
+     * Instantiates a new simple EML executor that uses the provided {@link IEtlModule} as its module.
+     * @see IEtlModule
+     *
+     * @param mdl 					the module
+     */
     public SimpleEmlExecutor(IEtlModule mdl) {
     	logger.info("Creating the EtlExecutor");
     	module = mdl;
-    	helper = new ModuleWrap(module);
+    	delegate = new ModuleWrap(module);
     }
     
 	@Override
@@ -58,43 +68,43 @@
 	}
 
 	public boolean parse(File file) throws Exception {
-		return helper.parse(file);
+		return delegate.parse(file);
 	}
 
 	public boolean parse(String code) throws Exception {
-		return helper.parse(code);
+		return delegate.parse(code);
 	}
 
 	public List<ParseProblem> getParseProblems() {
-		return helper.getParseProblems();
+		return delegate.getParseProblems();
 	}
 
 	public void addModels(Collection<IModel> models) {
-		helper.addModels(models);
+		delegate.addModels(models);
 	}
 
 	public void addParamters(Map<String, ?> parameters) {
-		helper.addParamters(parameters);
+		delegate.addParamters(parameters);
 	}
 
 	public void addNativeTypeDelegates(Collection<IToolNativeTypeDelegate> nativeDelegates) {
-		helper.addNativeTypeDelegates(nativeDelegates);
+		delegate.addNativeTypeDelegates(nativeDelegates);
 	}
 
 	public Optional<RuleProfiler> getRuleProfiler() {
-		return helper.getRuleProfiler();
+		return delegate.getRuleProfiler();
 	}
 
 	public void disposeModelRepository() {
-		helper.disposeModelRepository();
+		delegate.disposeModelRepository();
 	}
 
 	public void clearModelRepository() {
-		helper.clearModelRepository();
+		delegate.clearModelRepository();
 	}
 
 	public void dispose() {
-		helper.dispose();
+		delegate.dispose();
 	}
 
 	public void preProcess() {
@@ -106,7 +116,7 @@
 	}
 
 	public boolean equals(Object obj) {
-		return helper.equals(obj);
+		return delegate.equals(obj);
 	}
 
 
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eol/SimpleEolExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eol/SimpleEolExecutor.java
index 55b0660..798de09 100644
--- a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eol/SimpleEolExecutor.java
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eol/SimpleEolExecutor.java
@@ -28,6 +28,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+// TODO: Auto-generated Javadoc
 /**
  * The EOL executor
  *
@@ -49,30 +50,76 @@
 	private final List<Object> arguments;
 	private final EolMode mode;
 	private IEolModule module;
-	private ModuleWrap helper;
+	private ModuleWrap delegate;
 	
+	/**
+	 * Instantiates a new simple EOL executor that uses an {@link EolModuleParallel} (with one 
+	 * thread) as its module.
+	 * This executor will execute the complete code/script.
+	 * @see EolModuleParallel
+	 */
 	public SimpleEolExecutor() {
 		this(null, Collections.emptyList());
 	}
 	
+	/**
+	 * Instantiates a new simple EOL executor hat uses the provided {@link IEolModule} module.
+	 * @see IEolModule
+	 *
+	 * @param mdl 					the module
+	 */
 	public SimpleEolExecutor(IEolModule mdl) {
 		this(null, Collections.emptyList(), mdl);
 	}
 	
+	/**
+	 * Instantiates a new simple EOL executor that uses an {@link EolModuleParallel} (with one 
+	 * thread) as its module, but that will only execute a single operation within the code/script.
+	 * The constructor accepts a list of arguments to pass to the operation, i.e. arguments are
+	 * position based.
+	 * @see EolModuleParallel
+	 * 
+	 *
+	 * @param oprtnNm 				the name of the operation to invoke
+	 * @param arguments 			the arguments to be passed to the operation (position based).
+	 * 								
+	 */
 	public SimpleEolExecutor(String oprtnNm, List<Object> arguments) {
 		this(oprtnNm, arguments, 1);
 	}
 	
+	/**
+	 * Instantiates a new simple EOL executor that uses an {@link EolModuleParallel} (with one 
+	 * thread) as its module, but that will only execute a single operation within the code/script.
+	 * The constructor accepts a list of arguments to pass to the operation, i.e. arguments are
+	 * position based. Additionally, the number of threads to use can also be specified.
+	 * @see EolModuleParallel
+	 *
+	 * @param oprtnNm 				the name of the operation to invoke
+	 * @param arguments 			the arguments to be passed to the operation (position based).
+	 * @param nmbrThrds the nmbr thrds
+	 */
 	public SimpleEolExecutor(String oprtnNm, List<Object> argmnts, int nmbrThrds) {
 		this(oprtnNm, argmnts, new EolModuleParallel(nmbrThrds));
 	}
 	
+	/**
+	 * Instantiates a new simple EOL executor that the provided {@link IEolModule} as its module,
+	 * but that will only execute a single operation within the code/script.
+	 * The constructor accepts a list of arguments to pass to the operation, i.e. arguments are
+	 * position based. Additionally, the number of threads to use can also be specified.
+	 * @see EolModuleParallel
+	 *
+	 * @param oprtnNm 				the name of the operation to invoke
+	 * @param arguments 			the arguments to be passed to the operation (position based).
+	 * @param mdl 					the module
+	 */
 	public SimpleEolExecutor(String oprtnNm, List<Object> argmnts, IEolModule mdl) {
 		operationName = Optional.ofNullable(oprtnNm);
 		mode = operationName.isPresent() ? EolMode.OPERATION : EolMode.SCRIPT;
 		arguments = argmnts;
 		module = mdl;
-		helper = new ModuleWrap(module);
+		delegate = new ModuleWrap(module);
 	}
 
 	@Override
@@ -102,43 +149,43 @@
 	}
 
 	public boolean parse(File file) throws Exception {
-		return helper.parse(file);
+		return delegate.parse(file);
 	}
 
 	public boolean parse(String code) throws Exception {
-		return helper.parse(code);
+		return delegate.parse(code);
 	}
 
 	public List<ParseProblem> getParseProblems() {
-		return helper.getParseProblems();
+		return delegate.getParseProblems();
 	}
 
 	public void addModels(Collection<IModel> models) {
-		helper.addModels(models);
+		delegate.addModels(models);
 	}
 
 	public void addParamters(Map<String, ?> parameters) {
-		helper.addParamters(parameters);
+		delegate.addParamters(parameters);
 	}
 
 	public void addNativeTypeDelegates(Collection<IToolNativeTypeDelegate> nativeDelegates) {
-		helper.addNativeTypeDelegates(nativeDelegates);
+		delegate.addNativeTypeDelegates(nativeDelegates);
 	}
 
 	public Optional<RuleProfiler> getRuleProfiler() {
-		return helper.getRuleProfiler();
+		return delegate.getRuleProfiler();
 	}
 
 	public void disposeModelRepository() {
-		helper.disposeModelRepository();
+		delegate.disposeModelRepository();
 	}
 
 	public void clearModelRepository() {
-		helper.clearModelRepository();
+		delegate.clearModelRepository();
 	}
 
 	public void dispose() {
-		helper.dispose();
+		delegate.dispose();
 	}
 
 	public void preProcess() {
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/SimpleEtlExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/SimpleEtlExecutor.java
index 985a244..0c7202b 100644
--- a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/SimpleEtlExecutor.java
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/SimpleEtlExecutor.java
@@ -38,17 +38,26 @@
 
     private static final Logger logger = LoggerFactory.getLogger(SimpleEtlExecutor.class);
     private IEtlModule module;
-    private ModuleWrap helper;
+    private ModuleWrap delegate;
 
+    /**
+     * Instantiates a new simple ETL executor that uses an {@link EtlModule} as its module.
+     * @see EtlModule
+     */
     public SimpleEtlExecutor() {
-    	this(new EtlModule());
-    	
+    	this(new EtlModule());	
     }
     
+    /**
+    * Instantiates a new simple ETL executor that uses the provided {@link IEtlModule} as its module.
+    * @see IEtlModule
+    *
+    * @param mdl 					the module
+    */
     public SimpleEtlExecutor(IEtlModule mdl) {
     	logger.info("Creating the Etl Executor");
     	module = mdl;
-    	helper = new ModuleWrap(module);
+    	delegate = new ModuleWrap(module);
     }
     
 
@@ -58,43 +67,43 @@
 	}
 
 	public boolean parse(File file) throws Exception {
-		return helper.parse(file);
+		return delegate.parse(file);
 	}
 
 	public boolean parse(String code) throws Exception {
-		return helper.parse(code);
+		return delegate.parse(code);
 	}
 
 	public List<ParseProblem> getParseProblems() {
-		return helper.getParseProblems();
+		return delegate.getParseProblems();
 	}
 
 	public void addModels(Collection<IModel> models) {
-		helper.addModels(models);
+		delegate.addModels(models);
 	}
 
 	public void addParamters(Map<String, ?> parameters) {
-		helper.addParamters(parameters);
+		delegate.addParamters(parameters);
 	}
 
 	public void addNativeTypeDelegates(Collection<IToolNativeTypeDelegate> nativeDelegates) {
-		helper.addNativeTypeDelegates(nativeDelegates);
+		delegate.addNativeTypeDelegates(nativeDelegates);
 	}
 
 	public Optional<RuleProfiler> getRuleProfiler() {
-		return helper.getRuleProfiler();
+		return delegate.getRuleProfiler();
 	}
 
 	public void disposeModelRepository() {
-		helper.disposeModelRepository();
+		delegate.disposeModelRepository();
 	}
 
 	public void clearModelRepository() {
-		helper.clearModelRepository();
+		delegate.clearModelRepository();
 	}
 
 	public void dispose() {
-		helper.dispose();
+		delegate.dispose();
 	}
 
 	public void preProcess() {
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/EvlExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/EvlExecutor.java
index 16a8b7a..06a5c39 100644
--- a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/EvlExecutor.java
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/EvlExecutor.java
@@ -29,27 +29,55 @@
 public interface EvlExecutor extends EpsilonLanguageExecutor<Collection<UnsatisfiedConstraint>>  {
     
     /**
-     * Send the unsatisfied constraints to the log, using the implementation logger
+     * Send the unsatisfied constraints to the log, using the implementation logger.
+     *
+     * @param unsatisfiedConstraints the unsatisfied constraints
      */
     void logUnsatisfied(Collection<UnsatisfiedConstraint> unsatisfiedConstraints);
     
     /**
-     * Pretty print the unsatisfied constraints
+     * Pretty print the unsatisfied constraints.
+     *
+     * @param unsatisfiedConstraints the unsatisfied constraints
      */
     void printUnsatisfied(Collection<UnsatisfiedConstraint> unsatisfiedConstraints);
     
     /**
-     * Pretty print the unsatisfied constraints using the specified printer
+     * Pretty print the unsatisfied constraints using the specified printer.
+     *
+     * @param unsatisfiedConstraints the unsatisfied constraints
+     * @param writer the writer
      */
     void printUnsatisfied(Collection<UnsatisfiedConstraint> unsatisfiedConstraints, PrintWriter writer);
     
 
+	/**
+	 * Gets the constraints found in the code/script
+	 *
+	 * @return the constraints
+	 */
 	List<Constraint> getConstraints();
 
+	/**
+	 * Gets the constraint contexts found in the code/script
+	 *
+	 * @return the constraint contexts
+	 */
 	List<ConstraintContext> getConstraintContexts();
 
+	/**
+	 * Gets the constraint context with a given name
+	 *
+	 * @param name the name
+	 * @return the constraint context
+	 */
 	ConstraintContext getConstraintContext(String name);
 
+	/**
+	 * Gets the unsatisfied constraints. This method should be called after execution.
+	 *
+	 * @return the unsatisfied constraints
+	 */
 	Set<UnsatisfiedConstraint> getUnsatisfiedConstraints();
     
 }
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/SimpleEvlExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/SimpleEvlExecutor.java
index dbfc283..2e1df70 100644
--- a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/SimpleEvlExecutor.java
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/SimpleEvlExecutor.java
@@ -37,7 +37,8 @@
 import org.slf4j.LoggerFactory;
 
 /**
- * The EVL executor
+ * The EVL executor.
+ *
  * @author Horacio Hoyos Rodriguez
  * @since 1.6
  */
@@ -45,30 +46,65 @@
 
 	private static final Logger logger = LoggerFactory.getLogger(SimpleEvlExecutor.class);
 	private final IEvlModule module;
-	private ModuleWrap helper;
+	private ModuleWrap delegate;
 	
-	public SimpleEvlExecutor(IEvlModule mdl) {
-		logger.info("Creating the EvlExecutor");
-		module = mdl;
-		helper = new ModuleWrap(module);
-	}
-	
+	/**
+	 * Instantiates a new simple EVL executor that uses an {@link EvlModule} as its module and
+	 * a {@link CommandLineFixer} as a constraint fixer.
+	 * @see EvlModule
+	 * @see EvlModule
+	 */
 	public SimpleEvlExecutor() {
-		this(false, 0, null);
-    }
-	
-	public SimpleEvlExecutor(IEvlFixer evlFixer) {
-		this(false, 0, evlFixer);
-    }
-	
-	public SimpleEvlExecutor(boolean useParallel) {
-		this(useParallel, 1, new CommandLineFixer());
+		this(new EvlModule(), new CommandLineFixer());
     }
     
-	public SimpleEvlExecutor(boolean useParallel, int parallelism, IEvlFixer evlFixer) {
-		this(useParallel ? new EvlModuleParallelElements(parallelism) : new EvlModule());
-		module.setUnsatisfiedConstraintFixer(evlFixer);
+	/**
+	 * Instantiates a new simple EVL executor that uses an {@link EvlModuleParallelElements} as its
+	 * module, with the provided number of threads.
+	 *
+	 * @param parallelism 			the parallelism to use
+	 */
+	public SimpleEvlExecutor(int parallelism) {
+		this(new EvlModuleParallelElements(parallelism), new CommandLineFixer());
     }
+	
+	/**
+	 * Instantiates a new simple EVL executor that uses an {@link EvlModule} as its module and
+	 * the provided {@link IEvlFixer} as a constraint fixer.
+	 *
+	 * @param evlFixer 				the fixer to use
+	 */
+	public SimpleEvlExecutor(IEvlFixer evlFixer) {
+		this(new EvlModule(), evlFixer);
+    }
+    
+	/**
+	 * Instantiates a new simple EVL executor that uses an {@link EvlModuleParallelElements} as its
+	 * module and the provided {@link IEvlFixer} as a constraint fixer, with the provided number of
+	 * threads.
+	 *
+	 * @param parallelism 			the parallelism o use
+	 * @param evlFixer 				the fixer to use
+	 */
+	public SimpleEvlExecutor(int parallelism, IEvlFixer evlFixer) {
+		this(new EvlModuleParallelElements(parallelism), evlFixer);
+    }
+    
+	/**
+	 * Instantiates a new simple EVL executor that uses the provided {@link IEvlModule} module and
+	 * the provided {@link IEvlFixer} as a constraint fixer.
+	 *
+	 * @param mdl 					the module
+	 * @param evlFixer 				the fixer
+	 */
+	public SimpleEvlExecutor(IEvlModule mdl, IEvlFixer evlFixer) {
+		logger.info("Creating the EvlExecutor");
+		module = mdl;
+		delegate = new ModuleWrap(module);
+		if (module.getUnsatisfiedConstraintFixer() == null) {
+			
+		}
+	}
     
 	@Override
 	public Collection<UnsatisfiedConstraint> execute() throws EolRuntimeException {
@@ -96,43 +132,43 @@
 	}
 
 	public boolean parse(File file) throws Exception {
-		return helper.parse(file);
+		return delegate.parse(file);
 	}
 
 	public boolean parse(String code) throws Exception {
-		return helper.parse(code);
+		return delegate.parse(code);
 	}
 
 	public List<ParseProblem> getParseProblems() {
-		return helper.getParseProblems();
+		return delegate.getParseProblems();
 	}
 
 	public void addModels(Collection<IModel> models) {
-		helper.addModels(models);
+		delegate.addModels(models);
 	}
 
 	public void addParamters(Map<String, ?> parameters) {
-		helper.addParamters(parameters);
+		delegate.addParamters(parameters);
 	}
 
 	public void addNativeTypeDelegates(Collection<IToolNativeTypeDelegate> nativeDelegates) {
-		helper.addNativeTypeDelegates(nativeDelegates);
+		delegate.addNativeTypeDelegates(nativeDelegates);
 	}
 
 	public Optional<RuleProfiler> getRuleProfiler() {
-		return helper.getRuleProfiler();
+		return delegate.getRuleProfiler();
 	}
 
 	public void disposeModelRepository() {
-		helper.disposeModelRepository();
+		delegate.disposeModelRepository();
 	}
 
 	public void clearModelRepository() {
-		helper.clearModelRepository();
+		delegate.clearModelRepository();
 	}
 
 	public void dispose() {
-		helper.dispose();
+		delegate.dispose();
 	}
 
 	public void preProcess() {
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/ICachedModelBuilder.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/ICachedModelBuilder.java
index 080b28a..13a037a 100644
--- a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/ICachedModelBuilder.java
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/ICachedModelBuilder.java
@@ -21,7 +21,12 @@
  * @since 1.6
  */
 public interface ICachedModelBuilder<M extends IModel, T extends ICachedModelBuilder<M, T>> extends IModelBuilder<M, T> {
-
+	
+	/**
+	 * Set the useCache for th emodel
+	 * @param useCache
+	 * @return
+	 */
     T useCache(boolean useCache);
     
 }
