diff --git a/build.gradle b/build.gradle
index 7348f5134a49d4e0231a68894601c7c8684af1d6..60b72b700ec5d34db48006da121885e5adc6b4d4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -31,4 +31,12 @@ subprojects {
 	artifacts {
 		testArtifacts testJar
 	}
+
+	dependencies {
+		compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
+		compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
+		testCompile group: 'junit', name: 'junit', version: '4.12'
+		testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
+	}
+
 }
diff --git a/commons.color/build.gradle b/commons.color/build.gradle
index 63aaa8c27c349e4344e22ff400b6d8d7ec5a4ed5..b94df8ebb2332f7ee82611202e287541a285d86b 100644
--- a/commons.color/build.gradle
+++ b/commons.color/build.gradle
@@ -7,12 +7,7 @@ apply plugin: 'java'
 sourceCompatibility = 1.8
 
 dependencies {
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
     compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 sourceSets {
diff --git a/eraser-base/build.gradle b/eraser-base/build.gradle
index e189105a0445201a126fd12562c634e0ec55047e..78903e66d8d681ff431c671c6e17c75145bfdce4 100644
--- a/eraser-base/build.gradle
+++ b/eraser-base/build.gradle
@@ -6,16 +6,13 @@ apply plugin: 'jastadd'
 apply plugin: 'application'
 apply plugin: 'jacoco'
 apply plugin: 'idea'
+apply plugin: 'distribution'
 
 dependencies {
     compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
     compile group: 'net.sf.beaver', name: 'beaver-rt', version: '0.9.11'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
     compile group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
-    compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
     compile group: 'org.influxdb', name: 'influxdb-java', version: '2.15'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
     testCompile group: 'org.testcontainers', name: 'testcontainers', version: '1.11.2'
     testCompile group: 'org.testcontainers', name: 'influxdb', version: '1.11.2'
     testCompile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.2'
diff --git a/eraser-base/src/main/java/de/tudresden/inf/st/eraser/Main.java b/eraser-base/src/main/java/de/tudresden/inf/st/eraser/Main.java
index 40b84e5a8ceb1638204bd11647729bdae361a104..9b9aaba5b25e860177545415c5ca1c088a3e7165 100644
--- a/eraser-base/src/main/java/de/tudresden/inf/st/eraser/Main.java
+++ b/eraser-base/src/main/java/de/tudresden/inf/st/eraser/Main.java
@@ -6,8 +6,6 @@ import de.tudresden.inf.st.eraser.jastadd.model.Root;
 import de.tudresden.inf.st.eraser.openhab2.OpenHab2Importer;
 import de.tudresden.inf.st.eraser.openhab2.mqtt.MQTTUpdater;
 import de.tudresden.inf.st.eraser.util.ParserUtils;
-import org.apache.commons.math3.linear.MatrixUtils;
-import org.apache.commons.math3.linear.RealMatrix;
 import org.apache.logging.log4j.LogManager;
 
 import java.io.*;
@@ -25,35 +23,6 @@ public class Main {
 //    Root model = importFromOpenHab();
 //    testPrinterWith(model);
 //    testUpdaterWith(model);
-    testXY_to_RGB();
-  }
-
-  private static void testXY_to_RGB() {
-    /*
-    XYZ to RGB [M]-1
-     2.0413690 -0.5649464 -0.3446944
-    -0.9692660  1.8760108  0.0415560
-     0.0134474 -0.1183897  1.0154096
-     */
-    double[][] matrixData = { { 2.0413690, -0.5649464, -0.3446944},
-                              {-0.9692660,  1.8760108,  0.0415560},
-                              { 0.0134474, -0.1183897,  1.0154096}};
-    RealMatrix mInverted = MatrixUtils.createRealMatrix(matrixData);
-    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
-
-    while (true) {
-      try {
-        double x = readFromSystemIn(in, "x:");
-        double y = readFromSystemIn(in, "y:");
-        double z = 1;
-        RealMatrix xyz = MatrixUtils.createColumnRealMatrix(new double[] {x,y,z});
-        RealMatrix result = mInverted.multiply(xyz);
-        System.out.println(result);
-      } catch (IOException | NumberFormatException e) {
-        e.printStackTrace();
-        break;
-      }
-    }
   }
 
   private static double readFromSystemIn(BufferedReader in, String prompt) throws IOException {
diff --git a/eraser.rest/build.gradle b/eraser.rest/build.gradle
index 6aabf056cc8a3cc91df17db0406d51d8397d3f6b..27a715637cd813a03182c27d332abedab4a02af0 100644
--- a/eraser.rest/build.gradle
+++ b/eraser.rest/build.gradle
@@ -23,15 +23,10 @@ sourceCompatibility = 1.8
 
 dependencies {
     compile project(':eraser-base')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
     compile 'org.springframework.boot:spring-boot-starter-web'
     compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
     compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2'
     testCompile 'org.springframework.boot:spring-boot-starter-test'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 sourceSets {
diff --git a/eraser.spark/build.gradle b/eraser.spark/build.gradle
index cfa295ace0809df462b97dc660cb134a51ee87b5..fc14267292c11e5920e2bc3b7609a45a98d6ec6c 100644
--- a/eraser.spark/build.gradle
+++ b/eraser.spark/build.gradle
@@ -12,13 +12,8 @@ sourceCompatibility = 1.8
 
 dependencies {
     compile project(':eraser-base')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
     compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.2'
     compile group: 'com.sparkjava', name: 'spark-core', version: '2.9.0'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 run {
diff --git a/eraser.starter/build.gradle b/eraser.starter/build.gradle
index ed867e4975ee02f9ba059c7e94a260ee5e6f07d8..c6d86dcf9977de6e043e469e17726aa87224fb75 100644
--- a/eraser.starter/build.gradle
+++ b/eraser.starter/build.gradle
@@ -1,6 +1,7 @@
 plugins {
     id 'java'
     id 'application'
+    id 'distribution'
     id 'io.github.http-builder-ng.http-plugin' version '0.1.1'
 }
 
@@ -20,12 +21,7 @@ dependencies {
     compile project(':feedbackloop.learner')
     compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.9.8'
     compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
     compile group: 'net.sourceforge.argparse4j', name: 'argparse4j', version: '0.8.1'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 run {
@@ -54,3 +50,13 @@ sourceSets {
         }
     }
 }
+
+distributions {
+    main {
+        contents {
+            from {
+                'src/main/resources/starter.eraser'
+            }
+        }
+    }
+}
diff --git a/feedbackloop.analyze/build.gradle b/feedbackloop.analyze/build.gradle
index 001e4fb5896345312df000f7c85ad1974bd33af2..077136f33bd04ccde2acb2cce23df7ba22c69c7a 100644
--- a/feedbackloop.analyze/build.gradle
+++ b/feedbackloop.analyze/build.gradle
@@ -9,11 +9,6 @@ apply plugin: 'java'
 dependencies {
     compile project(':eraser-base')
     compile project(':feedbackloop.api')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 sourceSets {
diff --git a/feedbackloop.api/build.gradle b/feedbackloop.api/build.gradle
index 30e40689bf9f82c73a94732a131a351cb6f918e0..0039b3d515db9d781cbbdc37c25ab42fa23fa855 100644
--- a/feedbackloop.api/build.gradle
+++ b/feedbackloop.api/build.gradle
@@ -12,11 +12,6 @@ sourceCompatibility = 1.8
 dependencies {
     compile project(':eraser-base')
     compile project(':commons.color')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
     compile group: 'org.encog', name: 'encog-core', version: '3.4'
 }
 
diff --git a/feedbackloop.execute/build.gradle b/feedbackloop.execute/build.gradle
index 001e4fb5896345312df000f7c85ad1974bd33af2..077136f33bd04ccde2acb2cce23df7ba22c69c7a 100644
--- a/feedbackloop.execute/build.gradle
+++ b/feedbackloop.execute/build.gradle
@@ -9,11 +9,6 @@ apply plugin: 'java'
 dependencies {
     compile project(':eraser-base')
     compile project(':feedbackloop.api')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 sourceSets {
diff --git a/feedbackloop.learner/build.gradle b/feedbackloop.learner/build.gradle
index 10a45023f5ea63248487abee878333f6fccca0c6..ea041e50cc38e90c333527bf039567860b29f7a8 100644
--- a/feedbackloop.learner/build.gradle
+++ b/feedbackloop.learner/build.gradle
@@ -10,11 +10,6 @@ apply plugin: 'application'
 dependencies {
     compile project(':eraser-base')
     compile project(':feedbackloop.api')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
     compile group: 'org.encog', name: 'encog-core', version: '3.4'
 }
 
diff --git a/feedbackloop.main/build.gradle b/feedbackloop.main/build.gradle
index 727c0414813930c8f11c83e3076f106a196a1d68..c5a11eda0213af9b519a5c8df62de30e8dc6b059 100644
--- a/feedbackloop.main/build.gradle
+++ b/feedbackloop.main/build.gradle
@@ -14,11 +14,6 @@ dependencies {
     compile project(':feedbackloop.analyze')
     compile project(':feedbackloop.plan')
     compile project(':feedbackloop.execute')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 run {
diff --git a/feedbackloop.monitor/build.gradle b/feedbackloop.monitor/build.gradle
index 168ec56858701d5a9416b11c87f6e379209f3bda..6b73819fad70219d9bb7465e0b3c903352bc76d7 100644
--- a/feedbackloop.monitor/build.gradle
+++ b/feedbackloop.monitor/build.gradle
@@ -10,11 +10,6 @@ apply plugin: 'application'
 dependencies {
     compile project(':eraser-base')
     compile project(':feedbackloop.api')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 run {
diff --git a/feedbackloop.plan/build.gradle b/feedbackloop.plan/build.gradle
index b7a1c8a06951a088288ec2cd4d9013eb80a1b5b1..81156210881de5442bc7d1f79e3dcefdf51c042a 100644
--- a/feedbackloop.plan/build.gradle
+++ b/feedbackloop.plan/build.gradle
@@ -10,11 +10,6 @@ apply plugin: 'application'
 dependencies {
     compile project(':eraser-base')
     compile project(':feedbackloop.api')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 run {
diff --git a/influx_test/build.gradle b/influx_test/build.gradle
index 34bbab8dda8ad948c7c16ade312ac844a62d4980..ead9dcee7f559d5c2ae9a472c8c09096692af3b2 100644
--- a/influx_test/build.gradle
+++ b/influx_test/build.gradle
@@ -9,13 +9,7 @@ apply plugin: 'application'
 
 dependencies {
     compile project(':eraser-base')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
     compile group: 'org.influxdb', name: 'influxdb-java', version: '2.15'
-
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 run {
diff --git a/integration/build.gradle b/integration/build.gradle
index b58d34a360244a44fcec72030392c1cfa40e7446..584eb25249ba3c44c928d77ac7a9368d0890daad 100644
--- a/integration/build.gradle
+++ b/integration/build.gradle
@@ -19,7 +19,4 @@ run {
 dependencies {
     compile project(':eraser-base')
     compile project(':openhab-mock')
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
 }
diff --git a/ml_test/build.gradle b/ml_test/build.gradle
index f6f854ece1a0b756a34f4e2fc045986e135ebd1a..2d500200789d52e56de89a77d453c6af7ae6d49b 100644
--- a/ml_test/build.gradle
+++ b/ml_test/build.gradle
@@ -9,11 +9,6 @@ apply plugin: 'application'
 
 dependencies {
     compile project(':eraser-base')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 run {
diff --git a/openhab-mock/build.gradle b/openhab-mock/build.gradle
index cb46c791ad5937b402503e6dc1a5fcece58bff01..4de21c3b36c9d837c46aaf3245c86ad2b717d91a 100644
--- a/openhab-mock/build.gradle
+++ b/openhab-mock/build.gradle
@@ -19,9 +19,5 @@ run {
 dependencies {
     compile project(':eraser-base')
     compile project(':commons.color')
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
     compile group: 'com.opencsv', name: 'opencsv', version: '3.8'
-    compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
 }
diff --git a/org.openhab.action.machinelearn/build.gradle b/org.openhab.action.machinelearn/build.gradle
index f81fc93d269bfe779d270f1ed65bc4e9fd2214b4..0ca194823aeeff40aa1de7f6da6c61896ff63e5b 100644
--- a/org.openhab.action.machinelearn/build.gradle
+++ b/org.openhab.action.machinelearn/build.gradle
@@ -9,14 +9,10 @@ apply plugin: 'java'
 dependencies {
     compile files('lib/weka.jar')
     compile project(':stub.org.openhab.core.scriptengine.action')
-//    compile 'org.openhab.core.library.types'
-//    compile 'org.openhab.core.scriptengine.action'
     compile group: 'org.osgi', name: 'org.osgi.framework', version: '1.9.0'
     compile group: 'org.osgi', name: 'org.osgi.service.cm', version: '1.6.0'
     compile group: 'org.osgi', name: 'org.osgi.service.component', version: '1.4.0'
     compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 sourceSets {
diff --git a/org.openlicht.action.reinforcementlearning/build.gradle b/org.openlicht.action.reinforcementlearning/build.gradle
index c54f5fa444c855baf0f34db63c059b45a6d931e5..66417e5da744784dfcb590357db19eaa1ce14bd6 100644
--- a/org.openlicht.action.reinforcementlearning/build.gradle
+++ b/org.openlicht.action.reinforcementlearning/build.gradle
@@ -10,16 +10,11 @@ apply plugin: 'java'
 dependencies {
     compile files('lib/encog-core-3.4.jar')
     compile project(':stub.org.openhab.core.scriptengine.action')
-    compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
     compile group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.annotation', version: '2.2.200'
-//    compile 'org.openhab.core.library.types'
-//    compile 'org.openhab.core.scriptengine.action'
     compile group: 'org.osgi', name: 'org.osgi.framework', version: '1.9.0'
     compile group: 'org.osgi', name: 'org.osgi.service.cm', version: '1.6.0'
     compile group: 'org.osgi', name: 'org.osgi.service.component', version: '1.4.0'
     compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 sourceSets {
diff --git a/skywriter-hue-integration/build.gradle b/skywriter-hue-integration/build.gradle
index c09d8b24dda3b4f329b9f55e7f0ac5024d955984..37bb2da071e8fe7cce1f769168cf33cddced3e32 100644
--- a/skywriter-hue-integration/build.gradle
+++ b/skywriter-hue-integration/build.gradle
@@ -10,11 +10,6 @@ apply plugin: 'application'
 dependencies {
     compile project(':eraser-base')
     compile project(':commons.color')
-    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
 }
 
 run {
diff --git a/stub.org.openhab.core.scriptengine.action/build.gradle b/stub.org.openhab.core.scriptengine.action/build.gradle
index 807b03f273c3ca13442b0193198172f203d55bc5..2f5043786a9064ac0c84ffe10ab32a6d01940398 100644
--- a/stub.org.openhab.core.scriptengine.action/build.gradle
+++ b/stub.org.openhab.core.scriptengine.action/build.gradle
@@ -6,13 +6,6 @@ sourceCompatibility = 1.8
 
 apply plugin: 'java'
 
-dependencies {
-    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.11.2'
-    compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.2'
-    testCompile group: 'junit', name: 'junit', version: '4.12'
-    testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version: '2.0.0.0'
-}
-
 sourceSets {
     main {
         java {