diff --git a/.gitmodules b/.gitmodules
index 528eb43..e69de29 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,18 +0,0 @@
-[submodule "apps/aaa"]
-	path = apps/aaa
-	url = ../aaa
-[submodule "apps/vtn"]
-	path = apps/vtn
-	url = ../vtn
-[submodule "apps/config"]
-	path = apps/config
-	url = ../config
-[submodule "apps/igmp"]
-	path = apps/igmp
-	url = ../igmp
-[submodule "apps/mcast"]
-	path = apps/mcast
-	url = ../mcast
-[submodule "apps/olt"]
-	path = apps/olt
-	url = ../olt
diff --git a/apps/aaa b/apps/aaa
deleted file mode 160000
index af15a1f..0000000
--- a/apps/aaa
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit af15a1f3303aa2c067c95418f21e2a567d787b92
diff --git a/apps/config b/apps/config
deleted file mode 160000
index 1398f61..0000000
--- a/apps/config
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 1398f61c97252dbb8fb8d7dae0be2e0e6eb96c6d
diff --git a/apps/igmp b/apps/igmp
deleted file mode 160000
index 5a41d22..0000000
--- a/apps/igmp
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 5a41d227ccd1bb9c3a3e100339d13232386142df
diff --git a/apps/mcast b/apps/mcast
deleted file mode 160000
index fca6fd9..0000000
--- a/apps/mcast
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit fca6fd961d5c3597c9acf09adbb3c19aa9710503
diff --git a/apps/olt b/apps/olt
deleted file mode 160000
index 2105a34..0000000
--- a/apps/olt
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 2105a343dba0050e522b03985c0c9be6ad5ce6fa
diff --git a/apps/vtn b/apps/vtn
deleted file mode 160000
index 81a1356..0000000
--- a/apps/vtn
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 81a135679474c5588d1a1417b71f832f9e61e17c
diff --git a/build.gradle b/build.gradle
index d2d31cd..8fd06d5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -37,8 +37,6 @@
 
 ext {
 
-    appVersion = null
-
     // Upstream registry to simplify filling out the comps table below
     upstreamReg = project.hasProperty('upstreamReg') ? project.getProperty('upstreamReg') : 'docker.io'
 
@@ -48,59 +46,10 @@
     // The tag used to tag the docker images push to the target registry
     targetTag = project.hasProperty('targetTag') ? project.getProperty('targetTag') : 'candidate'
 
-    comps = [
-            'aaa' : [
-                    'type':     'gitmodule',
-                    'upstream': 'https://gerrit.opencord.org/aaa',
-                    'branch' : 'master',
-                    'tag' : appVersion,
-                    'componentDir': './apps/aaa'
-            ],
-            'vtn' : [
-                    'type':     'gitmodule',
-                    'upstream': 'https://gerrit.opencord.org/vtn',
-                    'branch' : 'master',
-                    'tag' : appVersion,
-                    'componentDir': './apps/vtn'
-            ],
-            'mcast' : [
-                    'type':     'gitmodule',
-                    'upstream': 'https://gerrit.opencord.org/mcast',
-                    'branch' : 'master',
-                    'tag' : appVersion,
-                    'componentDir': './apps/mcast'
-            ],
-            'igmp' : [
-                    'type':     'gitmodule',
-                    'upstream': 'https://gerrit.opencord.org/igmp',
-                    'branch' : 'master',
-                    'tag' : appVersion,
-                    'componentDir': './apps/igmp'
-            ],
-            'olt' : [
-                    'type':     'gitmodule',
-                    'upstream': 'https://gerrit.opencord.org/olt',
-                    'branch' : 'master',
-                    'tag' : appVersion,
-                    'componentDir': './apps/olt'
-            ],
-            'config' : [
-                    'type':     'gitmodule',
-                    'upstream': 'https://gerrit.opencord.org/config',
-                    'branch' : 'master',
-                    'tag' : appVersion,
-                    'componentDir': './apps/config'
-            ]
-    ]
-
     deployConfig = project.hasProperty('deployConfig') ? project.getProperty('deployConfig') : './config/default.yml'
 }
 
 
-task fetchGitSubmodules {
-    comps.each { name, spec -> if (spec.type == 'gitmodule') { dependsOn "gitupdate" + name } }
-}
-
 task buildOnosApps (type: Exec) {
     workingDir './apps'
     commandLine 'mvn', 'clean', 'install', '-U'
@@ -156,21 +105,20 @@
 // ~~~~~~~~~~~~~~~~~~~ Global tasks ~~~~~~~~~~~~~~~~~~~~~~~
 
 task fetch {
-    dependsOn fetchGitSubmodules
+    logger.info 'Nothing to fetch for me'
 }
 
-task buildImages (dependsOn: fetch) {
+task buildImages {
     dependsOn buildOnosApps
     dependsOn copyLocalRepo
     dependsOn buildRepoImage
 }
 
 task publish {
-    dependsOn buildImages
     dependsOn publishMavenRepoImage
 }
 
-task deployBase (type: Exec) {
+task deploy (type: Exec) {
         println "Using deployment config: $deployConfig"
         File configFile = new File(deployConfig)
         def yaml = new Yaml()
@@ -214,5 +162,3 @@
     workingDir './apps'
     commandLine 'mvn', 'clean', 'deploy'
 }
-
-tasks.addRule(new GitSubmoduleUpdateRule(project))
diff --git a/build.gradle.new b/build.gradle.new
deleted file mode 100644
index 8fd06d5..0000000
--- a/build.gradle.new
+++ /dev/null
@@ -1,164 +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.
- */
-
-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'
-
-    // Target registry to be used to publish docker images needed for deployment
-    targetReg = project.hasProperty('targetReg') ? project.getProperty('targetReg') : 'localhost:5000'
-
-    // The tag used to tag the docker images push to the target registry
-    targetTag = project.hasProperty('targetTag') ? project.getProperty('targetTag') : 'candidate'
-
-    deployConfig = project.hasProperty('deployConfig') ? project.getProperty('deployConfig') : './config/default.yml'
-}
-
-
-task buildOnosApps (type: Exec) {
-    workingDir './apps'
-    commandLine 'mvn', 'clean', 'install', '-U'
-}
-
-task copyLocalRepo (dependsOn: buildOnosApps, type: Exec) {
-    workingDir './'
-    commandLine 'cp', '-R', System.env.HOME + '/.m2/repository', '.'
-}
-
-task buildRepoImage (dependsOn: copyLocalRepo, type: Exec) {
-    commandLine 'docker', 'build', '-t', 'opencord/mavenrepo', '.'
-}
-
-task tagMavenRepoImage (type: Exec) {
-    commandLine 'docker', 'tag', 'opencord/mavenrepo', "$targetReg/mavenrepo:$targetTag"
-}
-
-task publishMavenRepoImage (type: Exec) {
-    dependsOn tagMavenRepoImage
-    commandLine 'docker', 'push', "$targetReg/mavenrepo:$targetTag"
-}
-
-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
-  }
-}
-
-// ~~~~~~~~~~~~~~~~~~~ Global tasks ~~~~~~~~~~~~~~~~~~~~~~~
-
-task fetch {
-    logger.info 'Nothing to fetch for me'
-}
-
-task buildImages {
-    dependsOn buildOnosApps
-    dependsOn copyLocalRepo
-    dependsOn buildRepoImage
-}
-
-task publish {
-    dependsOn publishMavenRepoImage
-}
-
-task deploy (type: Exec) {
-        println "Using deployment config: $deployConfig"
-        File configFile = new File(deployConfig)
-        def yaml = new Yaml()
-        def config = yaml.load(configFile.newReader())
-
-        executable = "ansible-playbook"
-        args = ["-i", config.seedServer.ip + ',']
-
-        if ( config.seedServer.user != null && config.seedServer.user != "" ) {
-            args = args << "--user=$config.seedServer.user"
-        }
-
-        def extraVars = []
-        if (config.seedServer) {
-            extraVars = extraVars.p(config.seedServer.extraVars)
-                    .p(config.seedServer.password, "ansible_ssh_pass")
-                    .p(config.seedServer.sudoPassword, "ansible_sudo_pass")
-                    .p(config.seedServer.domain, "domain")
-	            .p(config.seedServer.port, "ansible_ssh_port")
-        }
-
-        if (config.otherServers) {
-            extraVars = extraVars.p(config.otherServers.location, "prov_location")
-                .p(config.otherServers.rolesPath, "prov_role_path")
-                .p(config.otherServers.role, "prov_role")
-        }
-
-        if (config.docker) {
-            extraVars = extraVars.p(config.docker.registry, "docker_registry")
-                .p(config.docker.imageVersion, "docker_image_version")
-        }
-
-        def skipTags = [].p(config.seedServer.skipTags)
-
-        args = args.p(skipTags.asParam("skip-tags", ",")).p(extraVars.asParam("extra-vars", " ")) << "mavenrepo.yml"   
-}
-
-
-// Depending on the version of the apps this will either make a release or publish a snapshot
-task release (type: Exec) {
-    workingDir './apps'
-    commandLine 'mvn', 'clean', 'deploy'
-}
