Sketching cluster related stuff with Madan..
diff --git a/core/api/src/main/java/org/onlab/onos/cluster/ClusterEvent.java b/core/api/src/main/java/org/onlab/onos/cluster/ClusterEvent.java
new file mode 100644
index 0000000..6737f68
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/cluster/ClusterEvent.java
@@ -0,0 +1,58 @@
+package org.onlab.onos.cluster;
+
+import org.onlab.onos.event.AbstractEvent;
+
+/**
+ * Describes cluster-related event.
+ */
+public class ClusterEvent extends AbstractEvent<ClusterEvent.Type, ControllerInstance> {
+
+    /**
+     * Type of device events.
+     */
+    public enum Type {
+        /**
+         * Signifies that a new cluster instance has been administratively added.
+         */
+        INSTANCE_ADDED,
+
+        /**
+         * Signifies that a cluster instance has been administratively removed.
+         */
+        INSTANCE_REMOVED,
+
+        /**
+         * Signifies that a cluster instance became active.
+         */
+        INSTANCE_ACTIVE,
+
+        /**
+         * Signifies that a cluster instance became inactive.
+         */
+        INSTANCE_INACTIVE
+    }
+    // TODO: do we need to fix the verv/adjective mix? discuss
+
+    /**
+     * Creates an event of a given type and for the specified instance and the
+     * current time.
+     *
+     * @param type     cluster event type
+     * @param instance cluster device subject
+     */
+    public ClusterEvent(Type type, ControllerInstance instance) {
+        super(type, instance);
+    }
+
+    /**
+     * Creates an event of a given type and for the specified device and time.
+     *
+     * @param type     device event type
+     * @param instance event device subject
+     * @param time     occurrence time
+     */
+    public ClusterEvent(Type type, ControllerInstance instance, long time) {
+        super(type, instance, time);
+    }
+
+}
diff --git a/core/api/src/main/java/org/onlab/onos/cluster/ClusterService.java b/core/api/src/main/java/org/onlab/onos/cluster/ClusterService.java
new file mode 100644
index 0000000..afbf0d5
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/cluster/ClusterService.java
@@ -0,0 +1,29 @@
+package org.onlab.onos.cluster;
+
+import java.util.Set;
+
+/**
+ * Service for obtaining information about the individual instances within
+ * the controller cluster.
+ */
+public interface ClusterService {
+
+    /**
+     * Returns the set of current cluster members.
+     *
+     * @return set of cluster members
+     */
+    Set<ControllerInstance> getInstances();
+
+    /**
+     * Returns the availability state of the specified controller instance.
+     *
+     * @return availability state
+     */
+    ControllerInstance.State getState(ControllerInstance instance);
+    // TODO: determine if this would be better attached to ControllerInstance directly
+
+
+    // addListener, removeListener
+
+}
diff --git a/core/api/src/main/java/org/onlab/onos/cluster/ControllerInstance.java b/core/api/src/main/java/org/onlab/onos/cluster/ControllerInstance.java
new file mode 100644
index 0000000..66d753e
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/cluster/ControllerInstance.java
@@ -0,0 +1,38 @@
+package org.onlab.onos.cluster;
+
+import org.onlab.packet.IpAddress;
+
+/**
+ * Represents a controller instance as a member in a cluster.
+ */
+public interface ControllerInstance {
+
+    /** Represents the operational state of the instance. */
+    public enum State {
+        /**
+         * Signifies that the instance is active and operating normally.
+         */
+        ACTIVE,
+
+        /**
+         * Signifies that the instance is inactive, which means either down or
+         * up, but not operational.
+         */
+        INACTIVE
+    }
+
+    /**
+     * Returns the instance identifier.
+     *
+     * @return instance identifier
+     */
+    InstanceId id();
+
+    /**
+     * Returns the IP address of the controller instance.
+     *
+     * @return IP address
+     */
+    IpAddress ip();
+
+}
diff --git a/core/api/src/main/java/org/onlab/onos/cluster/InstanceId.java b/core/api/src/main/java/org/onlab/onos/cluster/InstanceId.java
new file mode 100644
index 0000000..7292a85
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/cluster/InstanceId.java
@@ -0,0 +1,7 @@
+package org.onlab.onos.cluster;
+
+/**
+ * Controller cluster identity.
+ */
+public interface InstanceId {
+}
diff --git a/core/api/src/main/java/org/onlab/onos/cluster/package-info.java b/core/api/src/main/java/org/onlab/onos/cluster/package-info.java
new file mode 100644
index 0000000..3cb37c3
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/cluster/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * Set of abstractions for dealing with controller cluster related topics.
+ */
+package org.onlab.onos.cluster;
\ No newline at end of file
diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleEvent.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleEvent.java
index 566c2b4..ce8e700 100644
--- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleEvent.java
+++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleEvent.java
@@ -19,7 +19,7 @@
         /**
          * Signifies that a flow rule has been removed.
          */
-        RULE_REMOVED,
+        RULE_REMOVED
     }
 
     /**
diff --git a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleService.java b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleService.java
index 71434c7..ba75ae9 100644
--- a/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleService.java
+++ b/core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleService.java
@@ -23,6 +23,8 @@
      */
     Iterable<FlowEntry> getFlowEntries(DeviceId deviceId);
 
+    // TODO: add createFlowRule factory method and execute operations method
+
     /**
      * Applies the specified flow rules onto their respective devices. These
      * flow rules will be retained by the system and re-applied anytime the
@@ -46,9 +48,6 @@
     void removeFlowRules(FlowRule... flowRules);
 
 
-    // void addInitialFlowContributor(InitialFlowContributor contributor);
-    // void removeInitialFlowContributor(InitialFlowContributor contributor);
-
     /**
      * Adds the specified flow rule listener.
      *
diff --git a/features/features.xml b/features/features.xml
index 6d981a8..92c0511 100644
--- a/features/features.xml
+++ b/features/features.xml
@@ -7,7 +7,6 @@
              description="ONOS 3rd party dependencies">
         <bundle>mvn:commons-lang/commons-lang/2.6</bundle>
         <bundle>mvn:com.google.guava/guava/18.0</bundle>
-        
         <bundle>mvn:io.netty/netty/3.9.2.Final</bundle>
     </feature>
 
@@ -63,7 +62,7 @@
     <feature name="onos-openflow" version="1.0.0"
             description="ONOS OpenFlow API, Controller &amp; Providers">
         <feature>onos-api</feature>
-
+        <bundle>mvn:io.netty/netty/3.9.2.Final</bundle>
         <bundle>mvn:org.onlab.onos/onos-of-api/1.0.0-SNAPSHOT</bundle>
         <bundle>mvn:org.onlab.onos/onos-of-ctl/1.0.0-SNAPSHOT</bundle>
 
@@ -77,8 +76,9 @@
 
     <feature name="onos-app-tvue" version="1.0.0"
              description="ONOS sample topology viewer application">
-        <feature>onos-api</feature>
         <feature>onos-thirdparty-web</feature>
+        <feature>onos-api</feature>
+        <feature>onos-core</feature>
         <bundle>mvn:org.onlab.onos/onos-app-tvue/1.0.0-SNAPSHOT</bundle>
     </feature>
     
diff --git a/openflow/ctl/pom.xml b/openflow/ctl/pom.xml
index 88bdcd9..4bd7619 100644
--- a/openflow/ctl/pom.xml
+++ b/openflow/ctl/pom.xml
@@ -15,107 +15,27 @@
 
     <description>ONOS OpenFlow controller subsystem API</description>
 
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <powermock.version>1.5.5</powermock.version>
-        <restlet.version>2.1.4</restlet.version>
-        <cobertura-maven-plugin.version>2.6</cobertura-maven-plugin.version>
-        <!-- Following 2 findbugs version needs to be updated in sync to match the
-             findbugs version used in findbugs-plugin -->
-        <findbugs.version>3.0.0</findbugs.version>
-        <findbugs-plugin.version>3.0.0</findbugs-plugin.version>
-        <findbugs.effort>Max</findbugs.effort>
-        <findbugs.excludeFilterFile>${project.basedir}/conf/findbugs/exclude.xml
-        </findbugs.excludeFilterFile>
-        <checkstyle-plugin.version>2.12</checkstyle-plugin.version>
-        <!-- To publish javadoc to github,
-         uncomment com.github.github site-maven-plugin and
-         see https://github.com/OPENNETWORKINGLAB/ONOS/pull/425
-        <github.global.server>github</github.global.server>
-         -->
-        <metrics.version>3.0.2</metrics.version>
-        <maven.surefire.plugin.version>2.16</maven.surefire.plugin.version>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>org.onlab.onos</groupId>
             <artifactId>onos-of-api</artifactId>
         </dependency>
-        <!-- ONOS's direct dependencies -->
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.scr.annotations</artifactId>
-            <version>1.9.6</version>
-        </dependency>
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-            <version>1.1.2</version>
-        </dependency>
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-core</artifactId>
-            <version>1.1.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <version>1.7.5</version>
-        </dependency>
-        <dependency>
-            <!-- findbugs suppression annotation and @GuardedBy, etc. -->
-            <groupId>com.google.code.findbugs</groupId>
-            <artifactId>annotations</artifactId>
-            <version>${findbugs.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.projectfloodlight</groupId>
-            <artifactId>openflowj</artifactId>
-            <version>0.3.8-SNAPSHOT</version>
-        </dependency>
-        <!-- Floodlight's dependencies -->
-        <dependency>
-            <!-- dependency to old version of netty? -->
-            <groupId>io.netty</groupId>
-            <artifactId>netty</artifactId>
-            <version>3.9.2.Final</version>
-        </dependency>
-        <!-- Dependency for libraries used for testing -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.11</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.easymock</groupId>
-            <artifactId>easymock</artifactId>
-            <version>3.2</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.powermock</groupId>
-            <artifactId>powermock-module-junit4</artifactId>
-            <version>${powermock.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.powermock</groupId>
-            <artifactId>powermock-api-easymock</artifactId>
-            <version>${powermock.version}</version>
-            <scope>test</scope>
         </dependency>
     </dependencies>
 
-
     <build>
         <plugins>
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
             </plugin>
-
         </plugins>
     </build>
 
diff --git a/tools/package/package b/tools/package/package
index 0bf8a39..dd63d29 100755
--- a/tools/package/package
+++ b/tools/package/package
@@ -26,8 +26,8 @@
 mkdir -p $ONOS_STAGE
 cd $ONOS_STAGE
 
-# Unroll the Apache Karaf bits and make the ONOS top-level directories.
-unzip $KARAF_ZIP
+# Unroll the Apache Karaf bits, prune them and make the ONOS top-level directories.
+unzip $KARAF_ZIP && rm -rm $KARAF_DIST/demos
 mkdir bin
 
 # Stage the ONOS admin scripts
@@ -43,11 +43,11 @@
 
 # Patch the Apache Karaf distribution file to load ONOS features
 perl -pi.old -e 's|^(featuresBoot=.*)|\1,onos-api,onos-core,onos-cli,onos-rest,onos-gui,onos-openflow,onos-app-tvue|' \
-    /tmp/onos-1.0.0-SNAPSHOT/apache-karaf-3.0.1/etc/org.apache.karaf.features.cfg 
+    $ONOS_STAGE/$KARAF_DIST/etc/org.apache.karaf.features.cfg 
 
 # Patch the Apache Karaf distribution with ONOS branding bundle
 cp $M2_REPO/org/onlab/onos/onos-branding/$ONOS_VERSION/onos-branding-*.jar \
-    $ONOS_STAGE/apache-karaf-*/lib
+    $ONOS_STAGE/$KARAF_DIST/lib
 
 # Now package up the ONOS tar file
 cd $ONOS_STAGE_ROOT