Refactor: extract static values to Constants class, split packages

Change-Id: I5d9f07b6e0d82b40d9c1fa216b233af881ff11ab
diff --git a/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/Constants.java b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/Constants.java
new file mode 100644
index 0000000..793eadc
--- /dev/null
+++ b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/Constants.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.simplefabric.api;
+
+/**
+ * Provides constants used in simple fabric services.
+ */
+public final class Constants {
+
+    private Constants() {
+    }
+
+    // App symbols
+    public static final String APP_ID = "org.onosproject.simplefabric";
+    public static final String L2FORWARD_APP_ID = "org.onosproject.simplefabric.l2forward";
+    public static final String REACTIVE_APP_ID = "org.onosproject.simplefabric.reactive";
+
+    // Priority for l2NetworkRouting: L2NETWORK_UNICAST or L2NETWORK_BROADCAST
+    public static final int PRI_L2NETWORK_UNICAST = 601;
+    public static final int PRI_L2NETWORK_BROADCAST = 600;
+
+    // Reactive Routing within Local Subnets
+    // ASSUME: local subnets NEVER overlaps each other
+    public static final int PRI_REACTIVE_LOCAL_FORWARD = 501;
+    public static final int PRI_REACTIVE_LOCAL_INTERCEPT = 500;
+    // Reactive Routing for Border Routes with local subnet
+    // Priority: REACTIVE_BROUTE_BASE + routeIpPrefix * REACTIVE_BROUTE_STEP
+    //           + REACTIVE_BROUTE_FORWARD or REACTIVE_BROUTE_INTERCEPT
+    public static final int PRI_REACTIVE_BORDER_BASE = 100;
+    public static final int PRI_REACTIVE_BORDER_STEP = 2;
+    public static final int PRI_REACTIVE_BORDER_FORWARD = 1;
+    public static final int PRI_REACTIVE_BORDER_INTERCEPT = 0;
+
+    // Simple fabric event related timers
+    public static final long IDLE_INTERVAL_MSEC = 5000;
+
+    // Feature control parameters
+    public static final boolean ALLOW_IPV6 = false;
+    public static final boolean ALLOW_ETH_ADDRESS_SELECTOR = true;
+    public static final boolean REACTIVE_SINGLE_TO_SINGLE = false;
+    public static final boolean REACTIVE_ALLOW_LINK_CP = false;  // MUST BE false (yjlee, 2017-10-18)
+    public static final boolean REACTIVE_HASHED_PATH_SELECTION = false;
+    public static final boolean REACTIVE_MATCH_IP_PROTO = false;
+}
diff --git a/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/L2Network.java b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/L2Network.java
index 0b38f48..fc28ae2 100644
--- a/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/L2Network.java
+++ b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/L2Network.java
@@ -20,17 +20,19 @@
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Sets;
 import org.onlab.packet.VlanId;
-import org.onosproject.net.intf.Interface;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DeviceId;
+import org.onosproject.net.EncapsulationType;
 import org.onosproject.net.Host;
 import org.onosproject.net.HostId;
-import org.onosproject.net.EncapsulationType;
+import org.onosproject.net.intf.Interface;
 
 import java.util.Collection;
 import java.util.Objects;
 import java.util.Set;
 
+import static org.onosproject.simplefabric.api.Constants.ALLOW_ETH_ADDRESS_SELECTOR;
+
 
 /**
  * Class stores a L2Network information.
@@ -63,8 +65,8 @@
         this.interfaceNames = Sets.newHashSet();
         this.interfaceNames.addAll(ifaceNames);
         this.encapsulation = encapsulation;
-        this.l2Forward = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? l2Forward : false;
-        this.l2Broadcast = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? l2Broadcast : false;
+        this.l2Forward = (ALLOW_ETH_ADDRESS_SELECTOR) ? l2Forward : false;
+        this.l2Broadcast = (ALLOW_ETH_ADDRESS_SELECTOR) ? l2Broadcast : false;
         this.interfaces = Sets.newHashSet();
         this.hostIds = Sets.newHashSet();
         this.dirty = false;
@@ -80,8 +82,8 @@
         this.name = name;
         this.interfaceNames = Sets.newHashSet();
         this.encapsulation = encapsulation;
-        this.l2Forward = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? true : false;
-        this.l2Broadcast = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? true : false;
+        this.l2Forward = (ALLOW_ETH_ADDRESS_SELECTOR) ? true : false;
+        this.l2Broadcast = (ALLOW_ETH_ADDRESS_SELECTOR) ? true : false;
         this.interfaces = Sets.newHashSet();
         this.hostIds = Sets.newHashSet();
         this.dirty = false;
@@ -109,8 +111,8 @@
         Objects.requireNonNull(l2Network);
         L2Network l2NetworkCopy = new L2Network(l2Network.name(), l2Network.encapsulation());
         l2NetworkCopy.interfaceNames.addAll(l2Network.interfaceNames());
-        l2NetworkCopy.l2Forward = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? l2Network.l2Forward() : false;
-        l2NetworkCopy.l2Broadcast = (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) ? l2Network.l2Broadcast() : false;
+        l2NetworkCopy.l2Forward = (ALLOW_ETH_ADDRESS_SELECTOR) ? l2Network.l2Forward() : false;
+        l2NetworkCopy.l2Broadcast = (ALLOW_ETH_ADDRESS_SELECTOR) ? l2Network.l2Broadcast() : false;
         l2NetworkCopy.interfaces.addAll(l2Network.interfaces());
         l2NetworkCopy.hostIds.addAll(l2Network.hostIds());
         l2NetworkCopy.setDirty(l2Network.dirty());
diff --git a/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricService.java b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricService.java
index 18464dc..2687c9d 100644
--- a/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricService.java
+++ b/apps/simplefabric/api/src/main/java/org/onosproject/simplefabric/api/SimpleFabricService.java
@@ -34,38 +34,6 @@
 public interface SimpleFabricService
         extends ListenerService<SimpleFabricEvent, SimpleFabricListener> {
 
-    // App symbols
-    static final String APP_ID = "org.onosproject.simplefabric";
-    static final String L2FORWARD_APP_ID = "org.onosproject.simplefabric.l2forward";
-    static final String REACTIVE_APP_ID = "org.onosproject.simplefabric.reactive";
-
-    // Priority for l2NetworkRouting: L2NETWORK_UNICAST or L2NETWORK_BROADCAST
-    static final int PRI_L2NETWORK_UNICAST = 601;
-    static final int PRI_L2NETWORK_BROADCAST = 600;
-
-    // Reactive Routing within Local Subnets
-    // ASSUME: local subnets NEVER overlaps each other
-    static final int PRI_REACTIVE_LOCAL_FORWARD = 501;
-    static final int PRI_REACTIVE_LOCAL_INTERCEPT = 500;
-    // Reactive Routing for Border Routes with local subnet
-    // Priority: REACTIVE_BROUTE_BASE + routeIpPrefix * REACTIVE_BROUTE_STEP
-    //           + REACTIVE_BROUTE_FORWARD or REACTIVE_BROUTE_INTERCEPT
-    static final int PRI_REACTIVE_BORDER_BASE = 100;
-    static final int PRI_REACTIVE_BORDER_STEP = 2;
-    static final int PRI_REACTIVE_BORDER_FORWARD = 1;
-    static final int PRI_REACTIVE_BORDER_INTERCEPT = 0;
-
-    // Simple fabric event related timers
-    static final long IDLE_INTERVAL_MSEC = 5000;
-
-    // Feature control parameters
-    static final boolean ALLOW_IPV6 = false;
-    static final boolean ALLOW_ETH_ADDRESS_SELECTOR = true;
-    static final boolean REACTIVE_SINGLE_TO_SINGLE = false;
-    static final boolean REACTIVE_ALLOW_LINK_CP = false;  // MUST BE false (yjlee, 2017-10-18)
-    static final boolean REACTIVE_HASHED_PATH_SELECTION = false;
-    static final boolean REACTIVE_MATCH_IP_PROTO = false;
-
     /**
      * Gets appId.
      *
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricCommand.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommand.java
similarity index 95%
rename from apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricCommand.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommand.java
index 75db695..b7d413c 100644
--- a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricCommand.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommand.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.cli;
 
 import org.apache.karaf.shell.commands.Argument;
 import org.apache.karaf.shell.commands.Command;
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricCommandCompleter.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommandCompleter.java
similarity index 94%
rename from apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricCommandCompleter.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommandCompleter.java
index f497721..d216bac 100644
--- a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricCommandCompleter.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/SimpleFabricCommandCompleter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.cli;
 
 import com.google.common.collect.Lists;
 import org.apache.karaf.shell.console.completer.ArgumentCompleter;
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/package-info.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/package-info.java
new file mode 100644
index 0000000..1a92219
--- /dev/null
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/cli/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Simple fabric CLI package.
+ */
+package org.onosproject.simplefabric.cli;
\ No newline at end of file
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricConfig.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricConfig.java
similarity index 98%
rename from apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricConfig.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricConfig.java
index fada766..b163660 100644
--- a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricConfig.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.impl;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.google.common.collect.Sets;
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricL2Forward.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricL2Forward.java
similarity index 97%
rename from apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricL2Forward.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricL2Forward.java
index 45a9fdd..819beee 100644
--- a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricL2Forward.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricL2Forward.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.impl;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
@@ -63,6 +63,10 @@
 import java.util.Map;
 import java.util.stream.Collectors;
 
+import static org.onosproject.simplefabric.api.Constants.L2FORWARD_APP_ID;
+import static org.onosproject.simplefabric.api.Constants.PRI_L2NETWORK_BROADCAST;
+import static org.onosproject.simplefabric.api.Constants.PRI_L2NETWORK_UNICAST;
+
 
 /**
  * An implementation of L2NetworkOperationService.
@@ -101,7 +105,7 @@
 
     @Activate
     public void activate() {
-        l2ForwardAppId = coreService.registerApplication(simpleFabric.L2FORWARD_APP_ID);
+        l2ForwardAppId = coreService.registerApplication(L2FORWARD_APP_ID);
         log.info("simple fabric l2 forwaring starting with l2net app id {}", l2ForwardAppId.toString());
 
         simpleFabric.addListener(simpleFabricListener);
@@ -294,7 +298,7 @@
                     .filteredIngressPoint(srcFcp)
                     .filteredEgressPoints(dstFcps)
                     .constraints(buildConstraints(L2NETWORK_CONSTRAINTS, l2Network.encapsulation()))
-                    .priority(SimpleFabricService.PRI_L2NETWORK_BROADCAST)
+                    .priority(PRI_L2NETWORK_BROADCAST)
                     .resourceGroup(resourceGroup);
             brcIntents.add(intentBuilder.build());
         });
@@ -325,7 +329,7 @@
                     .filteredIngressPoints(srcFcps)
                     .filteredEgressPoint(hostFcp)
                     .constraints(buildConstraints(L2NETWORK_CONSTRAINTS, l2Network.encapsulation()))
-                    .priority(SimpleFabricService.PRI_L2NETWORK_UNICAST)
+                    .priority(PRI_L2NETWORK_UNICAST)
                     .resourceGroup(resourceGroup);
             uniIntents.add(intentBuilder.build());
         });
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricManager.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricManager.java
similarity index 94%
rename from apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricManager.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricManager.java
index 445fb71..59f26f0 100644
--- a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricManager.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricManager.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.impl;
 
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Maps;
@@ -29,42 +29,42 @@
 import org.apache.felix.scr.annotations.Service;
 import org.onlab.packet.ARP;
 import org.onlab.packet.Ethernet;
+import org.onlab.packet.IPv6;
 import org.onlab.packet.Ip4Address;
 import org.onlab.packet.Ip6Address;
 import org.onlab.packet.IpAddress;
 import org.onlab.packet.IpPrefix;
-import org.onlab.packet.IPv6;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
 import org.onlab.packet.ndp.NeighborSolicitation;
 import org.onosproject.app.ApplicationService;
+import org.onosproject.component.ComponentService;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
-import org.onosproject.component.ComponentService;
 import org.onosproject.event.ListenerRegistry;
-import org.onosproject.net.intf.Interface;
-import org.onosproject.net.intf.InterfaceService;
-import org.onosproject.net.intf.InterfaceListener;
-import org.onosproject.net.intf.InterfaceEvent;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.Host;
 import org.onosproject.net.config.ConfigFactory;
 import org.onosproject.net.config.NetworkConfigEvent;
 import org.onosproject.net.config.NetworkConfigListener;
 import org.onosproject.net.config.NetworkConfigRegistry;
 import org.onosproject.net.config.NetworkConfigService;
 import org.onosproject.net.config.basics.SubjectFactories;
-import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.device.DeviceEvent;
 import org.onosproject.net.device.DeviceListener;
 import org.onosproject.net.device.DeviceService;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
 import org.onosproject.net.flow.TrafficTreatment;
-import org.onosproject.net.Host;
-import org.onosproject.net.host.HostService;
-import org.onosproject.net.host.HostListener;
 import org.onosproject.net.host.HostEvent;
-import org.onosproject.net.packet.PacketService;
+import org.onosproject.net.host.HostListener;
+import org.onosproject.net.host.HostService;
+import org.onosproject.net.intf.Interface;
+import org.onosproject.net.intf.InterfaceEvent;
+import org.onosproject.net.intf.InterfaceListener;
+import org.onosproject.net.intf.InterfaceService;
 import org.onosproject.net.packet.DefaultOutboundPacket;
 import org.onosproject.net.packet.OutboundPacket;
+import org.onosproject.net.packet.PacketService;
 import org.onosproject.simplefabric.api.IpSubnet;
 import org.onosproject.simplefabric.api.L2Network;
 import org.onosproject.simplefabric.api.Route;
@@ -77,12 +77,20 @@
 import java.io.OutputStream;
 import java.io.PrintStream;
 import java.nio.ByteBuffer;
-import java.util.HashSet;
 import java.util.Collection;
-import java.util.Set;
+import java.util.HashSet;
 import java.util.Map;
+import java.util.Set;
 
-import static org.onosproject.simplefabric.RouteTools.createBinaryString;
+import static org.onosproject.simplefabric.util.RouteTools.createBinaryString;
+import static org.onosproject.simplefabric.api.Constants.ALLOW_ETH_ADDRESS_SELECTOR;
+import static org.onosproject.simplefabric.api.Constants.ALLOW_IPV6;
+import static org.onosproject.simplefabric.api.Constants.APP_ID;
+import static org.onosproject.simplefabric.api.Constants.IDLE_INTERVAL_MSEC;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_ALLOW_LINK_CP;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_HASHED_PATH_SELECTION;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_MATCH_IP_PROTO;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_SINGLE_TO_SINGLE;
 
 
 /**
@@ -187,7 +195,7 @@
 
         componentService.activate(appId, SimpleFabricNeighbour.class.getName());
         componentService.activate(appId, SimpleFabricReactiveRouting.class.getName());
-        if (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) {
+        if (ALLOW_ETH_ADDRESS_SELECTOR) {
             componentService.activate(appId, SimpleFabricL2Forward.class.getName());
         }
 
@@ -203,7 +211,7 @@
 
         componentService.deactivate(appId, SimpleFabricNeighbour.class.getName());
         componentService.deactivate(appId, SimpleFabricReactiveRouting.class.getName());
-        if (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR) {
+        if (ALLOW_ETH_ADDRESS_SELECTOR) {
             componentService.deactivate(appId, SimpleFabricL2Forward.class.getName());
         }
 
@@ -490,18 +498,12 @@
     protected void dump(String subject, PrintStream out) {
         if ("show".equals(subject)) {
             out.println("Static Configuration Flag:");
-            out.println("    ALLOW_IPV6="
-                        + SimpleFabricService.ALLOW_IPV6);
-            out.println("    ALLOW_ETH_ADDRESS_SELECTOR="
-                        + SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR);
-            out.println("    REACTIVE_SINGLE_TO_SINGLE="
-                        + SimpleFabricService.REACTIVE_SINGLE_TO_SINGLE);
-            out.println("    REACTIVE_ALLOW_LINK_CP="
-                        + SimpleFabricService.REACTIVE_ALLOW_LINK_CP);
-            out.println("    REACTIVE_HASHED_PATH_SELECTION="
-                        + SimpleFabricService.REACTIVE_HASHED_PATH_SELECTION);
-            out.println("    REACTIVE_MATCH_IP_PROTO="
-                        + SimpleFabricService.REACTIVE_MATCH_IP_PROTO);
+            out.println("    ALLOW_IPV6=" + ALLOW_IPV6);
+            out.println("    ALLOW_ETH_ADDRESS_SELECTOR=" + ALLOW_ETH_ADDRESS_SELECTOR);
+            out.println("    REACTIVE_SINGLE_TO_SINGLE=" + REACTIVE_SINGLE_TO_SINGLE);
+            out.println("    REACTIVE_ALLOW_LINK_CP=" + REACTIVE_ALLOW_LINK_CP);
+            out.println("    REACTIVE_HASHED_PATH_SELECTION=" + REACTIVE_HASHED_PATH_SELECTION);
+            out.println("    REACTIVE_MATCH_IP_PROTO=" + REACTIVE_MATCH_IP_PROTO);
             out.println("");
             out.println("SimpleFabricAppId:");
             out.println("    " + getAppId());
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricNeighbour.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricNeighbour.java
similarity index 98%
rename from apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricNeighbour.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricNeighbour.java
index 1b5330c..9924343 100644
--- a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricNeighbour.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricNeighbour.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.impl;
 
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricReactiveRouting.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricReactiveRouting.java
similarity index 94%
rename from apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricReactiveRouting.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricReactiveRouting.java
index 4f83ae3..8dab9c8 100644
--- a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricReactiveRouting.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/SimpleFabricReactiveRouting.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.impl;
 
 import com.google.common.collect.ImmutableList;
 import org.apache.felix.scr.annotations.Activate;
@@ -27,41 +27,41 @@
 import org.onlab.packet.ICMP6;
 import org.onlab.packet.IPv4;
 import org.onlab.packet.IPv6;
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.IpPrefix;
 import org.onlab.packet.Ip4Address;
 import org.onlab.packet.Ip4Prefix;
 import org.onlab.packet.Ip6Address;
 import org.onlab.packet.Ip6Prefix;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.IpPrefix;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
-import org.onosproject.net.FilteredConnectPoint;
-import org.onosproject.net.intf.InterfaceService;
 import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.EncapsulationType;
 import org.onosproject.net.Device;
 import org.onosproject.net.DeviceId;
+import org.onosproject.net.EncapsulationType;
+import org.onosproject.net.FilteredConnectPoint;
+import org.onosproject.net.Host;
 import org.onosproject.net.device.DeviceService;
 import org.onosproject.net.flow.DefaultFlowRule;
 import org.onosproject.net.flow.DefaultTrafficSelector;
 import org.onosproject.net.flow.DefaultTrafficTreatment;
-import org.onosproject.net.flow.TrafficSelector;
-import org.onosproject.net.flow.TrafficTreatment;
 import org.onosproject.net.flow.FlowRule;
 import org.onosproject.net.flow.FlowRuleService;
-import org.onosproject.net.Host;
+import org.onosproject.net.flow.TrafficSelector;
+import org.onosproject.net.flow.TrafficTreatment;
 import org.onosproject.net.host.HostService;
 import org.onosproject.net.intent.Constraint;
-import org.onosproject.net.intent.constraint.EncapsulationConstraint;
-import org.onosproject.net.intent.constraint.PartialFailureConstraint;
-import org.onosproject.net.intent.constraint.HashedPathSelectionConstraint;
 import org.onosproject.net.intent.Intent;
 import org.onosproject.net.intent.IntentService;
 import org.onosproject.net.intent.Key;
 import org.onosproject.net.intent.MultiPointToSinglePointIntent;
+import org.onosproject.net.intent.constraint.EncapsulationConstraint;
+import org.onosproject.net.intent.constraint.HashedPathSelectionConstraint;
+import org.onosproject.net.intent.constraint.PartialFailureConstraint;
 import org.onosproject.net.intf.Interface;
+import org.onosproject.net.intf.InterfaceService;
 import org.onosproject.net.link.LinkService;
 import org.onosproject.net.packet.DefaultOutboundPacket;
 import org.onosproject.net.packet.InboundPacket;
@@ -88,6 +88,20 @@
 import java.util.List;
 import java.util.Set;
 
+import static org.onosproject.simplefabric.api.Constants.ALLOW_ETH_ADDRESS_SELECTOR;
+import static org.onosproject.simplefabric.api.Constants.ALLOW_IPV6;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_BORDER_BASE;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_BORDER_FORWARD;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_BORDER_INTERCEPT;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_BORDER_STEP;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_LOCAL_FORWARD;
+import static org.onosproject.simplefabric.api.Constants.PRI_REACTIVE_LOCAL_INTERCEPT;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_ALLOW_LINK_CP;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_APP_ID;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_HASHED_PATH_SELECTION;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_MATCH_IP_PROTO;
+import static org.onosproject.simplefabric.api.Constants.REACTIVE_SINGLE_TO_SINGLE;
+
 
 /**
  * SimpleFabricReactiveRouting handles L3 Reactive Routing.
@@ -140,13 +154,13 @@
 
     @Activate
     public void activate() {
-        reactiveAppId = coreService.registerApplication(simpleFabric.REACTIVE_APP_ID);
+        reactiveAppId = coreService.registerApplication(REACTIVE_APP_ID);
         log.info("simple fabric reactive routing starting with app id {}", reactiveAppId.toString());
 
         // NOTE: may not clear at init for MIGHT generate pending_remove garbages
         //       use flush event from simple fabric cli command
 
-        if (simpleFabric.REACTIVE_HASHED_PATH_SELECTION) {
+        if (REACTIVE_HASHED_PATH_SELECTION) {
             reactiveConstraints = ImmutableList.of(new PartialFailureConstraint(),
                                                    new HashedPathSelectionConstraint());
         } else {
@@ -194,7 +208,7 @@
             DefaultTrafficSelector.builder().matchEthType(Ethernet.TYPE_IPV4).build(),
             PacketPriority.REACTIVE, reactiveAppId);
 
-        if (simpleFabric.ALLOW_IPV6) {
+        if (ALLOW_IPV6) {
             packetService.requestPackets(
                 DefaultTrafficSelector.builder().matchEthType(Ethernet.TYPE_IPV6).build(),
                 PacketPriority.REACTIVE, reactiveAppId);
@@ -213,7 +227,7 @@
             DefaultTrafficSelector.builder().matchEthType(Ethernet.TYPE_IPV4).build(),
             PacketPriority.REACTIVE, reactiveAppId);
 
-        if (simpleFabric.ALLOW_IPV6) {
+        if (ALLOW_IPV6) {
             packetService.cancelPackets(
                 DefaultTrafficSelector.builder().matchEthType(Ethernet.TYPE_IPV6).build(),
                 PacketPriority.REACTIVE, reactiveAppId);
@@ -369,7 +383,7 @@
                 continue;
             }
             if (!(simpleFabric.findL2Network(intent.egressPoint(), VlanId.NONE) != null ||
-                  (simpleFabric.REACTIVE_ALLOW_LINK_CP &&
+                  (REACTIVE_ALLOW_LINK_CP &&
                    !linkService.getEgressLinks(intent.egressPoint()).isEmpty()))) {
                 log.info("refresh route intents; remove intent for egress point not available: key={}", intent.key());
                 intentService.withdraw(intentService.getIntent(intent.key()));
@@ -378,7 +392,7 @@
             }
 
             // MAY NEED TO CHECK: intent.egressPoint and intent.treatment's dstMac is valid against hosts
-            if (simpleFabric.REACTIVE_SINGLE_TO_SINGLE && !simpleFabric.REACTIVE_ALLOW_LINK_CP) {
+            if (REACTIVE_SINGLE_TO_SINGLE && !REACTIVE_ALLOW_LINK_CP) {
                 // single path intent only; no need to check ingress points
                 continue;
             }
@@ -388,7 +402,7 @@
             for (FilteredConnectPoint cp : intent.filteredIngressPoints()) {
                 if (deviceService.isAvailable(cp.connectPoint().deviceId()) &&
                     (simpleFabric.findL2Network(cp.connectPoint(), VlanId.NONE) != null ||
-                     (simpleFabric.REACTIVE_ALLOW_LINK_CP &&
+                     (REACTIVE_ALLOW_LINK_CP &&
                       !linkService.getIngressLinks(cp.connectPoint()).isEmpty()))) {
                     newIngressPoints.add(cp);
                 } else {
@@ -657,7 +671,7 @@
 
         if (dstSubnet != null) {
             // destination is local subnet ip
-            if (SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR && dstSubnet.equals(srcSubnet)) {
+            if (ALLOW_ETH_ADDRESS_SELECTOR && dstSubnet.equals(srcSubnet)) {
                 // NOTE: if ALLOW_ETH_ADDRESS_SELECTOR=false; l2Forward is always false
                 L2Network l2Network = simpleFabric.findL2Network(dstSubnet.l2NetworkName());
                 treatmentSrcMac = ethPkt.getSourceMAC();
@@ -749,7 +763,7 @@
                                       EncapsulationType encap, boolean updateMac,
                                       boolean isDstLocalSubnet, int borderRoutePrefixLength) {
         if (!(simpleFabric.findL2Network(srcCp, VlanId.NONE) != null ||
-             (simpleFabric.REACTIVE_ALLOW_LINK_CP && !linkService.getIngressLinks(srcCp).isEmpty()))) {
+             (REACTIVE_ALLOW_LINK_CP && !linkService.getIngressLinks(srcCp).isEmpty()))) {
             log.warn("NO REGI for srcCp not in L2Network; srcCp={} srcPrefix={} dstPrefix={} nextHopIp={}",
                       srcCp, srcPrefix, dstPrefix, nextHopIp);
             return false;
@@ -772,7 +786,7 @@
             return false;
         }
         TrafficTreatment treatment;
-        if (updateMac && simpleFabric.ALLOW_ETH_ADDRESS_SELECTOR) {
+        if (updateMac && ALLOW_ETH_ADDRESS_SELECTOR) {
             treatment = generateSetMacTreatment(nextHopMac, treatmentSrcMac);
         } else {
             treatment = DefaultTrafficTreatment.builder().build();
@@ -781,34 +795,34 @@
         TrafficSelector.Builder selector = DefaultTrafficSelector.builder();
         if (dstPrefix.isIp4()) {
             selector.matchEthType(Ethernet.TYPE_IPV4);
-            if (simpleFabric.REACTIVE_SINGLE_TO_SINGLE && srcPrefix.prefixLength() > 0) {
+            if (REACTIVE_SINGLE_TO_SINGLE && srcPrefix.prefixLength() > 0) {
                 selector.matchIPSrc(srcPrefix);
             }
             if (dstPrefix.prefixLength() > 0) {
                 selector.matchIPDst(dstPrefix);
             }
-            if (ipProto != 0 && simpleFabric.REACTIVE_MATCH_IP_PROTO) {
+            if (ipProto != 0 && REACTIVE_MATCH_IP_PROTO) {
                 selector.matchIPProtocol(ipProto);
             }
         } else {
             selector.matchEthType(Ethernet.TYPE_IPV6);
-            if (simpleFabric.REACTIVE_SINGLE_TO_SINGLE && srcPrefix.prefixLength() > 0) {
+            if (REACTIVE_SINGLE_TO_SINGLE && srcPrefix.prefixLength() > 0) {
                 selector.matchIPv6Src(srcPrefix);
             }
             if (dstPrefix.prefixLength() > 0) {
                 selector.matchIPv6Dst(dstPrefix);
             }
-            if (ipProto != 0 && simpleFabric.REACTIVE_MATCH_IP_PROTO) {
+            if (ipProto != 0 && REACTIVE_MATCH_IP_PROTO) {
                 selector.matchIPProtocol(ipProto);
             }
         }
 
         Key key;
         String keyProtoTag = "";
-        if (simpleFabric.REACTIVE_MATCH_IP_PROTO) {
+        if (REACTIVE_MATCH_IP_PROTO) {
             keyProtoTag = "-p" + ipProto;
         }
-        if (simpleFabric.REACTIVE_SINGLE_TO_SINGLE) {
+        if (REACTIVE_SINGLE_TO_SINGLE) {
             // allocate intent per (srcPrefix, dstPrefix)
             key = Key.of(srcPrefix.toString() + "-to-" + dstPrefix.toString() + keyProtoTag, reactiveAppId);
         } else {
@@ -878,19 +892,19 @@
     private int reactivePriority(boolean isForward, boolean isDstLocalSubnet, int borderRoutePrefixLength) {
         if (isDstLocalSubnet) {  // -> dst:localSubnet
             if (isForward) {
-                return simpleFabric.PRI_REACTIVE_LOCAL_FORWARD;
+                return PRI_REACTIVE_LOCAL_FORWARD;
             } else {  // isInterncept
-                return simpleFabric.PRI_REACTIVE_LOCAL_INTERCEPT;
+                return PRI_REACTIVE_LOCAL_INTERCEPT;
             }
         } else {  // -> dst:boarderRouteNextHop
             int offset;
             if (isForward) {
-                offset = simpleFabric.PRI_REACTIVE_BORDER_FORWARD;
+                offset = PRI_REACTIVE_BORDER_FORWARD;
             } else {  // isIntercept
-                offset = simpleFabric.PRI_REACTIVE_BORDER_INTERCEPT;
+                offset = PRI_REACTIVE_BORDER_INTERCEPT;
             }
-           return simpleFabric.PRI_REACTIVE_BORDER_BASE
-                  + borderRoutePrefixLength * simpleFabric.PRI_REACTIVE_BORDER_STEP + offset;
+           return PRI_REACTIVE_BORDER_BASE
+                  + borderRoutePrefixLength * PRI_REACTIVE_BORDER_STEP + offset;
         }
     }
 
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/package-info.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/package-info.java
new file mode 100644
index 0000000..d190b08
--- /dev/null
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/impl/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Simple fabric implementation package.
+ */
+package org.onosproject.simplefabric.impl;
\ No newline at end of file
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/RouteTools.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/RouteTools.java
similarity index 94%
rename from apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/RouteTools.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/RouteTools.java
index b14438a..d02fed2 100644
--- a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/RouteTools.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/RouteTools.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
  * to remove dependency on onos.incubator.routing services, since 2017-08-09.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.util;
 
 import org.onlab.packet.IpPrefix;
 
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/package-info.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/package-info.java
new file mode 100644
index 0000000..9b3dde3
--- /dev/null
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/util/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Simple fabric utility package.
+ */
+package org.onosproject.simplefabric.util;
\ No newline at end of file
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricWebApplication.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebApplication.java
similarity index 90%
rename from apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricWebApplication.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebApplication.java
index d82de73..960b4df 100644
--- a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricWebApplication.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebApplication.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.web;
 
 import org.onlab.rest.AbstractWebApplication;
 
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricWebResource.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebResource.java
similarity index 96%
rename from apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricWebResource.java
rename to apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebResource.java
index 3274a3e..cc68d6b 100644
--- a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/SimpleFabricWebResource.java
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/SimpleFabricWebResource.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-present Open Networking Foundation
+ * Copyright 2018-present Open Networking Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.onosproject.simplefabric;
+package org.onosproject.simplefabric.web;
 
 import org.onosproject.rest.AbstractWebResource;
 import org.onosproject.simplefabric.api.SimpleFabricService;
diff --git a/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/package-info.java b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/package-info.java
new file mode 100644
index 0000000..596ded0
--- /dev/null
+++ b/apps/simplefabric/app/src/main/java/org/onosproject/simplefabric/web/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Simple fabric web package.
+ */
+package org.onosproject.simplefabric.web;
\ No newline at end of file
diff --git a/apps/simplefabric/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/simplefabric/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
index 7b6893b..2aad546 100644
--- a/apps/simplefabric/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
+++ b/apps/simplefabric/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -17,12 +17,12 @@
 
     <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
         <command>
-            <action class="org.onosproject.simplefabric.SimpleFabricCommand"/>
+            <action class="org.onosproject.simplefabric.cli.SimpleFabricCommand"/>
             <completers>
                 <ref component-id="SimpleFabricCommandCompleter"/>
             </completers>
         </command>
     </command-bundle>
  
-    <bean id="SimpleFabricCommandCompleter" class="org.onosproject.simplefabric.SimpleFabricCommandCompleter"/>
+    <bean id="SimpleFabricCommandCompleter" class="org.onosproject.simplefabric.cli.SimpleFabricCommandCompleter"/>
 </blueprint>
diff --git a/apps/simplefabric/app/src/main/webapp/WEB-INF/web.xml b/apps/simplefabric/app/src/main/webapp/WEB-INF/web.xml
index e136671..ebcac0e 100644
--- a/apps/simplefabric/app/src/main/webapp/WEB-INF/web.xml
+++ b/apps/simplefabric/app/src/main/webapp/WEB-INF/web.xml
@@ -46,7 +46,7 @@
         <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
         <init-param>
             <param-name>javax.ws.rs.Application</param-name>
-            <param-value>org.onosproject.simplefabric.SimpleFabricWebApplication</param-value>
+            <param-value>org.onosproject.simplefabric.web.SimpleFabricWebApplication</param-value>
         </init-param>
         <load-on-startup>1</load-on-startup>
     </servlet>