diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetEnni.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetEnni.java
index 7b776a0..41c57fa 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetEnni.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetEnni.java
@@ -15,6 +15,7 @@
  */
 package org.onosproject.ecord.carrierethernet.app;
 
+import com.google.common.collect.Sets;
 import org.onlab.packet.VlanId;
 import org.onlab.util.Bandwidth;
 import org.onosproject.net.ConnectPoint;
@@ -24,7 +25,6 @@
 import static com.google.common.base.MoreObjects.toStringHelper;
 import static org.slf4j.LoggerFactory.getLogger;
 
-import java.util.HashSet;
 import java.util.Set;
 
 /**
@@ -64,7 +64,7 @@
         super(connectPoint, uniCfgId);
         // TODO: Check for null
         this.role = role;
-        this.sVlanIdSet = new HashSet<>();
+        this.sVlanIdSet = Sets.newConcurrentHashSet();
         // The following applies only to service-specific ENNIs
         if (sVlanId != null) {
             this.sVlanIdSet.add(sVlanId);
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetForwardingConstruct.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetForwardingConstruct.java
index 85fcd2c..d8f9014 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetForwardingConstruct.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetForwardingConstruct.java
@@ -28,16 +28,63 @@
  */
 public class CarrierEthernetForwardingConstruct {
 
+    public enum State {
+
+        ACTIVE("Active"),
+        INACTIVE("Inactive");
+
+        private String value;
+
+        State(String value) {
+            this.value = value;
+        }
+
+        @Override
+        public String toString() {
+            return value;
+        }
+
+        public static State fromString(String value) {
+            if (value != null) {
+                for (State b : State.values()) {
+                    if (value.equals(b.value)) {
+                        return b;
+                    }
+                }
+            }
+            throw new IllegalArgumentException("State " + value + " is not valid");
+        }
+    }
+
+    public enum ActiveState {
+
+        FULL("Full"),
+        PARTIAL("Partial");
+
+        private String value;
+
+        ActiveState(String value) {
+            this.value = value;
+        }
+
+        @Override
+        public String toString() {
+            return value;
+        }
+    }
+
     protected String fcId;
     protected String fcCfgId;
     protected String evcId;
     protected CarrierEthernetVirtualConnection.Type evcType;
     protected Set<CarrierEthernetLogicalTerminationPoint> ltpSet;
+    protected CarrierEthernetForwardingConstruct.State state;
+    protected CarrierEthernetForwardingConstruct.ActiveState activeState;
     protected Duration latency;
     protected CarrierEthernetMetroConnectivity metroConnectivity;
     protected boolean congruentPaths;
 
-    // FIXME: Temporary solution
+    // FIXME: Find a better way
     protected CarrierEthernetVirtualConnection evcLite;
 
     // Set to true if both directions should use the same path
@@ -54,13 +101,14 @@
         this.fcCfgId = (fcCfgId == null? fcId : fcCfgId);
         this.evcId = evcId;
         this.evcType = evcType;
-        this.ltpSet = new HashSet<>();
-        this.ltpSet.addAll(ltpSet);
+        this.state = State.INACTIVE;
+        this.ltpSet = new HashSet<>(ltpSet);
         this.congruentPaths = CONGRUENT_PATHS;
         this.latency = DEFAULT_LATENCY;
         this.metroConnectivity = new CarrierEthernetMetroConnectivity(null, MetroPathEvent.Type.PATH_REMOVED);
 
-        // FIXME: Temporary solution: Create a lightweight EVC out of the FC which can be used with existing methods
+        // FIXME: This is (probably) just a temporary solution
+        // Create a lightweight EVC out of the FC which can be used with existing methods
         Set<CarrierEthernetUni> uniSet = new HashSet<>();
         ltpSet.forEach(ltp -> {
             if (ltp.ni() instanceof CarrierEthernetUni) {
@@ -111,13 +159,29 @@
     }
 
     /**
+     * Returns connectivity state of the FC.
+     *
+     * @return connectivity state
+     */
+    public State state() {
+        return state;
+    }
+
+    /**
+     * Returns active connectivity state of the FC.
+     *
+     * @return active connectivity state
+     */
+    public ActiveState activeState() {
+        return activeState;
+    }
+
+    /**
      * Returns the "EVC" associated with FC.
      *
      * @return the "EVC" associated with FC
      */
-    public CarrierEthernetVirtualConnection evcLite() {
-        return evcLite;
-    }
+    public CarrierEthernetVirtualConnection evcLite() { return evcLite; }
 
     /**
      * Sets the id of the FC.
@@ -128,4 +192,27 @@
         this.fcId = id;
     }
 
+    /**
+     * Sets the set of LTPs.
+     *
+     * @param ltpSet the set of LTPs to be set
+     */
+    public void setLtpSet(Set<CarrierEthernetLogicalTerminationPoint> ltpSet) {
+        this.ltpSet = ltpSet;
+    }
+
+    /**
+     * Sets the connectivity state of the FC.
+     *
+     * @param state the connectivity state to set
+     */
+    public void setState(State state) { this.state = state; }
+
+    /**
+     * Sets the active connectivity state of the FC.
+     *
+     * @param activeState the active connectivity state to set
+     */
+    public void setActiveState(ActiveState activeState) { this.activeState = activeState; }
+
 }
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetInni.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetInni.java
index 5dace45..a195bc1 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetInni.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetInni.java
@@ -15,6 +15,8 @@
  */
 package org.onosproject.ecord.carrierethernet.app;
 
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
 import org.onlab.packet.VlanId;
 import org.onlab.util.Bandwidth;
 import org.onosproject.net.ConnectPoint;
@@ -24,7 +26,6 @@
 import static com.google.common.base.MoreObjects.toStringHelper;
 import static org.slf4j.LoggerFactory.getLogger;
 
-import java.util.HashSet;
 import java.util.Set;
 
 /**
@@ -60,15 +61,13 @@
     protected Set<VlanId> sVlanIdSet;
     String tpid;
 
-
-    // TODO: Add TPID?
     public CarrierEthernetInni(ConnectPoint connectPoint, String uniCfgId, Role role, VlanId sVlanId, String tpid,
                                Bandwidth usedCapacity) {
 
         super(connectPoint, uniCfgId);
         // TODO: Check for null
         this.role = role;
-        this.sVlanIdSet = new HashSet<>();
+        this.sVlanIdSet = Sets.newConcurrentHashSet();
         // The following applies only to service-specific INNIs
         if (sVlanId != null) {
             this.sVlanIdSet.add(sVlanId);
@@ -163,7 +162,7 @@
      * @return S-VLAN id set
      */
     public Set<VlanId> sVlanIdSet() {
-        return sVlanIdSet;
+        return ImmutableSet.copyOf(sVlanIdSet);
     }
 
     /**
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetLogicalTerminationPoint.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetLogicalTerminationPoint.java
index ba079d4..a94c885 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetLogicalTerminationPoint.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetLogicalTerminationPoint.java
@@ -64,16 +64,17 @@
     public CarrierEthernetLogicalTerminationPoint(String ltpCfgId, CarrierEthernetNetworkInterface ni) {
         checkNotNull(ni);
         this.ni = ni;
+        // NOTE: Role is expected to be null for service-specific LTPs/NIs
         if (ni instanceof CarrierEthernetUni) {
             this.type = Type.UNI;
+            this.role = (ni.role() == null ? null : Role.valueOf(((CarrierEthernetUni) ni).role().name()));
         } else if (ni instanceof CarrierEthernetInni) {
             this.type = Type.INNI;
+            this.role = (ni.role() == null ? null : Role.valueOf(((CarrierEthernetInni) ni).role().name()));
         } else {
-        this.type = Type.ENNI;
+            this.type = Type.ENNI;
+            this.role = (ni.role() == null ? null : Role.valueOf(((CarrierEthernetEnni) ni).role().name()));
         }
-        // NOTE: Role is expected to be null for service-specific LTPs/NIs
-        this.role = (ni.role() == null? null : CarrierEthernetLogicalTerminationPoint.Role
-                .valueOf(ni.role().toString()));
         this.ltpId = this.cp().deviceId().toString() + "/" + this.cp().port().toString();
         this.ltpCfgId = (ltpCfgId == null ? this.ltpId : ltpCfgId);
     }
@@ -147,7 +148,7 @@
                 .add("id", ltpId)
                 .add("cfgId", ltpCfgId)
                 .add("role", role)
-                .add("uni", ni).toString();
+                .add("ni", ni).toString();
     }
 
 }
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetManager.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetManager.java
index 9660ee9..610be32 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetManager.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetManager.java
@@ -50,6 +50,7 @@
 import java.util.Optional;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -93,10 +94,11 @@
     private NetworkConfigListener netcfgListener = new InternalNetworkConfigListener();
 
     // Keeps track of the next S-VLAN tag the app will try to use
-    private static short curVlanId = 0;
+    private static short nextVlanId = 1;
 
     private static final int METRO_CONNECT_TIMEOUT_MILLIS = 7000;
 
+    // If set to false, the setup of optical connectivity using the metro app is bypassed
     private static final boolean PACKET_OPTICAL_TOPO = false;
 
     // TODO: Implement distributed store for EVCs
@@ -179,7 +181,7 @@
      *
      * @return the FC map
      */
-    public Map<String, CarrierEthernetForwardingConstruct> getFcMap() {
+    public Map<String, CarrierEthernetForwardingConstruct> fcMap() {
         return fcMap;
     }
 
@@ -274,11 +276,11 @@
                     log.warn("UNI {} could not be added to EVC.", uni.id());
                     continue;
                 } else {
-                    // Add UNI to evc description
+                    // Add UNI to EVC
                     validatedUniSet.add(uni);
                 }
             } else {
-                // Add UNI to EVC description
+                // Add UNI to EVC
                 validatedUniSet.add(uni);
             }
         }
@@ -291,17 +293,13 @@
             return null;
         }
 
-        if (evc.type().equals(CarrierEthernetVirtualConnection.Type.ROOT_MULTIPOINT) && (evc.uniSet().size() < 2)) {
+        if ((evc.type().equals(CarrierEthernetVirtualConnection.Type.ROOT_MULTIPOINT)
+                || evc.type().equals(CarrierEthernetVirtualConnection.Type.MULTIPOINT_TO_MULTIPOINT))
+                && (evc.uniSet().size() < 2)) {
             log.error("{} EVC requires at least two UNIs.", evc.type().name());
             return null;
         }
 
-        if (evc.type().equals(CarrierEthernetVirtualConnection.Type.MULTIPOINT_TO_MULTIPOINT) &&
-                (evc.uniSet().size() < 3)) {
-            log.error("{} EVC requires more than two UNIs.", evc.type().name());
-            return null;
-        }
-
         if (evc.type().equals(CarrierEthernetVirtualConnection.Type.POINT_TO_POINT) && (evc.uniSet().size() != 2)) {
             log.error("{} EVC requires exactly two UNIs.", evc.type().name());
             return null;
@@ -313,20 +311,19 @@
     /**
      * Establish connectivity according to the EVC type (E-Line, E-Tree, E-LAN) and the EVC parameters.
      *
-     * @param originalEvc the EVC representation
-     * @return the EVC active state (FULL or PARTIAL) or null if EVC connectivity could not be established
+     * @param evc the EVC representation
+     * @return the (potentially modified) EVC that was installed or null if EVC connectivity could not be established
      */
-    public CarrierEthernetVirtualConnection.ActiveState establishConnectivity(
-            CarrierEthernetVirtualConnection originalEvc) {
+    public CarrierEthernetVirtualConnection establishConnectivity(CarrierEthernetVirtualConnection evc) {
 
         // If EVC already exists, remove it and reestablish with new parameters
-        if (originalEvc.id() != null && evcMap.containsKey(originalEvc.id())) {
-            return updateEvc(originalEvc);
+        if (evc.id() != null && evcMap.containsKey(evc.id())) {
+            return updateEvc(evc);
         } else {
-            originalEvc.setId(null);
+            evc.setId(null);
         }
 
-        CarrierEthernetVirtualConnection evc = validateEvc(originalEvc);
+        validateEvc(evc);
 
         if (evc == null) {
             log.error("EVC could not be installed, please check log for details.");
@@ -341,16 +338,16 @@
         // Temporary set for indicating which UNIs were finally included in the EVC
         Set<CarrierEthernetUni> usedUniSet = new HashSet<>();
 
-        Iterator<CarrierEthernetUni> it1 = uniSet.iterator();
-        while (it1.hasNext()) {
+        Iterator<CarrierEthernetUni> uniIt1 = uniSet.iterator();
+        while (uniIt1.hasNext()) {
 
-            CarrierEthernetUni uni1 = it1.next();
+            CarrierEthernetUni uni1 = uniIt1.next();
 
             // Iterate through all the remaining UNIs
-            Iterator<CarrierEthernetUni> it2 = uniSet.iterator();
-            while (it2.hasNext()) {
+            Iterator<CarrierEthernetUni> uniIt2 = uniSet.iterator();
+            while (uniIt2.hasNext()) {
 
-                CarrierEthernetUni uni2 = it2.next();
+                CarrierEthernetUni uni2 = uniIt2.next();
 
                 // Skip equals
                 if (uni1.equals(uni2)) {
@@ -409,7 +406,7 @@
                 usedUniSet.add(uni2);
             }
             // Remove UNI from temporary set so that each pair is visited only once
-            it1.remove();
+            uniIt1.remove();
         }
 
         // Update the EVC UNI set, based on the UNIs actually used
@@ -431,16 +428,16 @@
             }
         }
 
-        return evc.activeState();
+        return evc;
     }
 
     /**
      * Reestablish connectivity for an existing EVC.
      *
-     * @param originalEvc the updated CE evc definition
-     * @return boolean value indicating whether the EVC could be established even partially
+     * @param originalEvc the updated EVC definition
+     * @return the (potentially modified) EVC that was installed or null if EVC connectivity could not be established
      */
-    public CarrierEthernetVirtualConnection.ActiveState updateEvc(CarrierEthernetVirtualConnection originalEvc) {
+    public CarrierEthernetVirtualConnection updateEvc(CarrierEthernetVirtualConnection originalEvc) {
         // Just checking again
         if (evcMap.containsKey(originalEvc.id())) {
             log.info("Updating existing EVC {}", originalEvc.id());
@@ -492,9 +489,9 @@
     }
 
     /**
-     * Removes all resources associated with the application.
+     * Removes all installed EVCs and the associated resources.
      *
-     * This will be called either from the deactivate method or as a response to a CLI command.
+     * This will be called either from the deactivate method or as a response to a CLI/REST command.
      * */
     public void removeAllEvcs() {
         evcMap.keySet().forEach(evcId -> {
@@ -503,12 +500,14 @@
             cePktProvisioner.removeBandwidthProfiles(evc);
             removeMetroConnectivity(evc.metroConnectivity().id());
             removeBandwidthProfiles(evcId);
+            // Avoid excessively incrementing VLAN ids
+            nextVlanId = evc.vlanId().toShort();
         });
         evcMap.clear();
     }
 
     /**
-     * Removes all resources associated with a specific EVC.
+     * Removes all resources associated with a specific installed EVC.
      *
      * @param evcId the EVC id
      * */
@@ -519,18 +518,20 @@
             cePktProvisioner.removeBandwidthProfiles(evc);
             removeMetroConnectivity(evc.metroConnectivity().id());
             removeBandwidthProfiles(evcId);
+            // Avoid excessively incrementing VLAN ids
+            nextVlanId = evc.vlanId().toShort();
             evcMap.remove(evcId);
         }
     }
 
     // FIXME: Rethink this approach
     /**
-     * Installs all resources associated with a specific FC.
+     * Verify the validity of an FC representation taking also into account current network status.
      *
-     * @param fc the FC to install
-     * @return the FC that was installed
-     * */
-    public CarrierEthernetForwardingConstruct installFc(CarrierEthernetForwardingConstruct fc) {
+     * @param fc the provided FC representation
+     * @return a valid, potentially modified FC representation, or null if the FC could not be validated
+     */
+    private CarrierEthernetForwardingConstruct validateFc(CarrierEthernetForwardingConstruct fc) {
 
         // Try to set a unique VLAN id for the FC unless the EVC is being updated
         // TODO: Add different connectivity types
@@ -591,10 +592,54 @@
             }
         }
 
-        // Temporary set for iterating through EVC NI pairs
+        // TODO: Add validation for INNIs/ENNIs as well
+
+        // Update the FC LTP set, based on the UNIs actually used
+        Set<CarrierEthernetLogicalTerminationPoint> validatedLtpSet = new HashSet<>();
+        Iterator<CarrierEthernetLogicalTerminationPoint> ltpIt = fc.ltpSet().iterator();
+        while(ltpIt.hasNext()) {
+            CarrierEthernetLogicalTerminationPoint ltp = ltpIt.next();
+            if ((ltp.ni() instanceof CarrierEthernetUni) && (!validatedUniSet.contains(ltp.ni()))) {
+                continue;
+            }
+            validatedLtpSet.add(ltp);
+        }
+        fc.setLtpSet(validatedLtpSet);
+
+        return fc;
+    }
+
+    // FIXME: Rethink this approach
+    /**
+     * Installs all resources associated with a specific FC.
+     *
+     * @param fc the FC to install
+     * @return the FC that was installed
+     * */
+    public CarrierEthernetForwardingConstruct installFc(CarrierEthernetForwardingConstruct fc) {
+
+        // If FC already exists, remove it and reestablish with new parameters
+        if (fc.id() != null && fcMap.containsKey(fc.id())) {
+            return updateFc(fc);
+        } else {
+            fc.setId(null);
+        }
+
+        validateFc(fc);
+
+        if (fc == null) {
+            log.error("FC could not be installed, please check log for details.");
+            return null;
+        }
+
+        boolean allPairsConnected = true;
+
+        // Temporary set for iterating through FC NI pairs
 
         Set<CarrierEthernetNetworkInterface> niSet = new HashSet<>();
-        fc.ltpSet().forEach(ltp -> niSet.add(ltp.ni()));
+        fc.ltpSet().forEach(ltp -> {
+            niSet.add(ltp.ni());
+        });
 
         // Temporary set for indicating which NIs were finally included in the FC
         Set<CarrierEthernetNetworkInterface> usedNiSet = new HashSet<>();
@@ -610,8 +655,6 @@
 
                 CarrierEthernetNetworkInterface ni2 = it2.next();
 
-                log.info("Trying to establish connectivity between {} and {}", ni1.id(), ni2.id());
-
                 // Skip equals
                 if (ni1.equals(ni2)) {
                     continue;
@@ -624,9 +667,13 @@
 
                 if (!cePktProvisioner.setupConnectivity(ni1, ni2, fc.evcLite())) {
                     log.warn("Could not set up packet connectivity between {} and {}", ni1, ni2);
+                    allPairsConnected = false;
                     continue;
                 }
 
+                // Indicate that connection for at least one LTP pair has been established
+                fc.setState(CarrierEthernetForwardingConstruct.State.ACTIVE);
+
                 // Add UNIs to the set of UNIs used by the EVC
                 usedNiSet.add(ni1);
                 usedNiSet.add(ni2);
@@ -635,21 +682,53 @@
             it1.remove();
         }
 
-        // TODO: Update the EVC NI set, based on the NIs actually used
-        //fc.setNiSet(usedNiSet);
-        // Also update the corresponding evcLite
+        // Update the FC LTP set, based on the NIs actually used
+        Set<CarrierEthernetLogicalTerminationPoint> usedLtpSet = new HashSet<>();
+        fc.ltpSet().forEach(ltp -> {
+            if (usedNiSet.contains(ltp.ni())) {
+                usedLtpSet.add(ltp);
+            }
+        });
+        fc.setLtpSet(usedLtpSet);
 
-        // TODO: Do the appropriate checks
-        fcMap.put(fc.id(), fc);
-        evcMap.put(fc.evcLite().id(), fc.evcLite());
-        cePktProvisioner.applyBandwidthProfiles(fc.evcLite());
-        // Apply the BWPs of the EVC UNI to the global UNIs, creating them if needed
-        applyBandwidthProfiles(fc.evcLite().uniSet());
+        // If no pair was connected, do not register the FC
+        if (fc.state().equals(CarrierEthernetForwardingConstruct.State.ACTIVE)) {
+            fcMap.put(fc.id(), fc);
+            evcMap.put(fc.evcLite().id(), fc.evcLite());
+            cePktProvisioner.applyBandwidthProfiles(fc.evcLite());
+            // Apply the BWPs of the EVC UNI to the global UNIs, creating them if needed
+            applyBandwidthProfiles(fc.evcLite().uniSet());
+        }
+
+        if (fc.state().equals(CarrierEthernetForwardingConstruct.State.ACTIVE)) {
+            if (allPairsConnected) {
+                fc.setActiveState(CarrierEthernetForwardingConstruct.ActiveState.FULL);
+            } else {
+                fc.setActiveState(CarrierEthernetForwardingConstruct.ActiveState.PARTIAL);
+            }
+        }
 
         return fc;
     }
 
     /**
+     * Reestablish connectivity for an existing FC.
+     *
+     * @param fc the updated FC representation
+     * @return the possibly modified FC that was installed or null if updated FC could not be installed
+     */
+    public CarrierEthernetForwardingConstruct updateFc(CarrierEthernetForwardingConstruct fc) {
+        // Just checking again
+        if (fcMap.containsKey(fc.id())) {
+            log.info("Updating existing FC {}", fc.id());
+            // Keep the VLAN ID of the original FC
+            fc.evcLite().setVlanId(fcMap.get(fc.id()).evcLite().vlanId());
+            removeFc(fc.id());
+        }
+        return installFc(fc);
+    }
+
+    /**
      * Removes all resources associated with the application.
      *
      * This will be called either from the deactivate method or as a response to a CLI command.
@@ -681,37 +760,25 @@
      * */
     public VlanId generateVlanId() {
 
-        Set<VlanId> vlanIdSet = new HashSet<>();
-        VlanId vlanId = null;
-
-        evcMap.values().forEach(evc -> vlanIdSet.add(evc.vlanId));
+        List<VlanId> vlanList = evcMap.values().stream().map(CarrierEthernetVirtualConnection::vlanId)
+                .collect(Collectors.toList());
 
         // If all vlanIds are being used return null, else try to find the next available one
-        if (vlanIdSet.size() <  VlanId.MAX_VLAN - 1) {
-            do {
-                curVlanId = nextValidShort(curVlanId);
-                vlanId = VlanId.vlanId(curVlanId);
+        if (vlanList.size() <  VlanId.MAX_VLAN - 1) {
+            while (vlanList.contains(VlanId.vlanId(nextVlanId))) {
+                // Get next valid short
+                nextVlanId = (nextVlanId >= VlanId.MAX_VLAN || nextVlanId <= 0 ? 1 : (short) (nextVlanId + 1));
             }
-            while (vlanIdSet.contains(vlanId));
         }
 
-        return vlanId;
-    }
-
-    private short nextValidShort(short i) {
-
-        if (i >= VlanId.MAX_VLAN || i <= 0) {
-            return 1;
-        } else {
-            return (short) (i + 1);
-        }
+        return (vlanList.contains(VlanId.vlanId(nextVlanId)) ? null : VlanId.vlanId(nextVlanId));
     }
 
     /**
-     * Generates a unique id in the context of the CE app.
+     * Generates a unique EVC id in the context of the CE app.
      *
      * @param evc the EVC representation
-     * @return the generated vlanId or null if none found
+     * @return the generated EVC id or null if none found
      * */
     public String generateEvcId(CarrierEthernetVirtualConnection evc) {
 
@@ -829,7 +896,6 @@
                     uniMap.put(ltp.ni().id(), (CarrierEthernetUni) ltp.ni());
                 }
             }
-            // TODO: Add LTPs
         });
     }
 
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetNetworkInterface.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetNetworkInterface.java
index 4cb178e..45ffb9d 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetNetworkInterface.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetNetworkInterface.java
@@ -15,6 +15,7 @@
  */
 package org.onosproject.ecord.carrierethernet.app;
 
+import com.google.common.base.Objects;
 import org.onlab.util.Bandwidth;
 import org.onosproject.cli.AbstractShellCommand;
 import org.onosproject.net.ConnectPoint;
@@ -157,4 +158,21 @@
                 .add("usedCapacity", usedCapacity).toString();
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        CarrierEthernetNetworkInterface that = (CarrierEthernetNetworkInterface) o;
+        return Objects.equal(connectPoint, that.connectPoint);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hashCode(connectPoint);
+    }
+
 }
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetUni.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetUni.java
index 872cd60..a625e57 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetUni.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetUni.java
@@ -15,6 +15,8 @@
  */
 package org.onosproject.ecord.carrierethernet.app;
 
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
 import org.onlab.packet.VlanId;
 import org.onlab.util.Bandwidth;
 import org.onosproject.net.ConnectPoint;
@@ -28,7 +30,6 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
@@ -74,7 +75,7 @@
         this.role = role;
         // FIXME: Set the NI scope directly instead?
         this.scope = (role == null ? Scope.GLOBAL : Scope.SERVICE);
-        this.ceVlanIdSet = new HashSet<>();
+        this.ceVlanIdSet = Sets.newConcurrentHashSet();
         if (ceVlanId != null) {
             this.ceVlanIdSet.add(ceVlanId);
         }
@@ -144,7 +145,9 @@
     public void removeEvcUni(CarrierEthernetUni uni) {
 
         // Remove UNI CE-VLAN ID
-        ceVlanIdSet.remove(uni.ceVlanId());
+        if (uni.ceVlanId() != null) {
+            ceVlanIdSet.remove(uni.ceVlanId());
+        }
 
         // Remove UNI BWP
         CarrierEthernetBandwidthProfile bwp = uni.bwp();
@@ -228,7 +231,7 @@
      * @return CE-VLAN id set
      */
     public Set<VlanId> ceVlanIdSet() {
-        return ceVlanIdSet;
+        return ImmutableSet.copyOf(ceVlanIdSet);
     }
 
     /**
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetVirtualConnection.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetVirtualConnection.java
index 3f34284..cc2649a 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetVirtualConnection.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/app/CarrierEthernetVirtualConnection.java
@@ -15,6 +15,7 @@
  */
 package org.onosproject.ecord.carrierethernet.app;
 
+import com.google.common.collect.ImmutableSet;
 import org.onlab.packet.VlanId;
 import org.onosproject.ecord.metro.api.MetroConnectivityId;
 import org.onosproject.ecord.metro.api.MetroPathEvent;
@@ -138,8 +139,7 @@
         this.evcActiveState = null;
         this.maxNumUni = (maxNumUni != null ? maxNumUni : (evcType.equals(Type.POINT_TO_POINT) ? 2 : MAX_NUM_UNI));
         this.vlanId = null;
-        this.uniSet = new HashSet<>();
-        this.uniSet.addAll(uniSet);
+        this.uniSet = new HashSet<>(uniSet);
         this.congruentPaths = CONGRUENT_PATHS;
         this.latency = DEFAULT_LATENCY;
         this.metroConnectivity = new CarrierEthernetMetroConnectivity(null, MetroPathEvent.Type.PATH_REMOVED);
@@ -221,7 +221,7 @@
      * @return set of UNIs
      */
     public Set<CarrierEthernetUni> uniSet() {
-        return uniSet;
+        return ImmutableSet.copyOf(uniSet);
     }
 
     /**
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetCreateFcCommand.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetCreateFcCommand.java
new file mode 100644
index 0000000..d6260e2
--- /dev/null
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetCreateFcCommand.java
@@ -0,0 +1,189 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.onosproject.ecord.carrierethernet.cli;
+
+import com.google.common.collect.Lists;
+import org.apache.karaf.shell.commands.Argument;
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.onlab.packet.VlanId;
+import org.onlab.util.Bandwidth;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.ecord.carrierethernet.app.*;
+import org.onosproject.net.ConnectPoint;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * CLI command for generating Carrier Ethernet Forwarding Constructs.
+ */
+@Command(scope = "onos", name = "ce-fc-create",
+        description = "Creates and installs a Carrier Ethernet Forwarding Construct.")
+public class CarrierEthernetCreateFcCommand extends AbstractShellCommand {
+
+    @Argument(index = 0, name = "argFcCfgId",
+            description = "Service configuration ID", required = true, multiValued = false)
+    String argFcCfgId = null;
+    @Argument(index = 1, name = "argEvcType", description =
+            "Service type (defaults to POINT_TO_POINT or MULTIPOINT_TO_MULTIPOINT, depending on number of LTPs)",
+            required = false, multiValued = false)
+    String argEvcType = null;
+    @Argument(index = 2, name = "argFirstLtp", description =
+            "First LTP in list (if point to multipoint, this is the root)", required = true, multiValued = false)
+    String argFirstLtp = null;
+    @Argument(index = 3, name = "argLtpList",
+            description = "List of remaining LTPs (if point to multipoint, these are the leaves)",
+            required = true, multiValued = true)
+    List<String> argLtpList = Lists.newArrayList();
+    @Option(name = "-v", aliases = "--cevlan", description = "CE-VLAN ID (applied to all UNIs)",
+            required = false, multiValued = false)
+    String argCeVlanId = null;
+    @Option(name = "-s", aliases = "--svlan", description = "S-TAG (applied to all INNIs/ENNIs)",
+            required = false, multiValued = false)
+    String argsTag = null;
+    @Option(name = "-id", aliases = "--fc-id", description = "The ID of an FC to be updated" +
+            " (if FC does not exist, a new FC will be installed)", required = false, multiValued = false)
+    String argFcId = null;
+    @Option(name = "-c", aliases = "--cir", description = "The CIR in Mbps", required = false, multiValued = false)
+    String argCir = "0";
+    @Option(name = "-e", aliases = "--eir", description = "The EIR in Mbps", required = false, multiValued = false)
+    String argEir = "0";
+    @Option(name = "-cbs", aliases = "--cbs", description = "The CBS in Bytes", required = false, multiValued = false)
+    String argCbs = "0";
+    @Option(name = "-ebs", aliases = "--ebs", description = "The EBS in Bytes", required = false, multiValued = false)
+    String argEbs = "0";
+
+    // TODO: Add further arguments for VLAN tag preservation, CoS preservation etc.
+
+    @Override
+    protected void execute() {
+
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
+
+        CarrierEthernetForwardingConstruct fc = new CarrierEthernetForwardingConstruct(argFcId, argFcCfgId, null,
+                generateServiceType(), generateLtpSet());
+
+        ceManager.installFc(fc);
+    }
+
+    /**
+     * Return the CE-VLAN ID for the CE service based on the CLI-supplied argument.
+     *
+     * @return CE-VLAN ID for the CE service
+     */
+    private VlanId generateVlanId(String argVlanId) {
+        return ((argVlanId == null) ? null : VlanId.vlanId(Short.parseShort(argVlanId)));
+    }
+
+    /**
+     * Return the CE service type based on the CLI-supplied arguments.
+     *
+     * @return the CE service type
+     */
+    private CarrierEthernetVirtualConnection.Type generateServiceType() {
+        if (argEvcType == null) {
+            // FIXME: This probably applies only to list of UNIs
+            return ((argLtpList.size() > 2) ?
+                    CarrierEthernetVirtualConnection.Type.MULTIPOINT_TO_MULTIPOINT :
+                    CarrierEthernetVirtualConnection.Type.POINT_TO_POINT);
+        } else {
+            // TODO: Catch exception
+            return CarrierEthernetVirtualConnection.Type.fromString(argEvcType);
+        }
+    }
+
+    /**
+     * Return the BW profile type based on the CLI-supplied arguments.
+     *
+     * @return the BWP profile type
+     */
+    private CarrierEthernetBandwidthProfile.Type generateBandwidthProfileType() {
+        // TODO: Add the CoS BW profile case
+        return ((argCeVlanId == null) ?
+                CarrierEthernetBandwidthProfile.Type.INTERFACE : CarrierEthernetBandwidthProfile.Type.EVC);
+    }
+
+    /**
+     * Return the BW profile id based on the CLI-supplied arguments.
+     *
+     * @param uniId the UNI id
+     * @return the BW profile id
+     */
+    private String generateBandwidthProfileId(String uniId) {
+        // TODO: Add the CoS BW profile case
+        return ((argCeVlanId == null) ? uniId : argFcCfgId);
+    }
+
+    /**
+     * Return the set of UNIs for the FC based on the CLI-supplied arguments.
+     *
+     * @return the set of UNIs for the FC
+     */
+    private Set<CarrierEthernetLogicalTerminationPoint> generateLtpSet() {
+
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
+
+        // Update list of global LTPs in the network
+        ceManager.addGlobalLtps(ceManager.getGlobalLtps());
+
+        Set<CarrierEthernetLogicalTerminationPoint> ltpSet = new HashSet<>();
+
+        CarrierEthernetVirtualConnection.Type serviceType = generateServiceType();
+
+        // We assume that first UNI supplied is always root
+        ltpSet.add(new CarrierEthernetLogicalTerminationPoint(argFirstLtp,
+                generateNi(argFirstLtp, CarrierEthernetUni.Role.ROOT)));
+
+        // For E-Line and E-LAN all UNIs are roots. For E-Tree all UNIs are leafs except from one
+        argLtpList.forEach(argLtp -> ltpSet
+                .add(new CarrierEthernetLogicalTerminationPoint(argLtp,
+                        generateNi(argLtp,
+                                ((serviceType == CarrierEthernetVirtualConnection.Type.ROOT_MULTIPOINT) ?
+                                CarrierEthernetUni.Role.LEAF : CarrierEthernetUni.Role.ROOT)))));
+
+        return ltpSet;
+    }
+
+    private CarrierEthernetNetworkInterface generateNi(String ltpId, CarrierEthernetUni.Role role) {
+
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
+
+        if(ceManager.getLtpMap().get(ltpId).ni() instanceof CarrierEthernetUni) {
+            return new CarrierEthernetUni(ConnectPoint.deviceConnectPoint(ltpId), null,
+                    role, generateVlanId(argCeVlanId),
+                    new CarrierEthernetBandwidthProfile(
+                            generateBandwidthProfileId(ltpId),
+                            null,
+                            generateBandwidthProfileType(),
+                            Bandwidth.mbps(Double.parseDouble(argCir)),
+                            Bandwidth.mbps(Double.parseDouble(argEir)),
+                            Long.parseLong(argCbs),
+                            Long.parseLong(argEbs)
+                    ));
+        } else if(ceManager.getLtpMap().get(ltpId).ni() instanceof CarrierEthernetInni) {
+            // FIXME: Use role properly
+            return new CarrierEthernetInni(ConnectPoint.deviceConnectPoint(ltpId), null,
+                    CarrierEthernetInni.Role.TRUNK, generateVlanId(argsTag), null, Bandwidth.bps((double) 0));
+        } else {
+            // FIXME: Use role properly
+            return new CarrierEthernetEnni(ConnectPoint.deviceConnectPoint(ltpId), null,
+                    CarrierEthernetEnni.Role.HUB, generateVlanId(argsTag), null, Bandwidth.bps((double) 0));
+        }
+    }
+
+}
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetCreateServiceCommand.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetCreateServiceCommand.java
index 7253de2..477d4c3 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetCreateServiceCommand.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetCreateServiceCommand.java
@@ -76,12 +76,12 @@
     @Override
     protected void execute() {
 
-        CarrierEthernetManager evcManager = get(CarrierEthernetManager.class);
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
 
         CarrierEthernetVirtualConnection evc = new CarrierEthernetVirtualConnection(argServiceId, argServiceCfgId,
                 generateServiceType(), generateMaxNumUni(), generateUniSet());
 
-        evcManager.establishConnectivity(evc);
+        ceManager.establishConnectivity(evc);
     }
 
     /**
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListFcsCommand.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListFcsCommand.java
new file mode 100644
index 0000000..3e60c5b
--- /dev/null
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListFcsCommand.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.onosproject.ecord.carrierethernet.cli;
+
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetForwardingConstruct;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetManager;
+
+import java.util.Collection;
+
+/**
+ * CLI command for listing all installed Forwarding Constructs.
+ */
+@Command(scope = "onos", name = "ce-fc-list",
+        description = "Lists all Carrier Ethernet Forwarding Constructs.")
+public class CarrierEthernetListFcsCommand extends AbstractShellCommand {
+
+    @Override
+    protected void execute() {
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
+        printFcs(ceManager.fcMap().values());
+    }
+
+    private void printFcs(Collection<CarrierEthernetForwardingConstruct> fcs) {
+        fcs.forEach(fc -> print("  %s", fc));
+    }
+}
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListLtpsCommand.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListLtpsCommand.java
index da642c6..983e3cb 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListLtpsCommand.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListLtpsCommand.java
@@ -31,10 +31,10 @@
 
     @Override
     protected void execute() {
-        CarrierEthernetManager evcManager = get(CarrierEthernetManager.class);
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
         // Populate global LTP map
-        evcManager.addGlobalLtps(evcManager.getGlobalLtps());
-        printLtps(evcManager.getLtpMap().values());
+        ceManager.addGlobalLtps(ceManager.getGlobalLtps());
+        printLtps(ceManager.getLtpMap().values());
     }
 
     private void printLtps(Collection<CarrierEthernetLogicalTerminationPoint> ltps) {
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListServicesCommand.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListServicesCommand.java
index 9861732..9a697e4 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListServicesCommand.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListServicesCommand.java
@@ -31,8 +31,8 @@
 
     @Override
     protected void execute() {
-        CarrierEthernetManager evcManager = get(CarrierEthernetManager.class);
-        printServices(evcManager.evcMap().values());
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
+        printServices(ceManager.evcMap().values());
     }
 
     private void printServices(Collection<CarrierEthernetVirtualConnection> services) {
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListUnisCommand.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListUnisCommand.java
index 2904602..3a4f409 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListUnisCommand.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetListUnisCommand.java
@@ -31,10 +31,10 @@
 
     @Override
     protected void execute() {
-        CarrierEthernetManager evcManager = get(CarrierEthernetManager.class);
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
         // Populate global UNI map
-        evcManager.addGlobalUnis(evcManager.getGlobalUnis());
-        printUnis(evcManager.getUniMap().values());
+        ceManager.addGlobalUnis(ceManager.getGlobalUnis());
+        printUnis(ceManager.getUniMap().values());
     }
 
     private void printUnis(Collection<CarrierEthernetUni> unis) {
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetLtpCompleter.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetLtpCompleter.java
new file mode 100644
index 0000000..045483f
--- /dev/null
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetLtpCompleter.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.onosproject.ecord.carrierethernet.cli;
+
+import org.apache.karaf.shell.console.Completer;
+import org.apache.karaf.shell.console.completer.StringsCompleter;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetManager;
+
+import java.util.List;
+import java.util.SortedSet;
+
+/**
+ * LTP ConnectPoint completer.
+ */
+public class CarrierEthernetLtpCompleter implements Completer {
+    @Override
+    public int complete(String buffer, int cursor, List<String> candidates) {
+
+        // TODO: Add memory
+
+        StringsCompleter delegate = new StringsCompleter();
+
+        CarrierEthernetManager ceManager =
+                AbstractShellCommand.get(CarrierEthernetManager.class);
+
+        SortedSet<String> strings = delegate.getStrings();
+        ceManager.getGlobalLtps().forEach(uni -> strings.add(uni.id()));
+
+        return delegate.complete(buffer, cursor, candidates);
+    }
+
+}
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveAllFcsCommand.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveAllFcsCommand.java
new file mode 100644
index 0000000..09ebb8f
--- /dev/null
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveAllFcsCommand.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.onosproject.ecord.carrierethernet.cli;
+
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetManager;
+
+/**
+ * CLI command for removing all installed Carrier Ethernet Forwarding Constructs.
+ */
+@Command(scope = "onos", name = "ce-fc-remove-all",
+        description = "Removes all installed Carrier Ethernet Forwarding Constructs.")
+public class CarrierEthernetRemoveAllFcsCommand extends AbstractShellCommand {
+
+    @Override
+    protected void execute() {
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
+        ceManager.removeAllFcs();
+    }
+}
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveAllServicesCommand.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveAllServicesCommand.java
index 201a2b8..8d047e1 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveAllServicesCommand.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveAllServicesCommand.java
@@ -28,7 +28,7 @@
 
     @Override
     protected void execute() {
-        CarrierEthernetManager evcManager = get(CarrierEthernetManager.class);
-        evcManager.removeAllEvcs();
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
+        ceManager.removeAllEvcs();
     }
 }
\ No newline at end of file
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveFcCommand.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveFcCommand.java
new file mode 100644
index 0000000..7bedc36
--- /dev/null
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveFcCommand.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * 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.onosproject.ecord.carrierethernet.cli;
+
+import org.apache.karaf.shell.commands.Argument;
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetManager;
+
+/**
+ * CLI command for removing an installed Carrier Ethernet Forwarding Construct.
+ */
+@Command(scope = "onos", name = "ce-fc-remove",
+        description = "Carrier Ethernet service removal command.")
+public class CarrierEthernetRemoveFcCommand extends AbstractShellCommand {
+
+    @Argument(index = 0, name = "argFcId", description = "Forwarding Construct ID", required = true, multiValued = false)
+    String argFcId = null;
+
+    @Override
+    protected void execute() {
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
+        ceManager.removeFc(argFcId);
+    }
+}
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveServiceCommand.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveServiceCommand.java
index 7e9b156..fec19c7 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveServiceCommand.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetRemoveServiceCommand.java
@@ -32,7 +32,7 @@
 
     @Override
     protected void execute() {
-        CarrierEthernetManager evcManager = get(CarrierEthernetManager.class);
-        evcManager.removeEvc(argServiceId);
+        CarrierEthernetManager ceManager = get(CarrierEthernetManager.class);
+        ceManager.removeEvc(argServiceId);
     }
 }
\ No newline at end of file
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetServiceIdCompleter.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetServiceIdCompleter.java
index d712882..ca03154 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetServiceIdCompleter.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetServiceIdCompleter.java
@@ -28,9 +28,9 @@
     public int complete(String buffer, int cursor, List<String> candidates) {
 
         StringsCompleter delegate = new StringsCompleter();
-        CarrierEthernetManager evcManager = AbstractShellCommand.get(CarrierEthernetManager.class);
+        CarrierEthernetManager ceManager = AbstractShellCommand.get(CarrierEthernetManager.class);
         SortedSet<String> strings = delegate.getStrings();
-        evcManager.evcMap().keySet().forEach(serviceId -> strings.add(serviceId));
+        ceManager.evcMap().keySet().forEach(serviceId -> strings.add(serviceId));
         return delegate.complete(buffer, cursor, candidates);
     }
 }
diff --git a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetUniCompleter.java b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetUniCompleter.java
index 3bf10ac..853fb5b 100644
--- a/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetUniCompleter.java
+++ b/ecord/carrierethernet/src/main/java/org/onosproject/ecord/carrierethernet/cli/CarrierEthernetUniCompleter.java
@@ -34,11 +34,11 @@
 
         StringsCompleter delegate = new StringsCompleter();
 
-        CarrierEthernetManager evcManager =
+        CarrierEthernetManager ceManager =
                 AbstractShellCommand.get(CarrierEthernetManager.class);
 
         SortedSet<String> strings = delegate.getStrings();
-        evcManager.getGlobalUnis().forEach(uni -> strings.add(uni.id()));
+        ceManager.getGlobalUnis().forEach(uni -> strings.add(uni.id()));
 
         return delegate.complete(buffer, cursor, candidates);
     }
diff --git a/ecord/carrierethernet/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/ecord/carrierethernet/src/main/resources/OSGI-INF/blueprint/shell-config.xml
index c9b8ca8..fe9e145 100644
--- a/ecord/carrierethernet/src/main/resources/OSGI-INF/blueprint/shell-config.xml
+++ b/ecord/carrierethernet/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -29,6 +29,18 @@
 
     <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
         <command>
+            <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetCreateFcCommand"/>
+            <completers>
+                <ref component-id="placeholderCompleter"/>
+                <ref component-id="carrierEthernetServiceTypeCompleter"/>
+                <ref component-id="carrierEthernetLtpCompleter"/>
+                <ref component-id="carrierEthernetLtpCompleter"/>
+            </completers>
+        </command>
+    </command-bundle>
+
+    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
             <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetRemoveServiceCommand"/>
             <completers>
                 <ref component-id="carrierEthernetServiceIdCompleter"/>
@@ -60,10 +72,32 @@
         </command>
     </command-bundle>
 
+    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetListFcsCommand"/>
+        </command>
+    </command-bundle>
+
+    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetRemoveFcCommand"/>
+            <completers>
+                <ref component-id="carrierEthernetServiceIdCompleter"/>
+            </completers>
+        </command>
+    </command-bundle>
+
+    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetRemoveAllFcsCommand"/>
+        </command>
+    </command-bundle>
+
     <bean id="placeholderCompleter" class="org.onosproject.cli.PlaceholderCompleter"/>
     <bean id="carrierEthernetServiceTypeCompleter" class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetServiceTypeCompleter"/>
     <bean id="carrierEthernetServiceIdCompleter" class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetServiceIdCompleter"/>
     <bean id="carrierEthernetUniCompleter" class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetUniCompleter"/>
+    <bean id="carrierEthernetLtpCompleter" class="org.onosproject.ecord.carrierethernet.cli.CarrierEthernetLtpCompleter"/>
     <bean id="connectPointCompleter" class="org.onosproject.cli.net.ConnectPointCompleter"/>
 
 </blueprint>
