diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index b24de64..0000000
--- a/build.gradle
+++ /dev/null
@@ -1,413 +0,0 @@
-
-/*
- * Copyright 2017-present Open Networking Foundation
-
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-import org.opencord.gradle.rules.*
-import org.yaml.snakeyaml.Yaml
-
-allprojects {
-    apply plugin: 'base'
-    apply plugin: 'de.gesellix.docker'
-    //apply plugin: 'com.tmiyamon.config'
-
-    docker {
-        // dockerHost = System.env.DOCKER_HOST ?: 'unix:///var/run/docker.sock'
-        // dockerHost = System.env.DOCKER_HOST ?: 'https://192.168.99.100:2376'
-        // certPath = System.getProperty('docker.cert.path') ?: "${System.getProperty('user.home')}/.docker/machine/machines/default"
-        // authConfigPlain = [
-        //   "username"       : "joe",
-        //   "password"       : "some-pw-as-needed",
-        //   "email"          : "joe@acme.com",
-        //   "serveraddress"  : "https://index.docker.io/v1/"
-        //  ]
-    }
-}
-
-ext {
-
-    // Upstream registry to simplify filling out the comps table below
-    upstreamReg = project.hasProperty('upstreamReg') ? project.getProperty('upstreamReg') : 'docker.io'
-
-    // Deployment target config file (yaml format); this can be overwritten from the command line
-    // using the -PdeployConfig=<file-path> syntax.
-    deployConfig = project.hasProperty('deployConfig') ? project.getProperty('deployConfig') : './config/default.yml'
-
-    println "Using deployment config: $deployConfig"
-    File configFile = new File(deployConfig)
-    def yaml = new Yaml()
-    config = yaml.load(configFile.newReader())
-
-    // Target registry to be used to publish docker images needed for deployment
-    targetReg = project.hasProperty('targetReg')
-        ? project.getProperty('targetReg')
-        : config.docker && config.docker.registry
-            ? config.docker.registry
-            : config.headnode.ip
-                ? config.headnode.ip + ":5000"
-                : 'localhost:5000'
-
-    // The tag used to tag the docker images push to the target registry
-    targetTag = project.hasProperty('targetTag')
-        ? project.getProperty('targetTag')
-        : config.docker && config.docker.imageVersion
-            ? config.docker.imageVersion
-            : 'candidate'
-
-    comps = [
-            'consul': [
-                    'type':     'image',
-                    'upstream': upstreamReg,
-                    'name':     'consul',
-                    'digest':   'sha256:0dc990ff3c44d5b5395475bcc5ebdae4fc8b67f69e17942a8b9793b3df74d290'
-            ]
-    ]
-}
-
-task fetchUpstreamImages {
-    comps.each { name, spec -> if (spec.type == 'image') { dependsOn "fetch" + name } }
-}
-
-// Switch Configuration Image
-
-def getBuildTimestamp() {
-    def cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"))
-    def date = cal.getTime()
-    def formattedDate = date.format("yyyy-MM-dd'T'HH:mm:ssZ")
-    return formattedDate
-}
-
-def getCommitDate = { ->
-    def stdOut = new ByteArrayOutputStream()
-    exec {
-        commandLine "git", "log", "--pretty=format:%cd", "--date=format:%FT%T%z", "-n", "1"
-        standardOutput = stdOut
-    }
-    return stdOut.toString().trim()
-}
-
-def getCommitHash = { ->
-    def hashStdOut = new ByteArrayOutputStream()
-    exec {
-        commandLine "git", "log", "--pretty=format:%H", "-n", "1"
-        standardOutput = hashStdOut
-    }
-    return hashStdOut.toString().trim()
-}
-
-def isModified = { ->
-    def statusOut = new ByteArrayOutputStream()
-    def branchesOut = new ByteArrayOutputStream()
-    exec {
-        commandLine "bash", "-c", "repo --color=never --no-pager status . | tail -n +2 | wc -l"
-        standardOutput = statusOut
-    }
-    exec {
-        commandLine "bash", "-c", "repo --color=never --no-pager branches | wc -l"
-        standardOutput = branchesOut
-    }
-    def statusVal = statusOut.toString().trim()
-    def branchesVal = branchesOut.toString().trim()
-
-    return statusVal != "0" || branchesVal != "0"
-}
-
-def getBranchName = { ->
-    def stdout = new ByteArrayOutputStream()
-    exec {
-        commandLine "bash", "-c", "repo --color=never --no-pager info -l -o | grep 'Manifest branch:' | awk '{print \$NF}'"
-        standardOutput = stdout
-    }
-    def val = stdout.toString().trim()
-    if ( isModified() != "0" ) {
-        val += '[modified]'
-    }
-    return val
-}
-
-task buildSwitchqImage(type: Exec) {
-    workingDir 'switchq'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'build'
-}
-
-task publishSwitchqImage(type: Exec) {
-    workingDir 'switchq'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'publish'
-}
-
-// IP Allocator Image
-
-task buildAllocationImage(type: Exec) {
-    workingDir 'ip-allocator'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'build'
-}
-
-task publishAllocationImage(type: Exec) {
-    workingDir 'ip-allocator'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'publish'
-}
-
-// Provisioner Image
-
-task buildProvisionerImage(type: Exec) {
-    workingDir 'provisioner'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'build'
-}
-
-task publishProvisionerImage(type: Exec) {
-    workingDir 'provisioner'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'publish'
-}
-
-// Config Generator Image
-
-task buildConfigGeneratorImage(type: Exec) {
-    workingDir 'config-generator'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'build'
-}
-
-task publishConfigGeneratorImage(type: Exec) {
-    workingDir 'config-generator'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'publish'
-}
-
-// Automation Image
-
-task buildAutomationImage(type: Exec) {
-    workingDir 'automation'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'build'
-}
-
-task publishAutomationImage(type: Exec) {
-    workingDir 'automation'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'publish'
-}
-
-// DHCP Harvester Images
-
-task buildHarvesterImage(type: Exec) {
-    workingDir 'harvester'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'build'
-}
-
-task publishHarvesterImage(type: Exec) {
-    workingDir 'harvester'
-    commandLine 'make', "DOCKER_TAG=$targetTag", "DOCKER_REGISTRY=$targetReg", 'publish'
-}
-
-// ~~~~~~~~~~~~~~~~~~~ Global tasks ~~~~~~~~~~~~~~~~~~~~~~~
-
-task updateDocker (type: Exec)  {
-    commandLine 'sudo', 'utils/enable-remote-docker-registry', "$targetReg"
-}
-
-// To be used to fetch upstream binaries, clone repos, etc.
-task fetch(type: Exec) {
-    // this is where we fetch upstream artifacts that we do not need internet for the build phase"
-    // Placeholdr example:
-    dependsOn fetchUpstreamImages
-    commandLine "docker", "pull", "golang:alpine"
-    commandLine "docker", "pull", "python:2.7-alpine"
-}
-
-// To be used to generate all needed binaries that need to be present on the target
-// as docker images in the local docker runner.
-task buildImages {
-    dependsOn buildHarvesterImage
-    dependsOn buildAutomationImage
-    dependsOn buildAllocationImage
-    dependsOn buildProvisionerImage
-    dependsOn buildConfigGeneratorImage
-    dependsOn buildSwitchqImage
-}
-
-task publish {
-    //FIXME: This works because the upstream project primes the nodes before running this.
-    comps.each { name, spec -> if (spec.type == 'image') { dependsOn "publish" + name } }
-    dependsOn publishHarvesterImage
-    dependsOn publishAutomationImage
-    dependsOn publishAllocationImage
-    dependsOn publishProvisionerImage
-    dependsOn publishConfigGeneratorImage
-    dependsOn publishSwitchqImage
-}
-
-// ~~~~~~~~~~~~~~~~~~~ Deployment / Test Tasks  ~~~~~~~~~~~~~~~~~~~~~~~
-
-List.metaClass.asParam = { prefix, sep ->
-  if (delegate.size() == 0) {
-    ""
-  }
-  String result = "--" + prefix + "="
-  String p = ""
-  delegate.each {
-    result += p + "${it}"
-    p = sep
-  }
-  result
-}
-
-List.metaClass.p = { value, name ->
-  if (value != null && value != "") {
-      delegate << name + "=" + value
-  } else {
-      delegate
-  }
-}
-
-List.metaClass.p = { spec ->
-  if (spec != null && spec != "") {
-      delegate += spec
-  } else {
-      delegate
-  }
-}
-
-task prime (type: Exec)  {
-    executable = "ansible-playbook"
-    args = ["-i", '../genconfig/cord-inv']
-
-    if ( config.headnode.ansible_user != null && config.headnode.ansible_user != "" ) {
-        args = args << "--user=$config.headnode.ansible_user"
-    }
-
-    if ( config.debug ) {
-        args = args << "-vvvv"
-    }
-
-    def extraVars = []
-    if (config.common) {
-        extraVars = extraVars.p(config.common.extraVars)
-            .p(config.headnode.ansible_ssh_pass, "ansible_ssh_pass")
-            .p(config.headnode.ansible_become_pass, "ansible_become_pass")
-            .p(config.headnode.ansible_ssh_port, "ansible_ssh_port")
-            .p(config.common.fabric_ip, "fabric_ip")
-            .p(config.common.fabric_range_low, "fabric_range_low")
-            .p(config.common.fabric_range_high, "fabric_range_high")
-            .p(config.common.management_ip, "management_ip")
-            .p(config.common.management_range_low, "management_range_low")
-            .p(config.common.management_range_high, "management_range_high")
-            .p(config.common.management_gw, "management_gw")
-            .p(config.common.management_bc, "management_bc")
-            .p(config.common.management_network, "management_network")
-            .p(config.common.management_iface, "management_iface")
-            .p(config.common.external_ip, "external_ip")
-            .p(config.common.external_gw, "external_gw")
-            .p(config.common.external_bc, "external_bc")
-            .p(config.common.external_network, "external_network")
-            .p(config.common.external_iface, "external_iface")
-            .p(config.common.fabric_iface, "fabric_iface")
-            .p(config.common.domain, "domain")
-            .p(config.common.virtualbox_support, "virtualbox_support")
-            .p(config.common.power_helper_user, "power_helper_user")
-            .p(config.common.power_helper_host, "power_helper_host")
-            .p(config.common.kernel_opts, "kernel_opts")
-    }
-
-    if (config.passwords) {
-        extraVars = extraVars.p(config.passwords.compute_node, "password_compute_node")
-        .p(config.passwords.maas_admin, "password_maas_admin")
-        .p(config.passwords.maas_user, "password_maas_user")
-    }
-
-    if (config.otherServers) {
-        extraVars = extraVars.p(config.otherServers.location, "prov_location")
-        .p(config.otherServers.rolesPath, "prov_role_path")
-        .p(config.otherServers.role, "prov_role")
-    }
-
-    extraVars = extraVars.p("$targetReg", "deploy_docker_registry")
-        .p("$targetTag", "deploy_docker_tag")
-
-    // the password set on the compute node is skipped because this is being run against the
-    // head node and we don't want to change the head node password as this node was manualy
-    // set up.
-    def skipTags = [].p(config.common.skipTags).p('set_compute_node_password')
-
-    args = args.p(skipTags.asParam("skip-tags", ",")).p(extraVars.asParam("extra-vars", " ")) << "prime-node.yml"
-}
-
-task deployBase(type: Exec)  {
-    executable = "ansible-playbook"
-    args = ["-i", '../genconfig/cord-inv']
-
-    if ( config.headnode.ansible_user != null && config.headnode.ansible_user != "" ) {
-        args = args << "--user=$config.headnode.ansible_user"
-    }
-
-    if ( config.debug ) {
-        args = args << "-vvvv"
-    }
-
-    def extraVars = []
-    if (config.common) {
-        extraVars = extraVars.p(config.common.extraVars)
-            .p(config.headnode.ansible_ssh_pass, "ansible_ssh_pass")
-            .p(config.headnode.ansible_become_pass, "ansible_become_pass")
-            .p(config.headnode.ansible_ssh_port, "ansible_ssh_port")
-            .p(config.common.fabric_ip, "fabric_ip")
-            .p(config.common.fabric_range_low, "fabric_range_low")
-            .p(config.common.fabric_range_high, "fabric_range_high")
-            .p(config.common.management_ip, "management_ip")
-            .p(config.common.management_range_low, "management_range_low")
-            .p(config.common.management_range_high, "management_range_high")
-            .p(config.common.management_gw, "management_gw")
-            .p(config.common.management_network, "management_network")
-            .p(config.common.management_iface, "management_iface")
-            .p(config.common.external_ip, "external_ip")
-            .p(config.common.external_gw, "external_gw")
-            .p(config.common.external_network, "external_network")
-            .p(config.common.external_iface, "external_iface")
-            .p(config.common.fabric_iface, "fabric_iface")
-            .p(config.common.domain, "domain")
-            .p(config.common.virtualbox_support, "virtualbox_support")
-            .p(config.common.power_helper_user, "power_helper_user")
-            .p(config.common.power_helper_host, "power_helper_host")
-            .p(config.common.kernel_opts, "kernel_opts")
-    }
-
-    if (config.passwords) {
-        extraVars = extraVars.p(config.passwords.compute_node, "password_compute_node")
-        .p(config.passwords.maas_admin, "password_maas_admin")
-        .p(config.passwords.maas_user, "password_maas_user")
-    }
-
-    if (config.otherServers) {
-        extraVars = extraVars.p(config.otherServers.location, "prov_location")
-        .p(config.otherServers.rolesPath, "prov_role_path")
-        .p(config.otherServers.role, "prov_role")
-    }
-
-    extraVars = extraVars.p("$targetReg", "deploy_docker_registry")
-        .p("$targetTag", "deploy_docker_tag")
-
-    // the password set on the compute node is skipped because this is being run against the
-    // head node and we don't want to change the head node password as this node was manualy
-    // set up.
-    def skipTags = [].p(config.common.skipTags).p('set_compute_node_password')
-
-    args = args.p(skipTags.asParam("skip-tags", ",")).p(extraVars.asParam("extra-vars", " ")) << "head-node.yml"
-}
-
-prime.dependsOn {
-    updateDocker
-}
-
-tasks.addRule(new DockerFetchRule(project))
-tasks.addRule(new DockerPublishRule(project, project(':maas').prime))
-tasks.addRule(new DockerTagRule(project))
-
-
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
deleted file mode 100644
index 5faa194..0000000
--- a/buildSrc/build.gradle
+++ /dev/null
@@ -1,32 +0,0 @@
-
-/*
- * Copyright 2017-present Open Networking Foundation
-
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-apply plugin: 'groovy'
-
-repositories {
-    // maven { url 'https://repo.gradle.org/gradle/libs' }
-    maven { url 'https://plugins.gradle.org/m2/' }
-    // mavenCentral()
-}
-
-dependencies {
-    compile gradleApi()
-    compile localGroovy()
-    compile 'de.gesellix:gradle-docker-plugin:2016-05-05T13-15-11'
-    compile 'org.yaml:snakeyaml:1.10'
-    //compile 'gradle.plugin.com.tmiyamon:gradle-config:0.2.1'
-}
diff --git a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerFetchRule.groovy b/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerFetchRule.groovy
deleted file mode 100644
index a9bb91b..0000000
--- a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerFetchRule.groovy
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2012 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opencord.gradle.rules
-
-import org.gradle.api.Rule
-import de.gesellix.gradle.docker.tasks.DockerPullTask
-
-
-/**
- * Gradle Rule class to fetch a docker image
- */
-class DockerFetchRule implements Rule {
-
-    def project
-
-    DockerFetchRule(project) {
-        this.project = project
-    }
-
-    String getDescription() {
-        'Rule Usage: fetch<component-name>'
-    }
-
-    void apply(String taskName) {
-        if (taskName.startsWith('fetch')) {
-            project.task(taskName, type: DockerPullTask) {
-                ext.compName = taskName - 'fetch'
-                def spec = project.comps[ext.compName]
-                imageName = spec.name + '@' + spec.digest
-            }
-        }
-    }
-}
diff --git a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerPublishRule.groovy b/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerPublishRule.groovy
deleted file mode 100644
index a1d8164..0000000
--- a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerPublishRule.groovy
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2012 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opencord.gradle.rules
-
-import org.gradle.api.Rule
-import de.gesellix.gradle.docker.tasks.DockerPushTask
-
-
-/**
- * Gradle Rule class to publish (push) a docker image to a private repo
- */
-class DockerPublishRule implements Rule {
-
-    def project
-
-    DockerPublishRule(project) {
-        this.project = project
-    }
-
-    String getDescription() {
-        'Rule Usage: publish<component-name>'
-    }
-
-    void apply(String taskName) {
-        if (taskName.startsWith('publish')) {
-            project.task(taskName, type: DockerPushTask) {
-                ext.compName = taskName - 'publish'
-                println "Publish rule: $taskName + $compName"
-                def tagTask = "tag$compName"
-                println "Tagtask: $tagTask"
-                dependsOn tagTask
-                def spec = project.comps[ext.compName]
-                repositoryName = spec.name + ':' + project.targetTag
-                registry = project.targetReg
-            }
-        }
-    }
-}
diff --git a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerTagRule.groovy b/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerTagRule.groovy
deleted file mode 100644
index 474e16d..0000000
--- a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerTagRule.groovy
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2012 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opencord.gradle.rules
-
-import org.gradle.api.Rule
-import de.gesellix.gradle.docker.tasks.DockerTagTask
-
-
-/**
- * Gradle Rule class to tag a docker image
- */
-class DockerTagRule implements Rule {
-
-    def project
-
-    DockerTagRule(project) {
-        this.project = project
-    }
-
-    String getDescription() {
-        'Rule Usage: tag<component-name>'
-    }
-
-    void apply(String taskName) {
-        if (taskName.startsWith('tag') && !taskName.equals('tag')) {
-            project.task(taskName, type: DockerTagTask) {
-                ext.compName = taskName - 'tag'
-                def spec = project.comps[compName]
-                imageId = spec.name + '@' + spec.digest
-                tag = compName + ':' + project.targetTag
-            }
-        }
-    }
-}
diff --git a/buildSrc/src/main/groovy/org/opencord/gradle/rules/GitSubmoduleUpdateRule.groovy b/buildSrc/src/main/groovy/org/opencord/gradle/rules/GitSubmoduleUpdateRule.groovy
deleted file mode 100644
index 3b46424..0000000
--- a/buildSrc/src/main/groovy/org/opencord/gradle/rules/GitSubmoduleUpdateRule.groovy
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2012 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opencord.gradle.rules
-
-import org.gradle.api.Rule
-import org.gradle.api.tasks.Exec
-
-
-/**
- * Gradle Rule class to fetch a docker image
- */
-class GitSubmoduleUpdateRule implements Rule {
-
-    def project
-
-    GitSubmoduleUpdateRule(project) {
-        this.project = project
-    }
-
-    String getDescription() {
-        'Rule Usage: gitupdate<component-name>'
-    }
-
-    void apply(String taskName) {
-        if (taskName.startsWith('gitupdate')) {
-            project.task(taskName, type: Exec) {
-                ext.compName = taskName - 'gitupdate'
-                def spec = project.comps[ext.compName]
-                workingDir = '.'
-                commandLine '/usr/bin/git', 'submodule', 'update', '--init', '--recursive', spec.componentDir
-            }
-        }
-    }
-}
diff --git a/gradle.properties b/gradle.properties
deleted file mode 100644
index 1a644c7..0000000
--- a/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-org.gradle.daemon=true
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 2c6137b..0000000
--- a/gradle/wrapper/gradle-wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index cf051c0..0000000
--- a/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Thu May 05 16:09:18 PDT 2016
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-all.zip
diff --git a/gradlew b/gradlew
deleted file mode 100755
index 9d82f78..0000000
--- a/gradlew
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-    JAVACMD=`cygpath --unix "$JAVACMD"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
deleted file mode 100644
index 72d362d..0000000
--- a/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem  Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
