diff --git a/admin_menu.map.inc b/admin_menu.map.inc
index 68b9bb4..1f27b97 100644
--- a/admin_menu.map.inc
+++ b/admin_menu.map.inc
@@ -5,6 +5,8 @@
  * Implements hook_admin_menu_map() on behalf of core modules.
  */
 
+use Drupal\node\Entity\NodeType;
+
 /**
  * Implements hook_admin_menu_map() on behalf of Node module.
  *
@@ -12,18 +14,19 @@
  *   it creates, so that this definition takes effect.
  */
 function node_admin_menu_map() {
-  if (user_access('administer content types')) {
+  $node_types = NodeType::loadMultiple();
+  if (\Drupal::currentUser()->hasPermission('administer content types')) {
     $map['admin/structure/types/manage/%node_type'] = array(
       'parent' => 'admin/structure/types',
       'arguments' => array(
-        array('%node_type' => array_keys(node_type_get_types())),
+        array('%node_type' => array_keys($node_types)),
       ),
     );
   }
   $map['node/add/%node_type'] = array(
     'parent' => 'node/add',
     'arguments' => array(
-      array('%node_type' => array_keys(node_type_get_types())),
+      array('%node_type' => array_keys($node_types)),
     ),
   );
   return $map;
@@ -34,7 +37,7 @@ function node_admin_menu_map() {
  */
 function admin_menu_admin_menu_map() {
   $map = array();
-  $entity_info = entity_get_info();
+  $entity_info = \Drupal::entityManager()->getDefinitions();
   foreach ($entity_info as $entity_type => $info) {
     // @todo Core: Allow to identify... config entity types, but exclude 'block'...
     if (!isset($info['config_prefix']) || $entity_type == 'block') {
@@ -114,9 +117,9 @@ function field_ui_admin_menu_map() {
         continue;
       }
       // @see field_ui_permission()
-      if (user_access('administer ' . $entity_type . ' fields')) {
+      if (\Drupal::currentUser()->hasPermission('administer ' . $entity_type . ' fields')) {
         $fields = array();
-        foreach (field_info_instances($entity_type, $bundle_name) as $field) {
+        foreach (\Drupal::entityManager()->getFieldDefinitions($entity_type, $bundle_name) as $field) {
           $fields[] = $field['field_name'];
         }
         if ($fields) {
diff --git a/admin_menu.module b/admin_menu.module
index 3c0ac9e..f3804f3 100644
--- a/admin_menu.module
+++ b/admin_menu.module
@@ -5,8 +5,15 @@
  * Render an administrative menu as a dropdown menu at the top of the window.
  */
 
+use Drupal\Component\Utility\String;
+use Drupal\Component\Utility\Unicode;
+use Drupal\Component\Utility\UrlHelper;
+use Drupal\Core\Form\FormState;
+use Drupal\Core\Language\LanguageInterface;
+use Drupal\Core\Render\Element;
 use Drupal\Core\Template\Attribute;
 use Drupal\Core\Cache\CacheBackendInterface;
+use Drupal\Core\Url;
 
 /**
  * Implements hook_help().
@@ -205,11 +212,11 @@ function admin_menu_library_info() {
  * Implements hook_page_build().
  */
 function admin_menu_page_build(&$page) {
-  if (!user_access('access administration menu') || admin_menu_suppress(FALSE)) {
+  if (!\Drupal::currentUser()->hasPermission('access administration menu') || admin_menu_suppress(FALSE)) {
     return;
   }
   // Performance: Skip this entirely for AJAX requests.
-  $current_path = current_path();
+  $current_path = \Drupal::routeMatch()->getRouteName() ? Url::fromRouteMatch(\Drupal::routeMatch())->getInternalPath() : '';
   if (strpos($current_path, 'js/') === 0) {
     return;
   }
@@ -229,22 +236,22 @@ function admin_menu_page_build(&$page) {
   // @see http://drupal.org/node/1805452
   $options = array();
 
-  if ($user->uid == 1) {
+  if (\Drupal::currentUser()->id() == 1) {
     $attached['css'][$path . '/admin_menu.uid1.css'] = $options;
   }
 
   // Destination query strings are applied via JS.
-  $settings['destination'] = drupal_http_build_query(drupal_get_destination());
+  $settings['destination'] = UrlHelper::buildQuery(drupal_get_destination());
 
   // Determine whether we need to show all components and disable all caches.
   $complete = FALSE;
-  if (current_path() == 'admin/config/admin/admin_menu' && $_SERVER['REQUEST_METHOD'] == 'GET') {
+  if ($current_path == 'admin/config/admin/admin_menu' && $_SERVER['REQUEST_METHOD'] == 'GET') {
     $complete = TRUE;
   }
-
+  $langcode = Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_INTERFACE)->getId();
   // If the client supports JavaScript and we have a cached menu for the current
   // user, only output the hash for the client-side HTTP cache callback URL.
-  $cid = 'admin_menu:' . $user->uid . ':' . session_id() . ':' . language(LANGUAGE_TYPE_INTERFACE)->langcode;
+  $cid = 'admin_menu:' . \Drupal::currentUser()->id() . ':' . session_id() . ':' .$langcode;
   if (!$complete && ($hash = admin_menu_cache_get($cid))) {
     $settings['hash'] = $hash;
     // The base path to use for cache requests depends on whether clean URLs
@@ -254,26 +261,26 @@ function admin_menu_page_build(&$page) {
     // add further required components to the URL to provide context. Due to
     // those components, and since url('') returns only base_path() when clean
     // URLs are disabled, we need to use a replacement token as path.  Yuck.
-    $settings['basePath'] = url('admin_menu');
+    $settings['basePath'] = \Drupal::urlGenerator()->generateFromPath('admin_menu');
   }
   // Otherwise, add the full menu to the page.
   else {
     $page['page_bottom']['admin_menu']['#markup'] = admin_menu_output($complete);
   }
 
-  $replacements = module_invoke_all('admin_menu_replacements', $complete);
+  $replacements = \Drupal::moduleHandler()->invokeAll('admin_menu_replacements', $complete);
   if (!empty($replacements)) {
     $settings['replacements'] = $replacements;
   }
 
-  if ($setting = variable_get('admin_menu_margin_top', 1)) {
+  if ($setting = \Drupal::config('admin_menu')->get('margin_top', 1)) {
     $settings['margin_top'] = $setting;
     // @todo Drupal.behaviors.adminMenuMarginTop is obsolete, but
     //   hook_page_build() does not allow to set a CSS class on the body yet.
     // @see http://drupal.org/node/1473548, http://drupal.org/node/1194528
     //$page['#attributes']['class'][] = 'admin-menu';
   }
-  if ($setting = variable_get('admin_menu_position_fixed', 1)) {
+  if ($setting = \Drupal::config('admin_menu')->get('position_fixed', 1)) {
     $settings['position_fixed'] = $setting;
 
     // In fixed positioning, supply a callback function for tableheader.js to
@@ -284,14 +291,14 @@ function admin_menu_page_build(&$page) {
       'type' => 'setting',
     );
   }
-  if ($setting = variable_get('admin_menu_tweak_tabs', 0)) {
+  if ($setting = \Drupal::config('admin_menu')->get('tweak_tabs', 0)) {
     $settings['tweak_tabs'] = $setting;
   }
   if ($current_path == 'admin/modules' || strpos($current_path, 'admin/modules/list') === 0) {
-    $settings['tweak_modules'] = variable_get('admin_menu_tweak_modules', 0);
+    $settings['tweak_modules'] = \Drupal::config('admin_menu')->get('tweak_modules', 0);
   }
   if ($current_path == 'admin/people/permissions' || $current_path == 'admin/people/permissions/list') {
-    $settings['tweak_permissions'] = variable_get('admin_menu_tweak_permissions', 0);
+    $settings['tweak_permissions'] = \Drupal::config('admin_menu')->get('tweak_permissions', 0);
   }
 
   $attached['js'][] = array(
@@ -317,7 +324,7 @@ function admin_menu_suppress($set = TRUE) {
   // drupal_add_js() must only be invoked once.
   if (!empty($set) && $suppress === FALSE) {
     $suppress = TRUE;
-    drupal_add_js(array('admin_menu' => array('suppress' => 1)), 'setting');
+    _drupal_add_js(array('admin_menu' => array('suppress' => 1)), 'setting');
   }
   return $suppress;
 }
@@ -350,11 +357,11 @@ function admin_menu_js() {
 function admin_menu_cache_get($cid) {
   $cache = &drupal_static(__FUNCTION__, array());
 
-  if (!variable_get('admin_menu_cache_client', TRUE)) {
+  if (!\Drupal::config('admin_menu')->get('cache_client', TRUE)) {
     return FALSE;
   }
   if (!array_key_exists($cid, $cache)) {
-    $cache[$cid] = cache('admin_menu')->get($cid);
+    $cache[$cid] = \Drupal::cache('admin_menu')->get($cid);
     if ($cache[$cid] && isset($cache[$cid]->data)) {
       $cache[$cid] = $cache[$cid]->data;
     }
@@ -377,8 +384,8 @@ function admin_menu_cache_get($cid) {
  *   The cache tags for the data to set.
  */
 function admin_menu_cache_set($cid, $data, array $tags) {
-  if (variable_get('admin_menu_cache_client', TRUE)) {
-    cache('admin_menu')->set($cid, $data, CacheBackendInterface::CACHE_PERMANENT, $tags);
+  if (\Drupal::config('admin_menu')->get('cache_client', TRUE)) {
+    \Drupal::cache('admin_menu')->set($cid, $data, CacheBackendInterface::CACHE_PERMANENT, $tags);
   }
 }
 
@@ -388,7 +395,8 @@ function admin_menu_cache_set($cid, $data, array $tags) {
  * @see admin_menu_deliver()
  */
 function admin_menu_js_cache() {
-  global $conf;
+  // @todo see https://www.drupal.org/node/2323571
+  /*global $conf;
 
   // Suppress Devel module.
   $GLOBALS['devel_shutdown'] = FALSE;
@@ -399,7 +407,7 @@ function admin_menu_js_cache() {
 
   // If we have a cache, serve it.
   // @see _drupal_bootstrap_page_cache()
-  $cache = drupal_page_get_cache();
+  $cache = drupal_page_get_cache(\Drupal::request());
   if (is_object($cache)) {
     header('X-Drupal-Cache: HIT');
     // Restore the metadata cached with the page.
@@ -425,7 +433,7 @@ function admin_menu_js_cache() {
 
   // Retrieve and return the rendered menu.
   $content = admin_menu_output();
-  return new Symfony\Component\HttpFoundation\Response($content);
+  return new Symfony\Component\HttpFoundation\Response($content);*/
 }
 
 /**
@@ -437,7 +445,7 @@ function admin_menu_admin_menu_replacements($complete) {
   // current counts already.
   if (!$complete) {
     // Check whether the users count component is enabled.
-    $components = variable_get('admin_menu_components', array());
+    $components = \Drupal::config('admin_menu')->get('components', array());
     if (!empty($components['admin_menu.users']) && ($user_count = admin_menu_get_user_count())) {
       // Replace the counters in the cached menu output with current counts.
       $items['.admin-menu-users a'] = $user_count;
@@ -452,7 +460,7 @@ function admin_menu_admin_menu_replacements($complete) {
  * @see user_block(), user.module
  */
 function admin_menu_get_user_count() {
-  $interval   = REQUEST_TIME - variable_get('user_block_seconds_online', 900);
+  $interval   = REQUEST_TIME - 900;
   $count_anon = admin_menu_session_count($interval, TRUE);
   $count_auth = admin_menu_session_count($interval, FALSE);
 
@@ -495,12 +503,12 @@ function admin_menu_session_count($timestamp = 0, $anonymous = TRUE) {
  *   page.
  */
 function admin_menu_output($complete = FALSE) {
-  global $user;
 
-  $cache_server_enabled = !$complete && variable_get('admin_menu_cache_server', TRUE);
-  $langcode = language(LANGUAGE_TYPE_INTERFACE)->langcode;
-  $cid = 'admin_menu:' . $user->uid . ':' . session_id() . ':' . $langcode;
-  $tags = array('admin_menu' => TRUE, 'user' => $user->uid, 'language' => $langcode);
+  $cache_server_enabled = !$complete && \Drupal::config('admin_menu')->get('cache_server', TRUE);
+  $langcode = Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_INTERFACE)->getId();
+  $uid = \Drupal::currentUser()->id();
+  $cid = 'admin_menu:' . $uid . ':' . session_id() . ':' . $langcode;
+  $tags = array('admin_menu' => TRUE, 'user' => $uid, 'language' => $langcode);
 
   // Try to load and output administration menu from server-side cache.
   // @todo Duplicates the page cache? Page cache ID contains the hash that is
@@ -511,16 +519,16 @@ function admin_menu_output($complete = FALSE) {
   //   cache_page instead? (i.e., one cache to rule them all) However,
   //   cache_page is cleared very often.
   if ($cache_server_enabled) {
-    $cache = cache('menu')->get($cid);
+    $cache = \Drupal::cache('menu')->get($cid);
     if ($cache && isset($cache->data)) {
       $content = $cache->data;
     }
   }
-
+  $classes = '';
   // Rebuild the output.
   if (!isset($content)) {
     // Retrieve enabled components to display and make them available for others.
-    $components = variable_get('admin_menu_components', array());
+    $components = \Drupal::config('admin_menu')->get('components', array());
     $components += array(
       'admin_menu.menu' => TRUE,
       'admin_menu.icon' => TRUE,
@@ -532,12 +540,7 @@ function admin_menu_output($complete = FALSE) {
     // Add site name as CSS class for development/staging theming purposes. We
     // leverage the cookie domain instead of HTTP_HOST to account for many (but
     // not all) multi-domain setups (e.g. language-based sub-domains).
-    $classes = 'admin-menu-site' . drupal_strtolower(preg_replace('/[^a-zA-Z0-9-]/', '-', $GLOBALS['cookie_domain']));
-    // Displace overlay.
-    // @see Drupal.overlay.create
-    // @see toolbar_preprocess_toolbar()
-    if (module_exists('overlay')) {
-      $classes .= ' overlay-displace-top';
+    $classes = 'admin-menu-site' . Unicode::strtolower(preg_replace('/[^a-zA-Z0-9-]/', '-', $GLOBALS['cookie_domain']));
     }
     // @todo Always output container to harden JS-less support.
     $content['#prefix'] = '<div id="admin-menu" class="' . $classes . '"><div id="admin-menu-wrapper">';
@@ -574,7 +577,7 @@ function admin_menu_output($complete = FALSE) {
 
     // Allow modules to enhance the menu.
     // Uses '_output' suffix for consistency with the alter hook (see below).
-    foreach (module_implements('admin_menu_output_build') as $module) {
+    foreach (\Drupal::moduleHandler()->getImplementations('admin_menu_output_build') as $module) {
       $function = $module . '_admin_menu_output_build';
       $function($content);
     }
@@ -582,14 +585,13 @@ function admin_menu_output($complete = FALSE) {
     // Allow modules to alter the output.
     // The '_output' suffix is required to prevent hook implementation function
     // name clashes with the contributed Admin module.
-    drupal_alter('admin_menu_output', $content);
+    \Drupal::moduleHandler()->alter('admin_menu_output', $content);
 
-    $content = drupal_render($content);
+    $content = \Drupal::service('renderer')->render($content);
 
     // Cache the menu for this user.
     if ($cache_server_enabled) {
-      cache('menu')->set($cid, $content, CacheBackendInterface::CACHE_PERMANENT, $tags);
-    }
+      \Drupal::cache('menu')->set($cid, $content, CacheBackendInterface::CACHE_PERMANENT, $tags);
   }
 
   // Store the new hash for this user.
@@ -611,7 +613,7 @@ function admin_menu_admin_menu_output_build(&$content) {
   // Unassign weights for categories below Configuration.
   // An alphabetical order is more natural for a dropdown menu.
   if (isset($content['menu']['admin/config'])) {
-    foreach (element_children($content['menu']['admin/config']) as $key) {
+    foreach (Element::children($content['menu']['admin/config']) as $key) {
       $content['menu']['admin/config'][$key]['#weight_original'] = $content['menu']['admin/config'][$key]['#weight'];
       unset($content['menu']['admin/config'][$key]['#weight']);
     }
@@ -690,7 +692,7 @@ function theme_admin_menu_links($variables) {
   $elements['#sorted'] = TRUE;
 
   $output = '';
-  foreach (element_children($elements) as $path) {
+  foreach (Element::children($elements) as $path) {
     // Early-return nothing if user does not have access.
     if (isset($elements[$path]['#access']) && !$elements[$path]['#access']) {
       continue;
@@ -701,10 +703,10 @@ function theme_admin_menu_links($variables) {
     );
     // Render children to determine whether this link is expandable.
     if (isset($elements[$path]['#type']) || isset($elements[$path]['#theme']) || isset($elements[$path]['#pre_render'])) {
-      $elements[$path]['#children'] = drupal_render($elements[$path]);
+      $elements[$path]['#children'] = \Drupal::service('renderer')->render($elements[$path]);
     }
     else {
-      $elements[$path]['#children'] = theme('admin_menu_links', array('elements' => $elements[$path]));
+      $elements[$path]['#children'] = \Drupal::service('theme.manager')->render('admin_menu_links', array('elements' => $elements[$path]));
       if (!empty($elements[$path]['#children'])) {
         $elements[$path]['#attributes']['class'][] = 'expandable';
       }
@@ -731,7 +733,7 @@ function theme_admin_menu_links($variables) {
         $title = $elements[$path]['#title'];
       }
       else {
-        $title = check_plain($elements[$path]['#title']);
+        $title = String::checkPlain($elements[$path]['#title']);
       }
       $attributes = '';
       if (isset($elements[$path]['#options']['attributes'])) {
@@ -773,9 +775,11 @@ function admin_menu_element_sort($a, $b) {
 /**
  * Implements hook_translated_menu_link_alter().
  *
+ * @todo what to do with this
+ *
  * Here is where we make changes to links that need dynamic information such
  * as the current page path or the number of users.
- */
+ * /
 function admin_menu_translated_menu_link_alter(&$item, $map) {
   global $user, $base_url;
   static $access_all;
@@ -806,7 +810,7 @@ function admin_menu_translated_menu_link_alter(&$item, $map) {
   if ($extra = variable_get('admin_menu_display', 0)) {
     $item['title'] .= ' ' . $extra[0] . ': ' . $item[$extra];
   }
-}
+}*/
 
 /**
  * Implements hook_cache_flush().
@@ -841,10 +845,10 @@ function admin_menu_cache_flush($uid = NULL) {
     $tags['user'] = $uid;
   }
   // Flush cached output of admin_menu.
-  cache('menu')->invalidateTags($tags);
+  \Drupal::cache('menu')->invalidateTags($tags);
   // Flush client-side cache hashes.
   drupal_static_reset('admin_menu_cache_get');
-  cache('admin_menu')->invalidateTags($tags);
+  \Drupal::cache('admin_menu')->invalidateTags($tags);
 
   // Return value is only used by drupal_flush_all_caches().
   return array('admin_menu');
@@ -895,7 +899,7 @@ function admin_menu_form_alter_flush_cache_submit($form, &$form_state) {
  *
  * Extends Devel module with Administration menu developer settings.
  */
-function admin_menu_form_devel_admin_settings_alter(&$form, &$form_state) {
-  form_load_include($form_state, 'inc', 'admin_menu');
+function admin_menu_form_devel_admin_settings_alter(&$form, FormState $form_state) {
+  $form_state->loadInclude('inc', 'admin_menu');
   _admin_menu_form_devel_admin_settings_alter($form, $form_state);
 }
