diff --git a/web/gui/src/main/webapp/app/fw/layer/panel.js b/web/gui/src/main/webapp/app/fw/layer/panel.js
index 1f82067..68899fb 100644
--- a/web/gui/src/main/webapp/app/fw/layer/panel.js
+++ b/web/gui/src/main/webapp/app/fw/layer/panel.js
@@ -125,6 +125,7 @@
             } else {
                 showPanel(cb);
             }
+            return p.on;
         }
 
         function emptyPanel() {
diff --git a/web/gui/src/main/webapp/app/view/topo/topo.js b/web/gui/src/main/webapp/app/view/topo/topo.js
index 402ad86..f40beb1 100644
--- a/web/gui/src/main/webapp/app/view/topo/topo.js
+++ b/web/gui/src/main/webapp/app/view/topo/topo.js
@@ -45,8 +45,8 @@
         // thus, deferred to here...
         actionMap = {
             I: [toggleInstances, 'Toggle ONOS instances panel'],
-            O: [tps.toggleSummary, 'Toggle ONOS summary panel'],
-            D: [tps.toggleDetails, 'Disable / enable details panel'],
+            O: [toggleSummary, 'Toggle ONOS summary panel'],
+            D: [toggleDetails, 'Disable / enable details panel'],
 
             H: [tfs.toggleHosts, 'Toggle host visibility'],
             M: [tfs.toggleOffline, 'Toggle offline visibility'],
@@ -95,27 +95,26 @@
 
     // --- Keystroke functions -------------------------------------------
 
-    // NOTE: this really belongs in the TopoPanelService -- but how to
-    //       cleanly link in the updateDeviceColors() call? To be fixed later.
     function toggleInstances(x) {
-        if (x === 'keyev') {
-            tis.toggle();
-            updatePrefsState('insts', tis.isVisible());
-        } else if (x) {
-            tis.show();
-        } else {
-            tis.hide();
-        }
+        updatePrefsState('insts', tis.toggle(x));
         tfs.updateDeviceColors();
     }
 
-    function toggleMap(x) {
-        var on = (x === 'keyev') ? !sus.visible(mapG) : !!x;
-        sus.visible(mapG, on);
-        updatePrefsState('bg', on);
+    function toggleSummary(x) {
+        updatePrefsState('summary', tps.toggleSummary(x));
     }
 
-    //  TODO: need wrapper functions for state changes needed in cookies
+    function toggleDetails(x) {
+        updatePrefsState('detail', tps.toggleDetails(x));
+    }
+
+    function toggleMap(x) {
+        var on = (x === 'keyev') ? !sus.visible(mapG) : !!x,
+            verb = on ? 'Show' : 'Hide';
+        sus.visible(mapG, on);
+        updatePrefsState('bg', on);
+        flash.flash(verb + ' background map');
+    }
 
     function resetZoom() {
         zoomer.reset();
@@ -250,20 +249,8 @@
 
     // --- User Preferemces ----------------------------------------------
 
-    var defaultPrefsState = {
-        bg: 1,
-        insts: 1,
-        summary: 1,
-        detail: 1,
-        hosts: 0
-    };
-
     var prefsState = {};
 
-    function topoDefPrefs() {
-        return angular.extend({}, defaultPrefsState);
-    }
-
     function updatePrefsState(what, b) {
         prefsState[what] = b ? 1 : 0;
         ps.setPrefs('topo_prefs', prefsState);
@@ -277,8 +264,8 @@
         $log.debug('TOPO---- Prefs State:', prefsState);
 
         toggleInstances(prefsState.insts);
-        tps.toggleSummary(prefsState.summary);
-        tps.toggleDetails(prefsState.detail);
+        toggleSummary(prefsState.summary);
+        toggleDetails(prefsState.detail);
     }
 
 
diff --git a/web/gui/src/main/webapp/app/view/topo/topoEvent.js b/web/gui/src/main/webapp/app/view/topo/topoEvent.js
index 4378e6d..6d52a37 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoEvent.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoEvent.js
@@ -86,7 +86,6 @@
                 openListener = wss.addOpenListener(wsOpen);
                 wss.bindHandlers(handlerMap);
                 wss.sendEvent('topoStart');
-                wss.sendEvent('requestSummary');
                 $log.debug('topo comms started');
             }
 
diff --git a/web/gui/src/main/webapp/app/view/topo/topoInst.js b/web/gui/src/main/webapp/app/view/topo/topoInst.js
index a7093d3..7e92997 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoInst.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoInst.js
@@ -23,7 +23,7 @@
     'use strict';
 
     // injected refs
-    var $log, ps, sus, gs, ts, fs;
+    var $log, ps, sus, gs, ts, fs, flash;
 
     // api from topo
     var api;
@@ -309,20 +309,49 @@
         oiShowMaster = false;
     }
 
+    function showInsts() {
+        oiBox.show();
+    }
+
+    function hideInsts() {
+        oiBox.hide();
+    }
+
+    function toggleInsts(x) {
+        var kev = (x === 'keyev'),
+            on,
+            verb;
+
+        if (kev) {
+            on = oiBox.toggle();
+        } else {
+            on = !!x;
+            if (on) {
+                showInsts();
+            } else {
+                hideInsts();
+            }
+        }
+        verb = on ? 'Show' : 'Hide';
+        flash.flash(verb + ' instances panel');
+        return on;
+    }
+
     // ==========================
 
     angular.module('ovTopo')
     .factory('TopoInstService',
         ['$log', 'PanelService', 'SvgUtilService', 'GlyphService',
-            'ThemeService', 'FnService',
+            'ThemeService', 'FnService', 'FlashService',
 
-        function (_$log_, _ps_, _sus_, _gs_, _ts_, _fs_) {
+        function (_$log_, _ps_, _sus_, _gs_, _ts_, _fs_, _flash_) {
             $log = _$log_;
             ps = _ps_;
             sus = _sus_;
             gs = _gs_;
             ts = _ts_;
             fs = _fs_;
+            flash = _flash_;
 
             return {
                 initInst: initInst,
@@ -335,9 +364,9 @@
                 cancelAffinity: cancelAffinity,
 
                 isVisible: function () { return oiBox.isVisible(); },
-                show: function () { oiBox.show(); },
-                hide: function () { oiBox.hide(); },
-                toggle: function () { oiBox.toggle(); },
+                show: showInsts,
+                hide: hideInsts,
+                toggle: toggleInsts,
                 showMaster: function () { return oiShowMaster; }
             };
         }]);
diff --git a/web/gui/src/main/webapp/app/view/topo/topoPanel.js b/web/gui/src/main/webapp/app/view/topo/topoPanel.js
index d95c4f5..579ebde 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoPanel.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoPanel.js
@@ -226,7 +226,9 @@
     }
 
     function toggleSummary(x) {
-        var on = (x === 'keyev') ? !summaryPanel.isVisible() : !!x;
+        var kev = (x === 'keyev'),
+            on = kev ? !summaryPanel.isVisible() : !!x,
+            verb = on ? 'Show' : 'Hide';
 
         if (on) {
             // ask server to start sending summary data.
@@ -235,6 +237,8 @@
         } else {
             hideSummaryPanel();
         }
+        flash.flash(verb + ' summary panel');
+        return on;
     }
 
     // === -----------------------------------------------------
@@ -292,16 +296,21 @@
     }
 
     function toggleDetails(x) {
-        useDetails = (x === 'keyev') ? !useDetails : !!x;
+        var kev = (x === 'keyev'),
+            verb;
+
+        useDetails = kev ? !useDetails : !!x;
+        verb = useDetails ? 'Enable' : 'Disable';
+
         if (useDetails) {
-            flash.flash('Enable details panel');
             if (haveDetails) {
                 showDetailPanel();
             }
         } else {
-            flash.flash('Disable details panel');
             hideDetailPanel();
         }
+        flash.flash(verb + ' details panel');
+        return useDetails;
     }
 
     // ==========================
