diff --git a/admin_toolbar.module b/admin_toolbar.module
index 2d8f466..54b0892 100644
--- a/admin_toolbar.module
+++ b/admin_toolbar.module
@@ -13,7 +13,7 @@ use Drupal\Core\Url;
  * Implements hook_toolbar_alter().
  */
 function admin_toolbar_toolbar_alter(&$items) {
-  $items['administration']['tray']['toolbar_administration']['#pre_render'] = ['admin_toolbar_prerender_toolbar_administration_tray'];
+  $items['administration']['tray']['toolbar_administration']['#pre_render'] = array('admin_toolbar_prerender_toolbar_administration_tray');
   $items['administration']['#attached']['library'][] = 'admin_toolbar/toolbar.tree';
 }
 
@@ -52,11 +52,11 @@ function admin_toolbar_prerender_toolbar_administration_tray(array $element) {
   $parameters = new MenuTreeParameters();
   $parameters->setRoot('system.admin')->excludeRoot()->setMaxDepth(4)->onlyEnabledLinks();
   $tree = $menu_tree->load(NULL, $parameters);
-  $manipulators = [
-    ['callable' => 'menu.default_tree_manipulators:checkAccess'],
-    ['callable' => 'menu.default_tree_manipulators:generateIndexAndSort'],
-    ['callable' => 'toolbar_tools_menu_navigation_links'],
-  ];
+  $manipulators = array(
+    array('callable' => 'menu.default_tree_manipulators:checkAccess'),
+    array('callable' => 'menu.default_tree_manipulators:generateIndexAndSort'),
+    array('callable' => 'toolbar_tools_menu_navigation_links'),
+  );
   $tree = $menu_tree->transform($tree, $manipulators);
   $element['administration_menu'] = $menu_tree->build($tree);
 
@@ -83,7 +83,7 @@ function toolbar_tools_menu_navigation_links(array $tree) {
     $definition = $link->getPluginDefinition();
 
     $element->options['attributes']['class'][] = 'toolbar-icon';
-    $element->options['attributes']['class'][] = 'toolbar-icon-' . strtolower(str_replace(['.', ' ', '_'], ['-', '-', '-'], $definition['id']));
+    $element->options['attributes']['class'][] = 'toolbar-icon-' . strtolower(str_replace(array('.', ' ', '_'), array('-', '-', '-'), $definition['id']));
     $element->options['attributes']['title'] = $link->getDescription();
   }
   return $tree;
diff --git a/admin_toolbar_tools/admin_toolbar_tools.module b/admin_toolbar_tools/admin_toolbar_tools.module
index 8a1c127..68c1eb7 100644
--- a/admin_toolbar_tools/admin_toolbar_tools.module
+++ b/admin_toolbar_tools/admin_toolbar_tools.module
@@ -11,21 +11,19 @@ use Drupal\Core\Routing\RouteMatchInterface;
  * Implements hook_toolbar().
  */
 function admin_toolbar_tools_toolbar() {
-  $items = [];
-  $items['admin_toolbar_tools'] = [
+  $items = array();
+  $items['admin_toolbar_tools'] = array(
     '#type' => 'toolbar_item',
-    'tab' => [
+    'tab' => array(
       '#type' => 'link',
-      '#attributes' => [
-        'class' => ['toolbar-icon', 'toolbar-icon-admin-toolbar-tools-help'],
-      ],
-    ],
-    '#attached' => [
-      'library' => [
-        'admin_toolbar_tools/toolbar.icon',
-      ],
-    ],
-  ];
+      '#attributes' => array(
+        'class' => array('toolbar-icon', 'toolbar-icon-admin-toolbar-tools-help'),
+      ),
+    ),
+    '#attached' => array('library' => array('admin_toolbar_tools/toolbar.icon'),
+    ),
+  );
+
   return $items;
 }
 
@@ -48,111 +46,90 @@ function admin_toolbar_tools_help($route_name, RouteMatchInterface $route_match)
  * Implements hook_menu_links_discovered_alter().
  */
 function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
-  $links['admin_toolbar_tools.help'] = [
-    'title' => 'Tools',
-    'route_name' => '<front>',
-    'parent' => 'system.admin',
-    'weight' => -100,
-  ];
-  // Add system links.
-  $links['system.admin_index'] = [
-    'title' => 'Index',
-    'route_name' => 'system.admin_index',
-    'parent' => 'admin_toolbar_tools.help',
-    'weight' => -100,
-  ];
-  $links['system.run_cron'] = [
-    'title' => 'Run cron',
-    'route_name' => 'admin_toolbar.run.cron',
-    'parent' => 'admin_toolbar_tools.help',
-    'weight' => -8,
-  ];
-  $links['system.db_update'] = [
-    'title' => 'Run Updates',
-    'route_name' => 'system.db_update',
-    'parent' => 'admin_toolbar_tools.help',
-    'weight' => -6,
-  ];
-  $links['system.modules_uninstall'] = [
-    'title' => 'Uninstall',
-    'route_name' => 'system.modules_uninstall',
-    'parent' => 'system.modules_list',
-  ];
-  // Defining the machine names for all core content entities.
-  $content_entities = [
-    "block_content" => [
-      "content_entity" => "block_content",
-      "config_entity" => "block_content_type",
-    ],
-    "comment" => [
-      "content_entity" => "comment",
-      "config_entity" => "comment_type",
-    ],
-    "contact" => [
-      "content_entity" => "contact_message",
-      "config_entity" => "contact_form",
-    ],
-    "node" => [
-      "content_entity" => "node",
-      "config_entity" => "node_type",
-    ],
-    "taxonomy" => [
-      "content_entity" => "taxonomy_term",
-      "config_entity" => "taxonomy_vocabulary",
-    ],
-  ];
+  $moduleHandler = \Drupal::moduleHandler();
+  $entityTypeManager = \Drupal::entityTypeManager();
+  $routeProvider = \Drupal::service('router.route_provider');
+  $routes = array();
+  foreach ($routeProvider->getAllRoutes() as $route_name => $route) {
+    $routes[] = $route_name;
+  }
 
-  // Add common links to entities if parent module exists.
-  // The common links for entities are:
-  // - Editing an entity, Deleting an entity, managing fields for an entity,
-  // - manage form display for an entity, entity view display.
-  // - Others links relating to entity are included here as well.
+  $entityTypes = $entityTypeManager->getDefinitions();
+  $content_entities = array();
+  foreach ($entityTypes as $key => $entityType) {
+    if ($entityType->getBundleEntityType() && ($entityType->get('field_ui_base_route') != '')) {
+      $content_entities[$key] = array(
+        'content_entity' => $key,
+        'content_entity_bundle' => $entityType->getBundleEntityType(),
+      );
+    }
+  }
+
+  // Adds common links to entities.
   foreach ($content_entities as $module_name => $entities) {
-    if (\Drupal::moduleHandler()->moduleExists($module_name)) {
-      $config_entity = $entities['config_entity'];
-      $content_entity = $entities['content_entity'];
-      foreach (\Drupal::entityManager()
-                 ->getBundleInfo($content_entity) as $machine_name => $bundle) {
-        $links["entity." . $config_entity . ".edit_form." . $machine_name] = [
-          'title' => $bundle['label'],
-          'route_name' => "entity." . $config_entity . ".edit_form",
-          'parent' => "entity." . $config_entity . ".collection",
-          'route_parameters' => [$config_entity => $machine_name],
-        ];
-        $links["entity." . $config_entity . ".delete_form." . $machine_name] = [
-          'title' => 'Delete',
-          'route_name' => "entity." . $config_entity . ".delete_form",
-          'parent' => "entity." . $config_entity . ".edit_form." . $machine_name,
-          'route_parameters' => [$config_entity => $machine_name],
-        ];
-        if (\Drupal::moduleHandler()->moduleExists('field_ui')) {
-          $links["entity." . $content_entity . ".field_ui_fields" . $machine_name] = [
-            'title' => 'Manage fields',
-            'route_name' => "entity." . $content_entity . ".field_ui_fields",
-            'parent' => "entity." . $config_entity . ".edit_form." . $machine_name,
-            'route_parameters' => [$config_entity => $machine_name],
-          ];
-          $links["entity.entity_form_display." . $content_entity . ".default" . $machine_name] = [
-            'title' => 'Manage form display',
-            'route_name' => "entity.entity_form_display." . $content_entity . ".default",
-            'parent' => "entity." . $config_entity . ".edit_form." . $machine_name,
-            'route_parameters' => [$config_entity => $machine_name
-            ],
-          ];
-          $links["entity.entity_view_display." . $content_entity . ".default" . $machine_name] = [
-            'title' => 'Manage display',
-            'route_name' => "entity.entity_view_display." . $content_entity . ".default",
-            'parent' => "entity." . $config_entity . ".edit_form." . $machine_name,
-            'route_parameters' => [$config_entity => $machine_name],
-          ];
+    $content_entity_bundle = $entities['content_entity_bundle'];
+    $content_entity = $entities['content_entity'];
+    foreach ($entityTypeManager->getStorage($content_entity_bundle)->loadMultiple() as $machine_name => $bundle) {
+      // Normally, the edit form for the bundle would be its root link.
+      $content_entity_bundle_root = NULL;
+      if (in_array('entity.' . $content_entity_bundle . '.overview_form', $routes)) {
+        // Some bundles have an overview/list form that make a better root link.
+        $content_entity_bundle_root = 'entity.' . $content_entity_bundle . '.overview_form.' . $machine_name;
+        $links[$content_entity_bundle_root] = array(
+          'title' => $bundle->label(),
+          'route_name' => 'entity.' . $content_entity_bundle . '.overview_form',
+          'menu_name' => 'admin',
+          'parent' => 'entity.' . $content_entity_bundle . '.collection',
+          'route_parameters' => array($content_entity_bundle => $machine_name),
+        );
+      }
+      if (in_array('entity.' . $content_entity_bundle . '.edit_form', $routes)) {
+        $key = 'entity.' . $content_entity_bundle . '.edit_form.' . $machine_name;
+        $links[$key] = array(
+          'title' => $bundle->label(),
+          'route_name' => 'entity.' . $content_entity_bundle . '.edit_form',
+          'menu_name' => 'admin',
+          'parent' => 'entity.' . $content_entity_bundle . '.collection',
+          'route_parameters' => array($content_entity_bundle => $machine_name),
+        );
+        if (empty($content_entity_bundle_root)) {
+          $content_entity_bundle_root = $key;
+        }
+        else {
+          $links[$key]['parent'] = $content_entity_bundle_root;
+          $links[$key]['title'] = t('Edit');
         }
-        if (\Drupal::moduleHandler()->moduleExists('devel')) {
-          $links["entity.$config_entity.devel_load." . $machine_name] = [
-            'title' => 'Devel',
-            'route_name' => "entity." . $config_entity . ".devel_load",
-            'parent' => "entity." . $config_entity . ".edit_form." . $machine_name,
-            'route_parameters' => [$config_entity => $machine_name],
-          ];
+      }
+      if ($moduleHandler->moduleExists('field_ui')) {
+        if (in_array('entity.' . $content_entity . '.field_ui_fields', $routes)) {
+          $links['entity.' . $content_entity . '.field_ui_fields' . $machine_name] = array(
+            'title' => t('Manage fields'),
+            'route_name' => 'entity.' . $content_entity . '.field_ui_fields',
+            'menu_name' => 'admin',
+            'parent' => $content_entity_bundle_root,
+            'route_parameters' => array($content_entity_bundle => $machine_name),
+            'weight' => 1,
+          );
+        }
+        if (in_array('entity.entity_form_display.' . $content_entity . '.default', $routes)) {
+          $links['entity.entity_form_display.' . $content_entity . '.default' . $machine_name] = array(
+            'title' => t('Manage form display'),
+            'route_name' => 'entity.entity_form_display.' . $content_entity . '.default',
+            'menu_name' => 'admin',
+            'parent' => $content_entity_bundle_root,
+            'route_parameters' => array($content_entity_bundle => $machine_name),
+            'weight' => 2,
+          );
+        }
+        if (in_array('entity.entity_view_display.' . $content_entity . '.default', $routes)) {
+          $links['entity.entity_view_display.' . $content_entity . '.default.' . $machine_name] = array(
+            'title' => t('Manage display'),
+            'route_name' => 'entity.entity_view_display.' . $content_entity . '.default',
+            'menu_name' => 'admin',
+            'parent' => $content_entity_bundle_root,
+            'route_parameters' => array($content_entity_bundle => $machine_name),
+            'weight' => 3,
+          );
         }
       }
       if ($moduleHandler->moduleExists('devel') && in_array('entity.' . $content_entity_bundle . '.devel_load', $routes)) {
@@ -178,331 +155,343 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
     }
   }
 
-// Add user links.
-  $links['user.admin_create'] = [
-    'title' => 'Add user',
+  // Add user links.
+  $links['user.admin_create'] = array(
+    'title' => t('Add a new user'),
     'route_name' => 'user.admin_create',
     'menu_name' => 'admin',
     'parent' => 'entity.user.collection',
-  ];
-  $links['user.admin_permissions'] = [
-    'title' => 'Permissions',
+  );
+  $links['user.admin_permissions'] = array(
+    'title' => t('Permissions'),
     'route_name' => 'user.admin_permissions',
     'menu_name' => 'admin',
     'parent' => 'entity.user.collection',
-  ];
-  $links['entity.user_role.collection'] = [
-    'title' => 'Roles',
+  );
+  $links['entity.user_role.collection'] = array(
+    'title' => t('Roles'),
     'route_name' => 'entity.user_role.collection',
     'menu_name' => 'admin',
     'parent' => 'entity.user.collection',
-  ];
-  $links['user.logoutt'] = [
-    'title' => 'Logout',
+  );
+  $links['admin_toolbar_tools.user.logout'] = array(
+    'title' => t('Logout'),
     'route_name' => 'user.logout',
     'parent' => 'admin_toolbar_tools.help',
     'weight' => 10,
-  ];
-  $links['user.role_add'] = [
-    'title' => 'Add role',
+  );
+  $links['user.role_add'] = array(
+    'title' => t('Add a new role'),
     'route_name' => 'user.role_add',
     'menu_name' => 'admin',
     'parent' => 'entity.user_role.collection',
     'weight' => -5,
-  ];
-  if (\Drupal::moduleHandler()->moduleExists('field_ui')) {
-    $links['entity.user.field_ui_fields_'] = [
-      'title' => 'Manage fields',
+  );
+  if ($moduleHandler->moduleExists('field_ui')) {
+    $links['entity.user.field_ui_fields_'] = array(
+      'title' => t('Manage fields'),
       'route_name' => 'entity.user.field_ui_fields',
       'menu_name' => 'admin',
       'parent' => 'entity.user.admin_form',
-    ];
-    $links['entity.entity_form_display.user.default_'] = [
-      'title' => 'Manage form display',
+    );
+    $links['entity.entity_form_display.user.default_'] = array(
+      'title' => t('Manage form display'),
       'route_name' => 'entity.entity_form_display.user.default',
       'menu_name' => 'admin',
       'parent' => 'entity.user.admin_form',
-    ];
-    $links['entity.entity_view_display.user.default_'] = [
-      'title' => 'Manage display',
+    );
+    $links['entity.entity_view_display.user.default_'] = array(
+      'title' => t('Manage display'),
       'route_name' => 'entity.entity_view_display.user.default',
       'menu_name' => 'admin',
       'parent' => 'entity.user.admin_form',
-    ];
+    );
   }
   foreach (user_roles() as $role) {
-    $links['entity.user_role.edit_form.' . $role->id()] = [
+    $links['entity.user_role.edit_form.' . $role->id()] = array(
       'title' => $role->label(),
       'route_name' => 'entity.user_role.edit_form',
       'menu_name' => 'admin',
       'parent' => 'entity.user_role.collection',
-      'route_parameters' => ['user_role' => $role->id()],
-    ];
-    $links['entity.user_role.edit_permissions_form.' . $role->id()] = [
-      'title' => "Edit permissions",
+      'route_parameters' => array('user_role' => $role->id()),
+    );
+    $links['entity.user_role.edit_permissions_form.' . $role->id()] = array(
+      'title' => t('Edit permissions'),
       'route_name' => 'entity.user_role.edit_permissions_form',
       'menu_name' => 'admin',
       'parent' => 'entity.user_role.edit_form.' . $role->id(),
-      'route_parameters' => ['user_role' => $role->id()],
-    ];
-    $links['entity.user_role.delete_form.' . $role->id()] = [
-      'title' => "Delete",
+      'route_parameters' => array('user_role' => $role->id()),
+    );
+    $links['entity.user_role.delete_form.' . $role->id()] = array(
+      'title' => t('Delete'),
       'route_name' => 'entity.user_role.delete_form',
       'menu_name' => 'admin',
       'parent' => 'entity.user_role.edit_form.' . $role->id(),
-      'route_parameters' => ['user_role' => $role->id()],
-    ];
-    if (\Drupal::moduleHandler()->moduleExists('devel')) {
-      $links['entity.user_role.devel_load.' . $role->id()] = [
-        'title' => "Devel",
+      'route_parameters' => array('user_role' => $role->id()),
+    );
+    if ($moduleHandler->moduleExists('devel')) {
+      $links['entity.user_role.devel_load.' . $role->id()] = array(
+        'title' => t('Devel'),
         'route_name' => 'entity.user_role.devel_load',
         'menu_name' => 'admin',
         'parent' => 'entity.user_role.edit_form.' . $role->id(),
-        'route_parameters' => ['user_role' => $role->id()],
-      ];
+        'route_parameters' => array('user_role' => $role->id()),
+      );
     }
   }
 
   if ($moduleHandler->moduleExists('node')) {
     $links['node.add_page']['parent'] = 'system.admin_content';
-    $links['node.type_add'] = [
-      'title' => 'Add content type',
+    $links['node.type_add'] = array(
+      'title' => t('Add content type'),
       'route_name' => 'node.type_add',
       'menu_name' => 'admin',
       'parent' => 'entity.node_type.collection',
       'weight' => -5,
-    ];
+    );
     // Add node links for each content type.
-    foreach (node_type_get_names() as $machine_name => $label) {
-      $links['node.add.' . $machine_name] = [
-        'title' => $label,
+    foreach (\Drupal::entityTypeManager()->getStorage('node_type')->loadMultiple() as $type) {
+      $links['node.add.' . $type->id()] = array(
+        'title' => t($type->label()),
         'route_name' => 'node.add',
         'parent' => 'node.add_page',
-        'route_parameters' => ['node_type' => $machine_name],
-      ];
+        'route_parameters' => array('node_type' => $type->id()),
+      );
     }
   }
-  if (\Drupal::moduleHandler()->moduleExists('field_ui')) {
-    $links['field_ui.entity_form_mode_add'] = [
-      'title' => 'Add new form mode',
+
+  if ($moduleHandler->moduleExists('field_ui')) {
+    $links['field_ui.entity_form_mode_add'] = array(
+      'title' => t('Add new form mode'),
       'route_name' => 'field_ui.entity_form_mode_add',
       'menu_name' => 'admin',
       'parent' => 'entity.entity_form_mode.collection',
-    ];
-    $links['field_ui.entity_view_mode_add'] = [
-      'title' => 'Add new view mode',
+    );
+    $links['field_ui.entity_view_mode_add'] = array(
+      'title' => t('Add new view mode'),
       'route_name' => 'field_ui.entity_view_mode_add',
       'menu_name' => 'admin',
       'parent' => 'entity.entity_view_mode.collection',
-    ];
+    );
   }
-  if (\Drupal::moduleHandler()->moduleExists('taxonomy')) {
-    $links['entity.taxonomy_vocabulary.add_form'] = [
-      'title' => 'Add vocabulary',
+
+  if ($moduleHandler->moduleExists('taxonomy')) {
+    $links['entity.taxonomy_vocabulary.add_form'] = array(
+      'title' => t('Add vocabulary'),
       'route_name' => 'entity.taxonomy_vocabulary.add_form',
       'menu_name' => 'admin',
       'parent' => 'entity.taxonomy_vocabulary.collection',
       'weight' => -5,
-    ];
-    foreach (\Drupal::entityManager()->getBundleInfo('taxonomy_term') as $machine_name => $bundle) {
-      $links['entity.taxonomy_term.add_form.' . $machine_name] = [
-        'title' => $bundle['label'],
-        'route_name' => 'entity.taxonomy_term.add_form',
-        'parent' => 'entity.taxonomy_vocabulary.edit_form',
-        'route_parameters' => ['taxonomy_vocabulary' => $machine_name],
-      ];
-    }
+    );
   }
-  if (\Drupal::moduleHandler()->moduleExists('menu_ui')) {
-    $links['entity.menu.add_form'] = [
-      'title' => 'Add menu',
+
+  if ($moduleHandler->moduleExists('menu_ui')) {
+    $links['entity.menu.add_form'] = array(
+      'title' => t('Add menu'),
       'route_name' => 'entity.menu.add_form',
       'menu_name' => 'admin',
       'parent' => 'entity.menu.collection',
       'weight' => -50,
-    ];
-    // Adding links to /admin/structure/menu.
+    );
+    // Adds links to /admin/structure/menu.
     foreach (menu_ui_get_menus() as $machine_name => $label) {
-      $links['entity.menu.edit_form.' . $machine_name] = [
+      $links['entity.menu.edit_form.' . $machine_name] = array(
         'title' => $label,
         'route_name' => 'entity.menu.edit_form',
         'menu_name' => 'admin',
         'parent' => 'entity.menu.collection',
-        'route_parameters' => ['menu' => $machine_name],
-      ];
-      $links['entity.menu.delete_form.' . $machine_name] = [
-        'title' => 'Delete',
+        'route_parameters' => array('menu' => $machine_name),
+      );
+      $links['entity.menu.delete_form.' . $machine_name] = array(
+        'title' => t('Delete'),
         'route_name' => 'entity.menu.delete_form',
         'menu_name' => 'admin',
         'parent' => 'entity.menu.edit_form.' . $machine_name,
-        'route_parameters' => ['menu' => $machine_name],
-      ];
-      if (\Drupal::moduleHandler()->moduleExists('devel')) {
-        $links['entity.menu.devel_load.' . $machine_name] = [
-          'title' => 'Devel',
+        'route_parameters' => array('menu' => $machine_name),
+      );
+      if ($moduleHandler->moduleExists('devel')) {
+        $links['entity.menu.devel_load.' . $machine_name] = array(
+          'title' => t('Devel'),
           'route_name' => 'entity.menu.devel_load',
           'menu_name' => 'admin',
           'parent' => 'entity.menu.edit_form.' . $machine_name,
-          'route_parameters' => ['menu' => $machine_name],
-        ];
+          'route_parameters' => array('menu' => $machine_name),
+        );
       }
-      $links['entity.menu.add_link_form.' . $machine_name] = [
-        'title' => 'Add link',
+      $links['entity.menu.add_link_form.' . $machine_name] = array(
+        'title' => t('Add link'),
         'route_name' => 'entity.menu.add_link_form',
         'menu_name' => 'admin',
         'parent' => 'entity.menu.edit_form.' . $machine_name,
-        'route_parameters' => ['menu' => $machine_name],
-      ];
+        'route_parameters' => array('menu' => $machine_name),
+      );
     }
   }
 
   // If module block_content is enabled.
-  if (\Drupal::moduleHandler()->moduleExists('block_content')) {
-    $links['block_content.add_page'] = [
-      'title' => 'Add custom block',
+  if ($moduleHandler->moduleExists('block_content')) {
+    $links['block_content.add_page'] = array(
+      'title' => t('Add custom block'),
       'route_name' => 'block_content.add_page',
       'menu_name' => 'admin',
       'parent' => 'block.admin_display',
       'weight' => -100,
-    ];
-    $links['entity.block_content.collection'] = [
-      'title' => 'Custom block library',
+    );
+    $links['entity.block_content.collection'] = array(
+      'title' => t('Custom block library'),
       'route_name' => 'entity.block_content.collection',
       'menu_name' => 'admin',
       'parent' => 'block.admin_display',
-    ];
-    $links['entity.block_content_type.collection'] = [
-      'title' => 'Types',
+    );
+    $links['entity.block_content_type.collection'] = array(
+      'title' => t('Types'),
       'route_name' => 'entity.block_content_type.collection',
       'menu_name' => 'admin',
       'parent' => 'block.admin_display',
-    ];
+    );
   }
-  // If module contact is enabled.
-  if (\Drupal::moduleHandler()->moduleExists('contact')) {
-    $links['contact.form_add'] = [
-      'title' => 'Add contact form',
+
+  // If module Contact is enabled.
+  if ($moduleHandler->moduleExists('contact')) {
+    $links['contact.form_add'] = array(
+      'title' => t('Add contact form'),
       'route_name' => 'contact.form_add',
       'menu_name' => 'admin',
       'parent' => 'entity.contact_form.collection',
       'weight' => -5,
-    ];
+    );
   }
-  // If module update is enabled.
-  if (\Drupal::moduleHandler()->moduleExists('update')) {
-    $links['update.module_update'] = [
-      'title' => 'Update',
+
+  // If module Update Manager is enabled.
+  if ($moduleHandler->moduleExists('update')) {
+    $links['update.module_update'] = array(
+      'title' => t('Update'),
       'route_name' => 'update.module_update',
       'menu_name' => 'admin',
       'parent' => 'system.modules_list',
-    ];
-    $links['update.module_install'] = [
-      'title' => 'Install new module',
+    );
+    $links['update.module_install'] = array(
+      'title' => t('Install new module'),
       'route_name' => 'update.module_install',
       'menu_name' => 'admin',
       'parent' => 'system.modules_list',
-    ];
+    );
   }
-  if (\Drupal::moduleHandler()->moduleExists('devel')) {
-    $links['admin_development'] = [
-      'title' => 'Development',
+
+  // If module Devel is enabled.
+  if ($moduleHandler->moduleExists('devel')) {
+    $links['admin_development'] = array(
+      'title' => t('Development'),
       'route_name' => 'system.admin_config_development',
       'menu_name' => 'admin',
       'parent' => 'admin_toolbar_tools.help',
-      'weight' => -8,
-    ];
-    $links['devel.admin_settings'] = [
-      'title' => 'Devel settings',
+      'weight' => '-8',
+    );
+    $links['admin_toolbar_tools.devel.admin_settings'] = array(
+      'title' => t('Devel settings'),
       'route_name' => 'devel.admin_settings',
+      'menu_name' => 'admin',
       'parent' => 'admin_development',
-    ];
-    $links['devel.configs_list'] = [
-      'title' => 'Config editor',
+      'weight' => '-1',
+    );
+    $links['admin_toolbar_tools.devel.configs_list'] = array(
+      'title' => t('Config editor'),
       'route_name' => 'devel.configs_list',
+      'menu_name' => 'admin',
       'parent' => 'admin_development',
-    ];
-    $links['devel.reinstall'] = [
-      'title' => 'Reinstall Modules',
+    );
+    $links['admin_toolbar_tools.devel.reinstall'] = array(
+      'title' => t('Reinstall modules'),
       'route_name' => 'devel.reinstall',
       'parent' => 'admin_development',
-    ];
-    $links['devel.menu_rebuild'] = [
-      'title' => 'Rebuild Menu',
+    );
+    $links['admin_toolbar_tools.devel.menu_rebuild'] = array(
+      'title' => t('Rebuild menu'),
       'route_name' => 'devel.menu_rebuild',
+      'menu_name' => 'admin',
       'parent' => 'admin_development',
-    ];
-    $links['devel.state_system_page'] = [
-      'title' => 'State editor',
+    );
+    $links['admin_toolbar_tools.devel.state_system_page'] = array(
+      'title' => t('State editor'),
       'route_name' => 'devel.state_system_page',
+      'menu_name' => 'admin',
       'parent' => 'admin_development',
-    ];
-    $links['devel.theme_registry'] = [
-      'title' => 'Theme registry',
+    );
+    $links['admin_toolbar_tools.devel.theme_registry'] = array(
+      'title' => t('Theme registry'),
       'route_name' => 'devel.theme_registry',
+      'menu_name' => 'admin',
       'parent' => 'admin_development',
-    ];
-    $links['devel.entity_info_page'] = [
-      'title' => 'Entity Info',
+    );
+    $links['admin_toolbar_tools.devel.entity_info_page'] = array(
+      'title' => t('Entity Info'),
       'route_name' => 'devel.entity_info_page',
+      'menu_name' => 'admin',
       'parent' => 'admin_development',
-    ];
-    $links['devel.execute_php'] = [
-      'title' => 'Execute PHP',
+    );
+    $links['admin_toolbar_tools.devel.execute_php'] = array(
+      'title' => t('Execute PHP Code'),
       'route_name' => 'devel.execute_php',
+      'menu_name' => 'admin',
       'parent' => 'admin_development',
-    ];
-    $links['devel.session'] = [
-      'title' => 'View Session',
+    );
+    $links['admin_toolbar_tools.devel.session'] = array(
+      'title' => t('Session viewer'),
       'route_name' => 'devel.session',
+      'menu_name' => 'admin',
       'parent' => 'admin_development',
-    ];
-    $links['devel.elements_page'] = [
-      'title' => 'Hook_elements',
+    );
+    $links['admin_toolbar_tools.devel.elements_page'] = array(
+      'title' => t('Form API field types'),
       'route_name' => 'devel.elements_page',
+      'menu_name' => 'admin',
       'parent' => 'admin_development',
-    ];
+    );
   }
-  // If module views_ui enabled.
-  if (\Drupal::moduleHandler()->moduleExists('views_ui')) {
-    $links['views_ui.add'] = [
+
+  // If module Views Ui enabled.
+  if ($moduleHandler->moduleExists('views_ui')) {
+    $links['views_ui.add'] = array(
       'title' => t('Add new view'),
       'route_name' => 'views_ui.add',
       'menu_name' => 'admin',
       'parent' => 'entity.view.collection',
       'weight' => -5,
-    ];
+    );
   }
-  $links['system.theme_settings_'] = [
+
+  $links['system.theme_settings_'] = array(
     'title' => t('Settings'),
     'route_name' => 'system.theme_settings',
     'menu_name' => 'admin',
     'parent' => 'system.themes_page',
-  ];
-  if (\Drupal::moduleHandler()->moduleExists('update')) {
-    $links['update.theme_install_'] = [
+  );
+
+  if ($moduleHandler->moduleExists('update')) {
+    $links['update.theme_install_'] = array(
       'title' => t('Install new theme'),
       'route_name' => 'update.theme_install',
       'menu_name' => 'admin',
       'parent' => 'system.themes_page',
-    ];
-    $links['update.theme_update_'] = [
+    );
+    $links['update.theme_update_'] = array(
       'title' => t('Update'),
       'route_name' => 'update.theme_update',
       'menu_name' => 'admin',
       'parent' => 'system.themes_page',
-    ];
-    //List of installed themes.
-    $installed_themes = installedThemes();
+    );
+    // Lists installed themes.
+    $installed_themes = admin_toolbar_tools_installed_themes();
     foreach ($installed_themes as $key_theme => $label_theme) {
-      $links['system.theme_settings_theme' . '.' . $key_theme] = [
+      $links['system.theme_settings_theme.' . $key_theme] = array(
         'title' => t($label_theme),
         'route_name' => 'system.theme_settings_theme',
         'menu_name' => 'admin',
         'parent' => 'system.theme_settings_',
-        'route_parameters' => [
+        'route_parameters' => array(
           'theme' => $key_theme,
-        ],
-      ];
+        ),
+      );
     }
   }
 }
@@ -515,7 +504,7 @@ function admin_toolbar_tools_menu_links_discovered_alter(&$links) {
  */
 function admin_toolbar_tools_installed_themes() {
   $all_themes = \Drupal::service('theme_handler')->listInfo();
-  $themes_installed = [];
+  $themes_installed = array();
   foreach ($all_themes as $key_theme => $theme) {
     if (\Drupal::service('theme_handler')->hasUi($key_theme)) {
       $themes_installed[$key_theme] = $theme->getName();
