diff --git a/e107_admin/ad_links.php b/e107_admin/ad_links.php
index c798b1ee7..8bbb5de49 100644
--- a/e107_admin/ad_links.php
+++ b/e107_admin/ad_links.php
@@ -635,7 +635,7 @@ $array_functions = array(
 );
 */
 
-$array_functions = e107::getNav()->adminLinks(); // replacement see e107_handlers/sitelinks.php
+$array_functions = e107::getNav()->adminLinks('legacy'); // replacement see e107_handlers/sitelinks.php
 
 
 // SecretR - BC only, obsolete meta title auto detection
diff --git a/e107_admin/includes/beginner.php b/e107_admin/includes/beginner.php
index ae5bf04ad..52e5e561b 100644
--- a/e107_admin/includes/beginner.php
+++ b/e107_admin/includes/beginner.php
@@ -12,7 +12,6 @@
 
 if (!defined('e107_INIT')) { exit; }
 
-require_once(e_HANDLER."message_handler.php");
 $mes = e107::getMessage();
 
 if($_GET['mode'] == "e_advanced"){
diff --git a/e107_admin/includes/cascade.php b/e107_admin/includes/cascade.php
index 124340591..4f3cd0f4d 100644
--- a/e107_admin/includes/cascade.php
+++ b/e107_admin/includes/cascade.php
@@ -12,7 +12,7 @@
 
 if (!defined('e107_INIT')) { exit; }
 
-require_once(e_HANDLER."message_handler.php");
+
 $mes = e107::getMessage();
 
 $text = "<div style='text-align:center'>
diff --git a/e107_admin/includes/categories.php b/e107_admin/includes/categories.php
index 660657cf7..5ec1be766 100644
--- a/e107_admin/includes/categories.php
+++ b/e107_admin/includes/categories.php
@@ -12,7 +12,6 @@
 
 if (!defined('e107_INIT')) { exit; }
 
-require_once(e_HANDLER."message_handler.php");
 $mes = e107::getMessage();
 
 $text = "<div style='text-align:center'>
diff --git a/e107_admin/includes/classis.php b/e107_admin/includes/classis.php
index 8cb78021f..505d1c4b9 100644
--- a/e107_admin/includes/classis.php
+++ b/e107_admin/includes/classis.php
@@ -12,7 +12,6 @@
 
 if (!defined('e107_INIT')) { exit; }
 
-require_once(e_HANDLER."message_handler.php");
 $mes = e107::getMessage(); 
 $buts = "";
 
diff --git a/e107_admin/includes/compact.php b/e107_admin/includes/compact.php
index b43da10c7..4acdc3a7d 100644
--- a/e107_admin/includes/compact.php
+++ b/e107_admin/includes/compact.php
@@ -12,9 +12,12 @@
 
 if (!defined('e107_INIT')) { exit; }
 
-require_once(e_HANDLER."message_handler.php");
+
 $mes = e107::getMessage();
 
+
+$newarray = e107::getNav()->adminLinks('core');
+
 $buts = "";
 $text = "<div style='text-align:center'>
 	<table style='".ADMIN_WIDTH."'>";
diff --git a/e107_admin/includes/infopanel.php b/e107_admin/includes/infopanel.php
index c8bb57a8f..e33ec9e4e 100644
--- a/e107_admin/includes/infopanel.php
+++ b/e107_admin/includes/infopanel.php
@@ -72,10 +72,10 @@ EOF;
 		}
 		
 		
-		$array_functions_assoc = e107::getNav()->adminLinks('assoc');
+	//	$array_functions_assoc = e107::getNav()->adminLinks('assoc');
 	
-		$this->iconlist = array_merge($array_functions_assoc, e107::getNav()->pluginLinks(E_16_PLUGMANAGER, "array"));
-		
+	//	$this->iconlist = array_merge($array_functions_assoc, e107::getNav()->pluginLinks(E_16_PLUGMANAGER, "array"));
+		$this->iconlist = e107::getNav()->adminLinks();
 		
 	}
 	
@@ -158,7 +158,7 @@ EOF;
 			
 		}
 		
-	
+       
 		
 	//	"<form method='post' action='".e_SELF."?".e_QUERY."'>";
 		
@@ -184,6 +184,9 @@ EOF;
 		        </span>';
 		
 		*/
+		
+	//	print_a($user_pref['core-infopanel-mye107']);
+        
 		$mainPanel .= "
 		
 		
@@ -597,6 +600,8 @@ EOF;
 		global  $user_pref;
 			
 		$text = "";
+        
+     
 	
 	
 		foreach ($this->iconlist as $key=>$icon)
diff --git a/e107_admin/includes/tabbed.php b/e107_admin/includes/tabbed.php
index 1d3bc176e..00eb3f0d9 100644
--- a/e107_admin/includes/tabbed.php
+++ b/e107_admin/includes/tabbed.php
@@ -24,11 +24,13 @@ class tabbed
     
     function __construct()
     {
-        $core = e107::getNav()->adminLinks('assoc');
-        $plugs = e107::getNav()->pluginLinks(E_16_PLUGMANAGER, "array");
+     //   $core = e107::getNav()->adminLinks('assoc');
+     //   $plugs = e107::getNav()->pluginLinks(E_16_PLUGMANAGER, "array");
         
-        $this->links = array_merge($core,$plugs);
-        $this->links = multiarray_sort($this->links,'title'); //XXX Move this function in e107_class? 
+     //   $this->links = array_merge($core,$plugs);
+    //    $this->links = multiarray_sort($this->links,'title'); //XXX Move this function in e107_class? 
+        
+        $this->links = e107::getNav()->adminLinks();
         $this->render();         
     }  
     
diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php
index d0f5cdb1e..b2a257fca 100644
--- a/e107_core/shortcodes/batch/admin_shortcodes.php
+++ b/e107_core/shortcodes/batch/admin_shortcodes.php
@@ -1273,7 +1273,7 @@ class admin_shortcodes
 		$pref = e107::getPref();
 
 		$admin_cat 				= e107::getNav()->adminCats();		
-		$array_functions 		= e107::getNav()->adminLinks();
+		$array_functions 		= e107::getNav()->adminLinks('legacy');
 		$array_sub_functions	= e107::getNav()->adminLinks('sub');
 
 		$tp 	= e107::getParser();
diff --git a/e107_handlers/sitelinks_class.php b/e107_handlers/sitelinks_class.php
index 13f16ad09..9ee89b82a 100644
--- a/e107_handlers/sitelinks_class.php
+++ b/e107_handlers/sitelinks_class.php
@@ -642,7 +642,11 @@ class e_navigation
 	// Previously $array_functions variable. 
 	function adminLinks($mode=false)
 	{
-		
+	
+        if($mode == 'plugin')
+        {
+             return $this->pluginLinks(E_16_PLUGMANAGER, "array") ;   
+        }	
 			if($mode=='sub')
 			{
 				
@@ -717,26 +721,58 @@ class e_navigation
 			38 => array(e_ADMIN.'comment.php', LAN_COMMENTMAN, LAN_COMMENTMAN, 'B', 5, E_16_COMMENT, E_32_COMMENT)
 		);	
 		
-		
-			
-		if($mode == 'assoc')
-		{
-			$newarray = asortbyindex($array_functions, 1);
-			$array_functions_assoc = $this->convert_core_icons($newarray);
-			return $array_functions_assoc;
-		}
-		
-		return $array_functions;	
+		if($mode == 'legacy')
+        {
+            return $array_functions; // Old BC format.      
+        }
+
+		$newarray = asortbyindex($array_functions, 1);
+    	$array_functions_assoc = $this->convert_core_icons($newarray);
+        
+       if($mode == 'core') // Core links only. 
+        {          
+            return $array_functions_assoc;          
+        }
+            
+        $merged = array_merge($array_functions_assoc, $this->pluginLinks(E_16_PLUGMANAGER, "array")); 
+        $sorted = multiarray_sort($merged,'title'); // this deleted the e-xxxx and p-xxxxx keys. 
+        return $this->restoreKeys($sorted); // we restore the keys with this. 
+        
 	}
 
 
-	function convert_core_icons($newarray)  // Put core button array in the same format as plugin button array.
+
+    private function restoreKeys($newarray)  // Put core button array in the same format as plugin button array.
+    {       
+        $array_functions_assoc = array();
+        
+        foreach($newarray as $key=>$val)
+        {
+           if(varset($val['key'])) // Plugin Array.  
+            {
+                $key = $val['key']; 
+             
+                $array_functions_assoc[$key] = $val;   
+            }
+        }
+    
+        return $array_functions_assoc;
+    }
+
+
+
+
+	private function convert_core_icons($newarray)  // Put core button array in the same format as plugin button array.
 	{
+	 
+	    $array_functions_assoc = array();
+        
 	    foreach($newarray as $key=>$val)
 		{
 			if(varset($val[0]))
 			{
 				$key = "e-".basename($val[0],".php");
+                $val['key'] = $key;
 				$val['icon'] = $val[5];
 				$val['icon_32'] = $val[6];
 				$val['title'] = $val[1];
@@ -746,6 +782,7 @@ class e_navigation
 				$val['perms'] = $val['3'];
 				$array_functions_assoc[$key] = $val;
 			}
+
 		}
 	
 	    return $array_functions_assoc;
@@ -836,6 +873,7 @@ class e_navigation
 						$plugin_icon = $eplug_icon_small ? "<img class='icon S16' src='".e_PLUGIN.$eplug_icon_small."' alt=''  />" : E_16_PLUGIN;
 						$plugin_icon_32 = $eplug_icon ? "<img class='icon S32' src='".e_PLUGIN.$eplug_icon."' alt=''  />" :  E_32_PLUGIN;
 						$plugin_array['p-'.$plugin_path] = array(
+						  'key'      => 'p-'.$plugin_path,
 						  'link'      => e_PLUGIN.$plugin_path."/".$eplug_conffile, 
 						  'title'     => $eplug_name, 'caption' => $eplug_caption, 
 						  'perms'     => "P".varset($plug_id[$plugin_path]), 
diff --git a/e107_plugins/admin_menu/admin_menu.php b/e107_plugins/admin_menu/admin_menu.php
index 9e39ab741..48be8727c 100644
--- a/e107_plugins/admin_menu/admin_menu.php
+++ b/e107_plugins/admin_menu/admin_menu.php
@@ -25,10 +25,11 @@ if (ADMIN == TRUE)
 	
 	$nav = e107::getNav();
 	
-	$admin = $nav->adminLinks('assoc');
-	$plugins = $nav->pluginLinks('assoc');
+//	$admin = $nav->adminLinks('assoc');
+//	$plugins = $nav->pluginLinks('assoc');
 
-	$array_functions = array_merge($admin, $plugins);
+//	$array_functions = array_merge($admin, $plugins);
+    $array_functions = $nav->adminLinks();
 
 	// print_a($array_functions);