diff --git a/core/api/src/main/java/org/onlab/onos/net/host/HostStore.java b/core/api/src/main/java/org/onlab/onos/net/host/HostStore.java
new file mode 100644
index 0000000..cb5ed64
--- /dev/null
+++ b/core/api/src/main/java/org/onlab/onos/net/host/HostStore.java
@@ -0,0 +1,102 @@
+package org.onlab.onos.net.host;
+
+import org.onlab.onos.net.ConnectPoint;
+import org.onlab.onos.net.DeviceId;
+import org.onlab.onos.net.Host;
+import org.onlab.onos.net.HostId;
+import org.onlab.onos.net.provider.ProviderId;
+import org.onlab.packet.IpAddress;
+import org.onlab.packet.MacAddress;
+import org.onlab.packet.VlanId;
+
+import java.util.Set;
+
+/**
+ * Manages inventory of end-station hosts. It may do so using whatever
+ * means are appropriate.
+ */
+public interface HostStore {
+
+    /**
+     * Creates a new host or updates the existing one based on the specified
+     * description.
+     *
+     * @param providerId      provider identification
+     * @param hostId          host identification
+     * @param hostDescription host description data
+     * @return appropriate event or null if no change resulted
+     */
+    HostEvent createOrUpdateHost(ProviderId providerId, HostId hostId,
+                                 HostDescription hostDescription);
+
+    /**
+     * Removes the specified host from the inventory.
+     *
+     * @param hostId host identification
+     * @return remove event or null if host was not found
+     */
+    HostEvent removeHost(HostId hostId);
+
+    /**
+     * Returns the number of hosts in the store.
+     *
+     * @return host count
+     */
+    int getHostCount();
+
+    /**
+     * Returns a collection of all hosts in the store.
+     *
+     * @return iterable collection of all hosts
+     */
+    Iterable<Host> getHosts();
+
+    /**
+     * Returns the host with the specified identifer.
+     *
+     * @param hostId host identification
+     * @return host or null if not found
+     */
+    Host getHost(HostId hostId);
+
+    /**
+     * Returns the set of all hosts within the specified VLAN.
+     *
+     * @param vlanId vlan id
+     * @return set of hosts in the vlan
+     */
+    Set<Host> getHosts(VlanId vlanId);
+
+    /**
+     * Returns the set of hosts with the specified MAC address.
+     *
+     * @param mac mac address
+     * @return set of hosts with the given mac
+     */
+    Set<Host> getHosts(MacAddress mac);
+
+    /**
+     * Returns the set of hosts with the specified IP address.
+     *
+     * @param ip ip address
+     * @return set of hosts with the given IP
+     */
+    Set<Host> getHosts(IpAddress ip);
+
+    /**
+     * Returns the set of hosts whose location falls on the given connection point.
+     *
+     * @param connectPoint connection point
+     * @return set of hosts
+     */
+    Set<Host> getConnectedHosts(ConnectPoint connectPoint);
+
+    /**
+     * Returns the set of hosts whose location falls on the given device.
+     *
+     * @param deviceId infrastructure device identifier
+     * @return set of hosts
+     */
+    Set<Host> getConnectedHosts(DeviceId deviceId);
+
+}
diff --git a/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java b/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java
index 3c3c1fb..4391471 100644
--- a/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java
+++ b/core/api/src/main/java/org/onlab/onos/net/link/LinkStore.java
@@ -8,7 +8,8 @@
 import java.util.Set;
 
 /**
- * Manages inventory of infrastructure links using whatever means are appropriate.
+ * Manages inventory of infrastructure links. It may do so using whatever
+ * means are appropriate.
  */
 public interface LinkStore {
 
diff --git a/core/trivial/src/main/java/org/onlab/onos/net/trivial/device/impl/SimpleDeviceStore.java b/core/trivial/src/main/java/org/onlab/onos/net/trivial/device/impl/SimpleDeviceStore.java
index 3fa9dc2..30c506ff 100644
--- a/core/trivial/src/main/java/org/onlab/onos/net/trivial/device/impl/SimpleDeviceStore.java
+++ b/core/trivial/src/main/java/org/onlab/onos/net/trivial/device/impl/SimpleDeviceStore.java
@@ -60,6 +60,7 @@
     public void deactivate() {
         log.info("Stopped");
     }
+
     @Override
     public int getDeviceCount() {
         return devices.size();
diff --git a/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManager.java b/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManager.java
index 43e06f5..9cf235b 100644
--- a/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManager.java
+++ b/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManager.java
@@ -20,6 +20,7 @@
 import org.onlab.onos.net.host.HostProviderRegistry;
 import org.onlab.onos.net.host.HostProviderService;
 import org.onlab.onos.net.host.HostService;
+import org.onlab.onos.net.host.HostStore;
 import org.onlab.onos.net.provider.AbstractProviderRegistry;
 import org.onlab.onos.net.provider.AbstractProviderService;
 import org.onlab.packet.IpAddress;
@@ -47,7 +48,8 @@
     private final AbstractListenerRegistry<HostEvent, HostListener>
             listenerRegistry = new AbstractListenerRegistry<>();
 
-    private final SimpleHostStore store = new SimpleHostStore();
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected HostStore store;
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     protected EventDeliveryService eventDispatcher;
diff --git a/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostStore.java b/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostStore.java
index f1a64e7..1febb67 100644
--- a/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostStore.java
+++ b/core/trivial/src/main/java/org/onlab/onos/net/trivial/host/impl/SimpleHostStore.java
@@ -4,6 +4,7 @@
 import static org.onlab.onos.net.host.HostEvent.Type.HOST_MOVED;
 import static org.onlab.onos.net.host.HostEvent.Type.HOST_REMOVED;
 import static org.onlab.onos.net.host.HostEvent.Type.HOST_UPDATED;
+import static org.slf4j.LoggerFactory.getLogger;
 
 import java.util.Collections;
 import java.util.HashSet;
@@ -11,6 +12,10 @@
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Service;
 import org.onlab.onos.net.ConnectPoint;
 import org.onlab.onos.net.DefaultHost;
 import org.onlab.onos.net.DeviceId;
@@ -18,6 +23,7 @@
 import org.onlab.onos.net.HostId;
 import org.onlab.onos.net.host.HostDescription;
 import org.onlab.onos.net.host.HostEvent;
+import org.onlab.onos.net.host.HostStore;
 import org.onlab.onos.net.provider.ProviderId;
 import org.onlab.packet.IpAddress;
 import org.onlab.packet.MacAddress;
@@ -26,29 +32,37 @@
 import com.google.common.collect.HashMultimap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Multimap;
+import org.slf4j.Logger;
 
 /**
  * Manages inventory of end-station hosts using trivial in-memory
  * implementation.
  */
-public class SimpleHostStore {
+@Component(immediate = true)
+@Service
+public class SimpleHostStore implements HostStore {
 
+    private final Logger log = getLogger(getClass());
+
+    // Host inventory
     private final Map<HostId, Host> hosts = new ConcurrentHashMap<>();
 
-    // hosts sorted based on their location
+    // Hosts tracked by their location
     private final Multimap<ConnectPoint, Host> locations = HashMultimap.create();
 
-    /**
-     * Creates a new host or updates the existing one based on the specified
-     * description.
-     *
-     * @param providerId      provider identification
-     * @param hostId          host identification
-     * @param hostDescription host description data
-     * @return appropriate event or null if no change resulted
-     */
-    HostEvent createOrUpdateHost(ProviderId providerId, HostId hostId,
-                                 HostDescription hostDescription) {
+    @Activate
+    public void activate() {
+        log.info("Started");
+    }
+
+    @Deactivate
+    public void deactivate() {
+        log.info("Stopped");
+    }
+
+    @Override
+    public HostEvent createOrUpdateHost(ProviderId providerId, HostId hostId,
+                                        HostDescription hostDescription) {
         Host host = hosts.get(hostId);
         if (host == null) {
             return createHost(providerId, hostId, hostDescription);
@@ -102,13 +116,8 @@
         return event;
     }
 
-    /**
-     * Removes the specified host from the inventory.
-     *
-     * @param hostId host identification
-     * @return remove event or null if host was not found
-     */
-    HostEvent removeHost(HostId hostId) {
+    @Override
+    public HostEvent removeHost(HostId hostId) {
         synchronized (this) {
             Host host = hosts.remove(hostId);
             if (host != null) {
@@ -119,41 +128,23 @@
         }
     }
 
-    /**
-     * Returns the number of hosts in the store.
-     *
-     * @return host count
-     */
-    int getHostCount() {
+    @Override
+    public int getHostCount() {
         return hosts.size();
     }
 
-    /**
-     * Returns a collection of all hosts in the store.
-     *
-     * @return iterable collection of all hosts
-     */
-    Iterable<Host> getHosts() {
+    @Override
+    public Iterable<Host> getHosts() {
         return Collections.unmodifiableSet(new HashSet<>(hosts.values()));
     }
 
-    /**
-     * Returns the host with the specified identifer.
-     *
-     * @param hostId host identification
-     * @return host or null if not found
-     */
-    Host getHost(HostId hostId) {
+    @Override
+    public Host getHost(HostId hostId) {
         return hosts.get(hostId);
     }
 
-    /**
-     * Returns the set of all hosts within the specified VLAN.
-     *
-     * @param vlanId vlan id
-     * @return set of hosts in the vlan
-     */
-    Set<Host> getHosts(VlanId vlanId) {
+    @Override
+    public Set<Host> getHosts(VlanId vlanId) {
         Set<Host> vlanset = new HashSet<>();
         for (Host h : hosts.values()) {
             if (h.vlan().equals(vlanId)) {
@@ -163,13 +154,8 @@
         return vlanset;
     }
 
-    /**
-     * Returns the set of hosts with the specified MAC address.
-     *
-     * @param mac mac address
-     * @return set of hosts with the given mac
-     */
-    Set<Host> getHosts(MacAddress mac) {
+    @Override
+    public Set<Host> getHosts(MacAddress mac) {
         Set<Host> macset = new HashSet<>();
         for (Host h : hosts.values()) {
             if (h.mac().equals(mac)) {
@@ -179,13 +165,8 @@
         return macset;
     }
 
-    /**
-     * Returns the set of hosts with the specified IP address.
-     *
-     * @param ip ip address
-     * @return set of hosts with the given IP
-     */
-    Set<Host> getHosts(IpAddress ip) {
+    @Override
+    public Set<Host> getHosts(IpAddress ip) {
         Set<Host> ipset = new HashSet<>();
         for (Host h : hosts.values()) {
             if (h.ipAddresses().contains(ip)) {
@@ -195,22 +176,12 @@
         return ipset;
     }
 
-    /**
-     * Returns the set of hosts whose location falls on the given connection point.
-     *
-     * @param connectPoint connection point
-     * @return set of hosts
-     */
-    Set<Host> getConnectedHosts(ConnectPoint connectPoint) {
+    @Override
+    public Set<Host> getConnectedHosts(ConnectPoint connectPoint) {
         return ImmutableSet.copyOf(locations.get(connectPoint));
     }
 
-    /**
-     * Returns the set of hosts whose location falls on the given device.
-     *
-     * @param deviceId infrastructure device identifier
-     * @return set of hosts
-     */
+    @Override
     public Set<Host> getConnectedHosts(DeviceId deviceId) {
         Set<Host> hostset = new HashSet<>();
         for (ConnectPoint p : locations.keySet()) {
diff --git a/core/trivial/src/main/java/org/onlab/onos/net/trivial/link/impl/SimpleLinkStore.java b/core/trivial/src/main/java/org/onlab/onos/net/trivial/link/impl/SimpleLinkStore.java
index 1dd724c..935e5dc 100644
--- a/core/trivial/src/main/java/org/onlab/onos/net/trivial/link/impl/SimpleLinkStore.java
+++ b/core/trivial/src/main/java/org/onlab/onos/net/trivial/link/impl/SimpleLinkStore.java
@@ -3,7 +3,9 @@
 import com.google.common.collect.HashMultimap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Multimap;
+import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
 import org.apache.felix.scr.annotations.Service;
 import org.onlab.onos.net.ConnectPoint;
 import org.onlab.onos.net.DefaultLink;
@@ -13,6 +15,7 @@
 import org.onlab.onos.net.link.LinkEvent;
 import org.onlab.onos.net.link.LinkStore;
 import org.onlab.onos.net.provider.ProviderId;
+import org.slf4j.Logger;
 
 import java.util.Collections;
 import java.util.HashSet;
@@ -24,6 +27,7 @@
 import static org.onlab.onos.net.Link.Type.DIRECT;
 import static org.onlab.onos.net.Link.Type.INDIRECT;
 import static org.onlab.onos.net.link.LinkEvent.Type.*;
+import static org.slf4j.LoggerFactory.getLogger;
 
 /**
  * Manages inventory of infrastructure links using trivial in-memory structures
@@ -33,6 +37,8 @@
 @Service
 public class SimpleLinkStore implements LinkStore {
 
+    private final Logger log = getLogger(getClass());
+
     // Link inventory
     private final Map<LinkKey, DefaultLink> links = new ConcurrentHashMap<>();
 
@@ -40,7 +46,17 @@
     private final Multimap<DeviceId, Link> srcLinks = HashMultimap.create();
     private final Multimap<DeviceId, Link> dstLinks = HashMultimap.create();
 
-    private static final Set<Link> EMPTY = ImmutableSet.copyOf(new Link[]{});
+    private static final Set<Link> EMPTY = ImmutableSet.of();
+
+    @Activate
+    public void activate() {
+        log.info("Started");
+    }
+
+    @Deactivate
+    public void deactivate() {
+        log.info("Stopped");
+    }
 
     @Override
     public int getLinkCount() {
diff --git a/core/trivial/src/test/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManagerTest.java b/core/trivial/src/test/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManagerTest.java
index 67c14b0..1ee61df 100644
--- a/core/trivial/src/test/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManagerTest.java
+++ b/core/trivial/src/test/java/org/onlab/onos/net/trivial/host/impl/SimpleHostManagerTest.java
@@ -73,6 +73,7 @@
     @Before
     public void setUp() {
         mgr = new SimpleHostManager();
+        mgr.store = new SimpleHostStore();
         mgr.eventDispatcher = new TestEventDispatcher();
         registry = mgr;
         mgr.activate();
