diff --git a/src/main/java/org/onap/clamp/clds/camel/CamelProxy.java b/src/main/java/org/onap/clamp/clds/camel/CamelProxy.java
deleted file mode 100644
index f626598..0000000
--- a/src/main/java/org/onap/clamp/clds/camel/CamelProxy.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights
- *                             reserved.
- * ================================================================================
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * 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.
- * ============LICENSE_END============================================
- * ===================================================================
- *
- */
-
-package org.onap.clamp.clds.camel;
-
-import org.apache.camel.ExchangeProperty;
-
-/**
- * This interface describes the CamelProxy parameters that must be passed to the
- * Camel flow.
- */
-@FunctionalInterface
-public interface CamelProxy {
-
-    /**
-     * This method is called when invoking a camel flow.
-     *
-     * @param actionCommand       The action coming from the Clamp UI (like SUBMIT, UPDATE,
-     *                            DELETE, ...)
-     * @param modelProperties     The Model properties created based on the BPMN Json and
-     *                            Properties Json
-     * @param modelBpmnProperties The Json with all the properties describing the flow
-     * @param modelName           The model name
-     * @param controlName         The control loop name
-     * @param docText             The Global properties JSON containing YAML (coming from CLamp
-     *                            template)
-     * @param isTest              Is a test or not (flag coming from the UI)
-     * @param userId              The user ID coming from the UI
-     * @param isInsertTestEvent   Is a test or not (flag coming from the UI)
-     * @param eventAction         The latest event action in database (like CREATE, SUBMIT, ...)
-     * @return A string containing the result of the Camel flow execution
-     */
-    String executeAction(@ExchangeProperty("actionCd") String actionCommand,
-                         @ExchangeProperty("modelProp") String modelProperties,
-                         @ExchangeProperty("modelBpmnProp") String modelBpmnProperties,
-                         @ExchangeProperty("modelName") String modelName, @ExchangeProperty("controlName") String controlName,
-                         @ExchangeProperty("docText") String docText, @ExchangeProperty("isTest") boolean isTest,
-                         @ExchangeProperty("userid") String userId, @ExchangeProperty("isInsertTestEvent") boolean isInsertTestEvent,
-                         @ExchangeProperty("eventAction") String eventAction);
-}
diff --git a/src/main/java/org/onap/clamp/clds/model/sdc/SdcArtifact.java b/src/main/java/org/onap/clamp/clds/model/sdc/SdcArtifact.java
deleted file mode 100644
index f886ee6..0000000
--- a/src/main/java/org/onap/clamp/clds/model/sdc/SdcArtifact.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
- *                             reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END============================================
- * ===================================================================
- *
- */
-
-package org.onap.clamp.clds.model.sdc;
-
-public class SdcArtifact {
-
-    private String artifactName;
-    private String artifactType;
-    private String artifactUrl;
-    private String artifactDescription;
-    private String artifactTimeout;
-    private String artifactChecksum;
-    private String artifactUuid;
-    private String artifactVersion;
-    private String generatedFromUuid;
-
-    public String getArtifactName() {
-        return artifactName;
-    }
-
-    public void setArtifactName(String artifactName) {
-        this.artifactName = artifactName;
-    }
-
-    public String getArtifactType() {
-        return artifactType;
-    }
-
-    public void setArtifactType(String artifactType) {
-        this.artifactType = artifactType;
-    }
-
-    public String getArtifactURL() {
-        return artifactUrl;
-    }
-
-    public void setArtifactURL(String artifactURL) {
-        this.artifactUrl = artifactURL;
-    }
-
-    public String getArtifactDescription() {
-        return artifactDescription;
-    }
-
-    public void setArtifactDescription(String artifactDescription) {
-        this.artifactDescription = artifactDescription;
-    }
-
-    public String getArtifactTimeout() {
-        return artifactTimeout;
-    }
-
-    public void setArtifactTimeout(String artifactTimeout) {
-        this.artifactTimeout = artifactTimeout;
-    }
-
-    public String getArtifactChecksum() {
-        return artifactChecksum;
-    }
-
-    public void setArtifactChecksum(String artifactChecksum) {
-        this.artifactChecksum = artifactChecksum;
-    }
-
-    public String getArtifactUUID() {
-        return artifactUuid;
-    }
-
-    public void setArtifactUUID(String artifactUUID) {
-        this.artifactUuid = artifactUUID;
-    }
-
-    public String getArtifactVersion() {
-        return artifactVersion;
-    }
-
-    public void setArtifactVersion(String artifactVersion) {
-        this.artifactVersion = artifactVersion;
-    }
-
-    public String getGeneratedFromUUID() {
-        return generatedFromUuid;
-    }
-
-    public void setGeneratedFromUUID(String generatedFromUUID) {
-        this.generatedFromUuid = generatedFromUUID;
-    }
-}
diff --git a/src/main/java/org/onap/clamp/clds/model/sdc/SdcResource.java b/src/main/java/org/onap/clamp/clds/model/sdc/SdcResource.java
deleted file mode 100644
index 515e77d..0000000
--- a/src/main/java/org/onap/clamp/clds/model/sdc/SdcResource.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
- *                             reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END============================================
- * ===================================================================
- *
- */
-
-package org.onap.clamp.clds.model.sdc;
-
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-public class SdcResource implements Comparable<SdcResource> {
-
-    protected static final EELFLogger logger = EELFManager.getInstance().getLogger(SdcResource.class);
-    protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
-
-    private String resourceInstanceName;
-    private String resourceName;
-    private String resourceInvariantUUID;
-    private String resourceVersion;
-    private String resoucreType;
-    private String resourceUuid;
-    private List<SdcArtifact> artifacts;
-
-    public String getResourceInstanceName() {
-        return resourceInstanceName;
-    }
-
-    public void setResourceInstanceName(String resourceInstanceName) {
-        this.resourceInstanceName = resourceInstanceName;
-    }
-
-    public String getResourceName() {
-        return resourceName;
-    }
-
-    public void setResourceName(String resourceName) {
-        this.resourceName = resourceName;
-    }
-
-    public String getResourceInvariantUUID() {
-        return resourceInvariantUUID;
-    }
-
-    public void setResourceInvariantUUID(String resourceInvUuid) {
-        this.resourceInvariantUUID = resourceInvUuid;
-    }
-
-    public String getResourceVersion() {
-        return resourceVersion;
-    }
-
-    public void setResourceVersion(String resourceVersion) {
-        this.resourceVersion = resourceVersion;
-    }
-
-    public String getResoucreType() {
-        return resoucreType;
-    }
-
-    public void setResoucreType(String resoucreType) {
-        this.resoucreType = resoucreType;
-    }
-
-    public String getResourceUUID() {
-        return resourceUuid;
-    }
-
-    public void setResourceUUID(String resourceUUID) {
-        this.resourceUuid = resourceUUID;
-    }
-
-    public List<SdcArtifact> getArtifacts() {
-        return artifacts;
-    }
-
-    public void setArtifacts(List<SdcArtifact> artifacts) {
-        this.artifacts = artifacts;
-    }
-
-    @Override
-    public int compareTo(SdcResource in) {
-        // Compares this object with the specified object for order.
-        // Returns a negative integer, zero, or a positive integer as this
-        // object is less than, equal to, or greater than the specified object.
-
-        // first compare based on name
-        int rtn = resourceInstanceName.compareToIgnoreCase(in.resourceInstanceName);
-
-        if (rtn == 0) {
-            BigDecimal myVersion = convertVersion(resourceVersion);
-            BigDecimal inVersion = convertVersion(in.resourceVersion);
-            rtn = myVersion.compareTo(inVersion);
-        }
-        return rtn;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((resourceInstanceName == null) ? 0 : resourceInstanceName.hashCode());
-        result = prime * result + ((resourceVersion == null) ? 0 : resourceVersion.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        SdcResource other = (SdcResource) obj;
-        if (resourceInstanceName == null) {
-            if (other.resourceInstanceName != null) {
-                return false;
-            }
-        } else if (!resourceInstanceName.equals(other.resourceInstanceName)) {
-            return false;
-        }
-        if (resourceVersion == null) {
-            if (other.resourceVersion != null) {
-                return false;
-            }
-        } else if (!resourceVersion.equals(other.resourceVersion)) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Convert version String into a BigDecimal.
-     *
-     * @param versionText version
-     * @return version in BigDecimal
-     */
-    private BigDecimal convertVersion(String versionText) {
-        BigDecimal rtn = BigDecimal.valueOf(0.0);
-        try {
-            rtn = new BigDecimal(versionText);
-        } catch (NumberFormatException nfe) {
-            logger.warn("SDC version=" + versionText + " is not decimal for name=" + resourceInstanceName);
-        }
-        return rtn;
-    }
-}
diff --git a/src/main/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfo.java b/src/main/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfo.java
deleted file mode 100644
index 47192a5..0000000
--- a/src/main/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfo.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- *                             reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END============================================
- * ===================================================================
- *
- */
-
-package org.onap.clamp.clds.model.sdc;
-
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-
-import java.math.BigDecimal;
-
-public class SdcResourceBasicInfo implements Comparable<SdcResourceBasicInfo> {
-
-    protected static final EELFLogger logger = EELFManager.getInstance().getLogger(SdcResourceBasicInfo.class);
-    protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
-
-    private String uuid;
-    private String invariantUUID;
-    private String name;
-    private String version;
-    private String toscaModelURL;
-    private String category;
-    private String subCategory;
-    private String resourceType;
-    private String lifecycleState;
-    private String lastUpdaterUserId;
-
-    @Override
-    public int compareTo(SdcResourceBasicInfo in) {
-        // Compares this object with the specified object for order.
-        // Returns a negative integer, zero, or a positive integer as this
-        // object is less than, equal to, or greater than the specified object.
-        // first compare based on name
-        int rtn = name.compareToIgnoreCase(in.name);
-
-        if (rtn == 0) {
-            BigDecimal myVersion = convertVersion(version);
-            BigDecimal inVersion = convertVersion(in.version);
-            rtn = myVersion.compareTo(inVersion);
-        }
-        return rtn;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((name == null) ? 0 : name.hashCode());
-        result = prime * result + ((version == null) ? 0 : version.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        SdcResourceBasicInfo other = (SdcResourceBasicInfo) obj;
-        if (name == null) {
-            if (other.name != null) {
-                return false;
-            }
-        } else if (!name.equals(other.name)) {
-            return false;
-        }
-        if (version == null) {
-            if (other.version != null) {
-                return false;
-            }
-        } else if (!version.equals(other.version)) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Convert version String into a BigDecimal.
-     *
-     * @param version version
-     * @return version in BigDecimal
-     */
-    private BigDecimal convertVersion(String version) {
-        BigDecimal rtn = BigDecimal.valueOf(0.0);
-        try {
-            rtn = new BigDecimal(version);
-        } catch (NumberFormatException nfe) {
-            logger.warn("SDC version=" + version + " is not decimal for name=" + name);
-        }
-        return rtn;
-    }
-
-    public String getUuid() {
-        return uuid;
-    }
-
-    public void setUuid(String uuid) {
-        this.uuid = uuid;
-    }
-
-    public String getInvariantUUID() {
-        return invariantUUID;
-    }
-
-    public void setInvariantUUID(String invariantUUID) {
-        this.invariantUUID = invariantUUID;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public String getToscaModelURL() {
-        return toscaModelURL;
-    }
-
-    public void setToscaModelURL(String toscaModelURL) {
-        this.toscaModelURL = toscaModelURL;
-    }
-
-    public String getCategory() {
-        return category;
-    }
-
-    public void setCategory(String category) {
-        this.category = category;
-    }
-
-    public String getSubCategory() {
-        return subCategory;
-    }
-
-    public void setSubCategory(String subCategory) {
-        this.subCategory = subCategory;
-    }
-
-    public String getResourceType() {
-        return resourceType;
-    }
-
-    public void setResourceType(String resourceType) {
-        this.resourceType = resourceType;
-    }
-
-    public String getLifecycleState() {
-        return lifecycleState;
-    }
-
-    public void setLifecycleState(String lifecycleState) {
-        this.lifecycleState = lifecycleState;
-    }
-
-    public String getLastUpdaterUserId() {
-        return lastUpdaterUserId;
-    }
-
-    public void setLastUpdaterUserId(String lastUpdaterUserId) {
-        this.lastUpdaterUserId = lastUpdaterUserId;
-    }
-
-    public EELFLogger getLOGGER() {
-        return logger;
-    }
-}
diff --git a/src/main/java/org/onap/clamp/clds/model/sdc/SdcServiceDetail.java b/src/main/java/org/onap/clamp/clds/model/sdc/SdcServiceDetail.java
deleted file mode 100644
index e7265ff..0000000
--- a/src/main/java/org/onap/clamp/clds/model/sdc/SdcServiceDetail.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- *                             reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END============================================
- * ===================================================================
- *
- */
-
-package org.onap.clamp.clds.model.sdc;
-
-import java.util.List;
-
-public class SdcServiceDetail {
-
-    private String uuid;
-    private String invariantUUID;
-    private String name;
-    private String version;
-    private String toscaModelURL;
-    private String category;
-    private String lifecycleState;
-    private String lastUpdaterUserId;
-    private String distributionStatus;
-    private String lastUpdaterFullName;
-    private List<SdcResource> resources;
-    private List<SdcArtifact> artifacts;
-
-    public String getUuid() {
-        return uuid;
-    }
-
-    public void setUuid(String uuid) {
-        this.uuid = uuid;
-    }
-
-    public String getInvariantUUID() {
-        return invariantUUID;
-    }
-
-    public void setInvariantUUID(String invariantUUID) {
-        this.invariantUUID = invariantUUID;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public String getToscaModelURL() {
-        return toscaModelURL;
-    }
-
-    public void setToscaModelURL(String toscaModelURL) {
-        this.toscaModelURL = toscaModelURL;
-    }
-
-    public String getCategory() {
-        return category;
-    }
-
-    public void setCategory(String category) {
-        this.category = category;
-    }
-
-    public String getLifecycleState() {
-        return lifecycleState;
-    }
-
-    public void setLifecycleState(String lifecycleState) {
-        this.lifecycleState = lifecycleState;
-    }
-
-    public String getLastUpdaterUserId() {
-        return lastUpdaterUserId;
-    }
-
-    public void setLastUpdaterUserId(String lastUpdaterUserId) {
-        this.lastUpdaterUserId = lastUpdaterUserId;
-    }
-
-    public String getDistributionStatus() {
-        return distributionStatus;
-    }
-
-    public void setDistributionStatus(String distributionStatus) {
-        this.distributionStatus = distributionStatus;
-    }
-
-    public String getLastUpdaterFullName() {
-        return lastUpdaterFullName;
-    }
-
-    public void setLastUpdaterFullName(String lastUpdaterFullName) {
-        this.lastUpdaterFullName = lastUpdaterFullName;
-    }
-
-    public List<SdcResource> getResources() {
-        return resources;
-    }
-
-    public void setResources(List<SdcResource> resources) {
-        this.resources = resources;
-    }
-
-    public List<SdcArtifact> getArtifacts() {
-        return artifacts;
-    }
-
-    public void setArtifacts(List<SdcArtifact> artifacts) {
-        this.artifacts = artifacts;
-    }
-
-}
diff --git a/src/main/java/org/onap/clamp/clds/model/sdc/SdcServiceInfo.java b/src/main/java/org/onap/clamp/clds/model/sdc/SdcServiceInfo.java
deleted file mode 100644
index bb9f3f8..0000000
--- a/src/main/java/org/onap/clamp/clds/model/sdc/SdcServiceInfo.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- *                             reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END============================================
- * ===================================================================
- * 
- */
-
-package org.onap.clamp.clds.model.sdc;
-
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-
-import java.math.BigDecimal;
-
-public class SdcServiceInfo implements Comparable<SdcServiceInfo> {
-
-    protected static final EELFLogger logger      = EELFManager.getInstance().getLogger(SdcServiceInfo.class);
-    protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
-
-    private String                    uuid;
-    private String                    invariantUUID;
-    private String                    name;
-    private String                    version;
-    private String                    toscaModelURL;
-    private String                    category;
-    private String                    lifecycleState;
-    private String                    lastUpdaterUserId;
-    private String                    distributionStatus;
-
-    public String getUuid() {
-        return uuid;
-    }
-
-    public void setUuid(String uuid) {
-        this.uuid = uuid;
-    }
-
-    public String getInvariantUUID() {
-        return invariantUUID;
-    }
-
-    public void setInvariantUUID(String invariantUUID) {
-        this.invariantUUID = invariantUUID;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    public String getToscaModelURL() {
-        return toscaModelURL;
-    }
-
-    public void setToscaModelURL(String toscaModelURL) {
-        this.toscaModelURL = toscaModelURL;
-    }
-
-    public String getCategory() {
-        return category;
-    }
-
-    public void setCategory(String category) {
-        this.category = category;
-    }
-
-    public String getLifecycleState() {
-        return lifecycleState;
-    }
-
-    public void setLifecycleState(String lifecycleState) {
-        this.lifecycleState = lifecycleState;
-    }
-
-    public String getLastUpdaterUserId() {
-        return lastUpdaterUserId;
-    }
-
-    public void setLastUpdaterUserId(String lastUpdaterUserId) {
-        this.lastUpdaterUserId = lastUpdaterUserId;
-    }
-
-    public String getDistributionStatus() {
-        return distributionStatus;
-    }
-
-    public void setDistributionStatus(String distributionStatus) {
-        this.distributionStatus = distributionStatus;
-    }
-
-    /**
-     * Compare using name and then version. Version is converted to a decimal.
-     */
-    @Override
-    public int compareTo(SdcServiceInfo in) {
-        // Compares this object with the specified object for order.
-        // Returns a negative integer, zero, or a positive integer as this
-        // object is less than, equal to, or greater than the specified object.
-        // first compare based on name
-        int rtn = name.compareToIgnoreCase(in.name);
-
-        if (rtn == 0) {
-            BigDecimal myVersion = convertVersion(version);
-            BigDecimal inVersion = convertVersion(in.version);
-            rtn = myVersion.compareTo(inVersion);
-        }
-
-        return rtn;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + ((name == null) ? 0 : name.hashCode());
-        result = prime * result + ((version == null) ? 0 : version.hashCode());
-        return result;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        SdcServiceInfo other = (SdcServiceInfo) obj;
-        if (name == null) {
-            if (other.name != null) {
-                return false;
-            }
-        } else if (!name.equals(other.name)) {
-            return false;
-        }
-        if (version == null) {
-            if (other.version != null) {
-                return false;
-            }
-        } else if (!version.equals(other.version)) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Convert version String into a BigDecimal.
-     *
-     * @param versionText version
-     * @return version in BigDecimal
-     */
-    private BigDecimal convertVersion(String versionText) {
-        try {
-            return new BigDecimal(versionText);
-        } catch (NumberFormatException nfe) {
-            logger.warn("SDC version=" + versionText + " is not decimal for name=" + name);
-        }
-        return BigDecimal.valueOf(0.0);
-    }
-
-}
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java
index 3a2cb09..0e80911 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java
@@ -28,18 +28,12 @@
 
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
-import com.google.gson.reflect.TypeToken;
 
-import java.lang.reflect.Type;
 import java.util.Date;
-import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.camel.Produce;
-import org.onap.clamp.clds.camel.CamelProxy;
 import org.onap.clamp.clds.model.CldsInfo;
-import org.onap.clamp.clds.model.sdc.SdcServiceInfo;
 import org.onap.clamp.clds.util.LoggingUtils;
 import org.onap.clamp.clds.util.ONAPLogConstants;
 import org.slf4j.event.Level;
@@ -52,14 +46,6 @@
  */
 @Component
 public class CldsService extends SecureServiceBase {
-
-    /**
-     * The constant LIST_OF_SDC_SERVICE_INFO_TYPE.
-     */
-    public static final Type LIST_OF_SDC_SERVICE_INFO_TYPE = new TypeToken<List<SdcServiceInfo>>() {
-    }.getType();
-    @Produce(uri = "direct:processSubmit")
-    private CamelProxy camelProxy;
     /**
      * The constant securityLogger.
      */
diff --git a/src/test/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfoTest.java b/src/test/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfoTest.java
deleted file mode 100644
index 5adb064..0000000
--- a/src/test/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfoTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END=========================================================
- * Modifications copyright (c) 2018 Nokia
- * ================================================================================
- *
- */
-
-package org.onap.clamp.clds.model.sdc;
-
-import org.assertj.core.api.Assertions;
-import org.junit.Test;
-
-public class SdcResourceBasicInfoTest {
-
-    @Test
-    public void testHashCode() {
-        SdcResourceBasicInfo sdc1a = new SdcResourceBasicInfo();
-        sdc1a.setName("test1");
-        sdc1a.setVersion("1.0");
-
-        SdcResourceBasicInfo sdc2 = new SdcResourceBasicInfo();
-        sdc2.setName("test2");
-        sdc2.setVersion("2.0");
-
-        SdcResourceBasicInfo sdc1b = new SdcResourceBasicInfo();
-        sdc1b.setName("test1");
-        sdc1b.setVersion("2.0");
-
-        Assertions.assertThat(sdc1a.hashCode()).isNotEqualTo(sdc1b.hashCode());
-        Assertions.assertThat(sdc1b.hashCode()).isNotEqualTo(sdc2.hashCode());
-        sdc1b.setVersion("1.0");
-        Assertions.assertThat(sdc1a.hashCode()).isEqualTo(sdc1b.hashCode());
-
-    }
-
-    @Test
-    public void testCompareTo() {
-        SdcResourceBasicInfo sdc1a = new SdcResourceBasicInfo();
-        sdc1a.setName("test1");
-        sdc1a.setVersion("1.0");
-
-        SdcResourceBasicInfo sdc1b = new SdcResourceBasicInfo();
-        sdc1b.setName("test1");
-        sdc1b.setVersion("2.0");
-
-        SdcResourceBasicInfo sdc2 = new SdcResourceBasicInfo();
-        sdc2.setName("test2");
-        sdc2.setVersion("2.0");
-
-        Assertions.assertThat(sdc1a.compareTo(sdc1b)).isEqualTo(-1);
-        Assertions.assertThat(sdc1b.compareTo(sdc1a)).isEqualTo(1);
-        Assertions.assertThat(sdc1a.compareTo(sdc1a)).isEqualTo(0);
-        Assertions.assertThat(sdc1a.compareTo(sdc2)).isEqualTo(-1);
-    }
-
-    @Test
-    public void testEquals() {
-        SdcResourceBasicInfo sdc1a = new SdcResourceBasicInfo();
-        sdc1a.setName("test1");
-        sdc1a.setVersion("1.0");
-
-        SdcResourceBasicInfo sdc1b = new SdcResourceBasicInfo();
-        sdc1b.setName("test1");
-        sdc1b.setVersion("2.0");
-
-        SdcResourceBasicInfo sdc2 = new SdcResourceBasicInfo();
-        sdc2.setName("test2");
-        sdc2.setVersion("2.0");
-
-        Assertions.assertThat(sdc1a.equals(sdc1a)).isTrue();
-        Assertions.assertThat(sdc1a.equals(sdc1b)).isFalse();
-
-        sdc1b.setVersion(null);
-        Assertions.assertThat(sdc1a.equals(sdc1b)).isFalse();
-        sdc1b.setVersion("1.0");
-        Assertions.assertThat(sdc1a.equals(sdc1b)).isTrue();
-        sdc1a.setVersion(null);
-        sdc1b.setVersion(null);
-        Assertions.assertThat(sdc1a.equals(sdc1b)).isTrue();
-
-        sdc1b.setName(null);
-        Assertions.assertThat(sdc1a.equals(sdc1b)).isFalse();
-        sdc1b.setName("test1");
-        Assertions.assertThat(sdc1a.equals(sdc1b)).isTrue();
-        sdc1a.setName(null);
-        sdc1b.setName(null);
-        Assertions.assertThat(sdc1a.equals(sdc1b)).isTrue();
-    }
-
-}
diff --git a/ui-react/src/theme/globalStyle.js b/ui-react/src/theme/globalStyle.js
index a0c338c..bb41bc1 100644
--- a/ui-react/src/theme/globalStyle.js
+++ b/ui-react/src/theme/globalStyle.js
@@ -90,5 +90,5 @@
 	menuBackgroundColor: 'white',
 	menuFontColor: 'black',
 	menuHighlightedBackgroundColor: '#337ab7',
-	menuHighlightedFontColor: 'white',
+	menuHighlightedFontColor: 'white'
 };
