diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index e8c8b6ef7ff469ee7b7c1cc7368876b26a6edca6..5580e168f271a48c04a7faa66e6344d13d7362de 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -995,7 +995,7 @@ function install_base_system(&$install_state) {
 
   // Enable the user module so that sessions can be recorded during the
   // upcoming bootstrap step.
-  Drupal::moduleHandler()->install(array('user'), FALSE);
+  \Drupal::moduleHandler()->install(array('user'), FALSE);
 
   // Save the list of other modules to install for the upcoming tasks.
   // variable_set() can be used now that system.module is installed.
@@ -2037,7 +2037,7 @@ function _install_module_batch($module, $module_name, &$context) {
   // loaded by drupal_bootstrap in subsequent batch requests, and other
   // modules possibly depending on it can safely perform their installation
   // steps.
-  Drupal::moduleHandler()->install(array($module), FALSE);
+  \Drupal::moduleHandler()->install(array($module), FALSE);
   $context['results'][] = $module;
   $context['message'] = t('Installed %module module.', array('%module' => $module_name));
 }
@@ -2529,7 +2529,7 @@ function install_configure_form_submit($form, &$form_state) {
 
   // Enable update.module if this option was selected.
   if ($form_state['values']['update_status_module'][1]) {
-    Drupal::moduleHandler()->install(array('file', 'update'), FALSE);
+    \Drupal::moduleHandler()->install(array('file', 'update'), FALSE);
 
     // Add the site maintenance account's email address to the list of
     // addresses to be notified when updates are available, if selected.
diff --git a/core/includes/menu.inc b/core/includes/menu.inc
index 49627d1a0f888f366fd9dd1a123edac532f994eb..46ed01d1e246cd3f972f3d6dafad026a4c083385 100644
--- a/core/includes/menu.inc
+++ b/core/includes/menu.inc
@@ -1743,7 +1743,7 @@ function theme_menu_local_task($variables) {
     $a_tag = l($link_text, $link['href'], $link['localized_options']);
   }
   else {
-    $a_tag = Drupal::l($link_text, $link['route_name'], $link['route_parameters'], $link['localized_options']);
+    $a_tag = \Drupal::l($link_text, $link['route_name'], $link['route_parameters'], $link['localized_options']);
   }
 
   return '<li' . (!empty($variables['element']['#active']) ? ' class="active"' : '') . '>' . $a_tag . '</li>';
@@ -1967,9 +1967,9 @@ function menu_local_tasks($level = 0) {
     $data['tabs'] = array();
     $data['actions'] = array();
 
-    $route_name = Drupal::request()->attributes->get(RouteObjectInterface::ROUTE_NAME);
+    $route_name = \Drupal::request()->attributes->get(RouteObjectInterface::ROUTE_NAME);
     if (!empty($route_name)) {
-      $manager = Drupal::service('plugin.manager.menu.local_task');
+      $manager = \Drupal::service('plugin.manager.menu.local_task');
       $local_tasks = $manager->getTasksBuild($route_name);
       foreach ($local_tasks as $level => $items) {
         $data['tabs'][$level] = empty($data['tabs'][$level]) ? $items : array_merge($data['tabs'][$level], $items);
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index d382b3978a0dadb7064ebbb51a9c9c8cb730515a..b65b71e8641c3e89a9ea93738bdd83a4caebcb40 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -77,7 +77,7 @@ function drupal_theme_access($theme) {
   if (is_object($theme)) {
     $theme = $theme->name;
   }
-  return Drupal::service('access_check.theme')->checkAccess($theme);
+  return \Drupal::service('access_check.theme')->checkAccess($theme);
 }
 
 /**
diff --git a/core/includes/update.inc b/core/includes/update.inc
index ff3fabe38f866f35f7e45426228b8cac8286fdde..789d13681ed8c2f90652f91d58339c69519a697b 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc
@@ -485,7 +485,7 @@ function update_prepare_stored_includes() {
  */
 function update_prepare_d8_language() {
   if (db_table_exists('languages')) {
-    Drupal::moduleHandler()->install(array('language'));
+    \Drupal::moduleHandler()->install(array('language'));
 
     $languages = db_select('languages', 'l')
       ->fields('l')
@@ -677,7 +677,7 @@ function update_fix_d8_requirements() {
 
     // Make sure that file.module is enabled as it is required for the user
     // picture upgrade path.
-    Drupal::moduleHandler()->install(array('file'));
+    \Drupal::moduleHandler()->install(array('file'));
 
     $schema = array(
       'description' => 'Generic key/value storage table with an expiration.',
@@ -721,7 +721,7 @@ function update_fix_d8_requirements() {
     // views configurations.
     // Like any other module APIs and services, Views' services are not available
     // in update.php. Existing listings are migrated into configuration, using
-    // the limited standard tools of raw database queries and Drupal::config().
+    // the limited standard tools of raw database queries and \Drupal::config().
     \Drupal::moduleHandler()->install(array('views'));
 
     update_variable_set('update_d8_requirements', TRUE);
diff --git a/core/modules/block/block.install b/core/modules/block/block.install
index e66896108a6b41f98c787b59973c63015092e1e4..ed996f63b436f5d6219b6ef80c71a79c501f7b91 100644
--- a/core/modules/block/block.install
+++ b/core/modules/block/block.install
@@ -184,7 +184,7 @@ function block_update_8005() {
  * Enable the Custom Block module.
  */
 function block_update_8006() {
-  Drupal::moduleHandler()->install(array('custom_block'));
+  \Drupal::moduleHandler()->install(array('custom_block'));
 }
 
 /**
diff --git a/core/modules/entity/entity.module b/core/modules/entity/entity.module
index f63ad4df5ed8c8aa248509c2d0c5ba5973dd3162..2749bcdd06014f347d7345eb24af67a5b36abbad 100644
--- a/core/modules/entity/entity.module
+++ b/core/modules/entity/entity.module
@@ -163,7 +163,7 @@ function entity_entity_bundle_delete($entity_type, $bundle) {
 function entity_module_preuninstall($module) {
   // Clean up all entity bundles (including field instances) of every entity
   // type provided by the module that is being uninstalled.
-  foreach (Drupal::entityManager()->getDefinitions() as $entity_type => $entity_info) {
+  foreach (\Drupal::entityManager()->getDefinitions() as $entity_type => $entity_info) {
     if ($entity_info['module'] == $module) {
       foreach (array_keys(entity_get_bundles($entity_type)) as $bundle) {
         entity_invoke_bundle_hook('delete', $entity_type, $bundle);
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index f7bf99ab2db9104e957b5b7d9175d9abae72f38b..6c43b692f729624eeb74f3f5fbee3c2ad00149e6 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -548,7 +548,7 @@ function forum_form_node_form_alter(&$form, &$form_state, $form_id) {
       // If there is no default forum already selected, try to get the forum
       // ID from the URL (e.g., if we are on a page like node/add/forum/2, we
       // expect "2" to be the ID of the forum that was requested).
-      $requested_forum_id = Drupal::request()->query->get('forum_id');
+      $requested_forum_id = \Drupal::request()->query->get('forum_id');
       $widget['#default_value'] = is_numeric($requested_forum_id) ? $requested_forum_id : '';
     }
   }
diff --git a/core/modules/menu/menu.install b/core/modules/menu/menu.install
index 4e0d03210fcd3f2fa11a51e5e479d4d10dd1f950..6974d683bcc11a2c584dacd62c3b5c4cc030c782 100644
--- a/core/modules/menu/menu.install
+++ b/core/modules/menu/menu.install
@@ -12,7 +12,7 @@
  */
 function menu_install() {
   // Add a link for each custom menu.
-  Drupal::service('router.builder')->rebuild();
+  \Drupal::service('router.builder')->rebuild();
   menu_router_rebuild();
   $system_link = entity_load_multiple_by_properties('menu_link', array('link_path' => 'admin/structure/menu', 'module' => 'system'));
   $system_link = reset($system_link);
@@ -30,7 +30,7 @@ function menu_install() {
     $link->link_title = $menu->label();
     $link->link_path = 'admin/structure/menu/manage/' . $menu->id();
 
-    $query = Drupal::entityQuery('menu_link')
+    $query = \Drupal::entityQuery('menu_link')
       ->condition('link_path', $link->link_path)
       ->condition('plid', $link->plid);
     $result = $query->execute();
diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module
index 42c64741ef72222666c248498b77adba107b65e6..1689d35bf0d794241c990ed1ebe1971bbab0e7b8 100644
--- a/core/modules/menu/menu.module
+++ b/core/modules/menu/menu.module
@@ -499,7 +499,7 @@ function menu_form_node_form_alter(&$form, $form_state) {
   $form['menu'] = array(
     '#type' => 'details',
     '#title' => t('Menu settings'),
-    '#access' => Drupal::currentUser()->hasPermission('administer menu'),
+    '#access' => \Drupal::currentUser()->hasPermission('administer menu'),
     '#collapsed' => !$link['link_title'],
     '#group' => 'advanced',
     '#attached' => array(
diff --git a/core/modules/node/node.install b/core/modules/node/node.install
index da610b435dac426ec2e4d18fd7e945fd779fbd5c..3f5c370d139151acd53cbb385167b0b8025f57d4 100644
--- a/core/modules/node/node.install
+++ b/core/modules/node/node.install
@@ -696,7 +696,7 @@ function node_update_8011() {
  */
 function node_update_8012() {
   // Enable the history module without re-installing the schema.
-  Drupal::moduleHandler()->install(array('history'));
+  \Drupal::moduleHandler()->install(array('history'));
 }
 
 /**
diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module
index f397285e4807732cd9e1c0196ec0f4cae5f778b2..a28ea38582e1cd4087e88b7ce6e795f50aad981b 100644
--- a/core/modules/statistics/statistics.module
+++ b/core/modules/statistics/statistics.module
@@ -58,7 +58,7 @@ function statistics_node_view(EntityInterface $node, EntityDisplay $display, $vi
   }
 
   if ($view_mode != 'rss') {
-    if (Drupal::currentUser()->hasPermission('view post access counter')) {
+    if (\Drupal::currentUser()->hasPermission('view post access counter')) {
       $statistics = statistics_get($node->id());
       if ($statistics) {
         $links['statistics_counter']['title'] = format_plural($statistics['totalcount'], '1 view', '@count views');
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 6c0d69fcb7b13fd7a59905adde4834957faba172..beaf2471915bc11f207fbbe440c6a9b6d05779cc 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -1550,7 +1550,7 @@ function system_update_8020() {
       ->condition('aid', 'system_block_ip_action')
       ->execute();
     // Enable the new Ban module.
-    Drupal::moduleHandler()->install(array('ban'));
+    \Drupal::moduleHandler()->install(array('ban'));
   }
   else {
     // Drop old table.
@@ -1563,7 +1563,7 @@ function system_update_8020() {
  */
 function system_update_8021() {
   // Enable the module without re-installing the schema.
-  Drupal::moduleHandler()->install(array('action'));
+  \Drupal::moduleHandler()->install(array('action'));
   // Rename former System module actions.
   $map = array(
     'system_message_action' => 'action_message_action',
@@ -1864,7 +1864,7 @@ function system_update_8041() {
  * Enable the new Entity module.
  */
 function system_update_8042() {
-  Drupal::moduleHandler()->install(array('entity'));
+  \Drupal::moduleHandler()->install(array('entity'));
 }
 
 /**
@@ -1978,7 +1978,7 @@ function system_update_8047() {
  */
 function system_update_8048() {
   // Enable the module without re-installing the schema.
-  Drupal::moduleHandler()->install(array('menu_link'));
+  \Drupal::moduleHandler()->install(array('menu_link'));
 
   // Add the langcode column if it doesn't exist.
   if (!db_field_exists('menu_inks', 'langcode')) {
diff --git a/core/modules/system/tests/modules/system_test/system_test.module b/core/modules/system/tests/modules/system_test/system_test.module
index 62176e1af1b7f032efd28fb20537c4836c57b8e7..56712b846a33b8f27568aa82ca882bd9efe8bdb6 100644
--- a/core/modules/system/tests/modules/system_test/system_test.module
+++ b/core/modules/system/tests/modules/system_test/system_test.module
@@ -263,12 +263,12 @@ function system_test_authorize_init_page($page_title) {
  * Implements hook_module_preinstall().
  */
 function system_test_module_preinstall($module) {
-  Drupal::state()->set('system_test_preinstall_module', $module);
+  \Drupal::state()->set('system_test_preinstall_module', $module);
 }
 
 /**
  * Implements hook_module_preuninstall().
  */
 function system_test_module_preuninstall($module) {
-  Drupal::state()->set('system_test_preuninstall_module', $module);
+  \Drupal::state()->set('system_test_preuninstall_module', $module);
 }
diff --git a/core/modules/toolbar/toolbar.install b/core/modules/toolbar/toolbar.install
index 4b03662d1151b7f76c74da3a1cff689653ca13a1..13e2d89b620b96e6e414fcd7b4546c0bde7fffbf 100644
--- a/core/modules/toolbar/toolbar.install
+++ b/core/modules/toolbar/toolbar.install
@@ -18,7 +18,7 @@
  */
 function toolbar_update_8000() {
   // Enable the modules without re-installing the schema.
-  Drupal::moduleHandler()->install(array('breakpoint'));
+  \Drupal::moduleHandler()->install(array('breakpoint'));
 }
 
 /**
diff --git a/core/modules/user/user.install b/core/modules/user/user.install
index 6abcfebf2a943947b99847d0e3f39f3e508eb6cd..8253ba6c5ce5f410abdb477b70a12dc9aa807b8b 100644
--- a/core/modules/user/user.install
+++ b/core/modules/user/user.install
@@ -614,7 +614,7 @@ function user_update_8011() {
   // User pictures can only be migrated to the new user picture image field
   // if Image module is installed.
   if (!module_exists('image')) {
-    $old_schema = Drupal::moduleHandler()->install(array('image'));
+    $old_schema = \Drupal::moduleHandler()->install(array('image'));
     if ($old_schema['image'] == SCHEMA_UNINSTALLED) {
       // Install image.module with schema version 8002 as a previous version
       // would have to create tables that would be removed again.
diff --git a/core/scripts/dump-database-d6.sh b/core/scripts/dump-database-d6.sh
index 89619ea7cb1ff5f98d71e15970d626ce43a3791a..ace93d9d34f60ecb27b39ced9c320f9724b2f2cd 100644
--- a/core/scripts/dump-database-d6.sh
+++ b/core/scripts/dump-database-d6.sh
@@ -44,7 +44,7 @@
 
 ENDOFHEADER;
 
-foreach (Drupal::moduleHandler()->getModuleList() as $module => $filename) {
+foreach (\Drupal::moduleHandler()->getModuleList() as $module => $filename) {
   $output .= " *  - $module\n";
 }
 $output .= " */\n\n";
diff --git a/core/scripts/dump-database-d7.sh b/core/scripts/dump-database-d7.sh
index c4a0752a5b81ed41a4f04e91e9ef7f6607bfc0b2..4689672cb3f2101ea63d49dc6effe6dd649861e2 100644
--- a/core/scripts/dump-database-d7.sh
+++ b/core/scripts/dump-database-d7.sh
@@ -45,7 +45,7 @@
 
 ENDOFHEADER;
 
-foreach (Drupal::moduleHandler()->getModuleList() as $module => $filename) {
+foreach (\Drupal::moduleHandler()->getModuleList() as $module => $filename) {
   $output .= " *  - $module\n";
 }
 $output .= " */\n\n";
diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme
index ed59e8d4782a9aa27aad4f5d57a1516b94e090bc..aafb0e74301c39ca4c96e3b72852e656a3fc1cf5 100644
--- a/core/themes/bartik/bartik.theme
+++ b/core/themes/bartik/bartik.theme
@@ -43,7 +43,7 @@ function bartik_preprocess_page(&$variables) {
     $variables['secondary_menu']['#attributes']['class'] = array('links', 'inline', 'clearfix');
   }
 
-  $site_config = Drupal::config('system.site');
+  $site_config = \Drupal::config('system.site');
   // Always print the site name and slogan, but if they are toggled off, we'll
   // just hide them visually.
   $variables['hide_site_name']   = theme_get_setting('features.name') ? FALSE : TRUE;
@@ -87,7 +87,7 @@ function bartik_preprocess_maintenance_page(&$variables) {
   drupal_add_css(drupal_get_path('theme', 'bartik') . '/css/maintenance-page.css');
   $variables['styles'] = drupal_get_css();
 
-  $site_config = Drupal::config('system.site');
+  $site_config = \Drupal::config('system.site');
   // Always print the site name and slogan, but if they are toggled off, we'll
   // just hide them visually.
   $variables['hide_site_name']   = theme_get_setting('features.name') ? FALSE : TRUE;
diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme
index bfc87e22ba15b269859e03b508254f21af311656..819db34eecf285c12ddfb8327b48d0dfe5304805 100644
--- a/core/themes/seven/seven.theme
+++ b/core/themes/seven/seven.theme
@@ -14,7 +14,7 @@ function seven_library_info() {
   $path = drupal_get_path('theme', 'seven');
 
   $libraries['install-page'] = array(
-    'version' => Drupal::VERSION,
+    'version' => \Drupal::VERSION,
     'js' => array(
       $path . '/js/mobile.install.js' => array(
         'group' => JS_THEME,
@@ -99,7 +99,7 @@ function seven_custom_block_add_list($variables) {
       $content .= '<div class="description">' . filter_xss_admin($type['description']) . '</div>';
       $options = $type['localized_options'];
       $options['html'] = TRUE;
-      $output .= Drupal::l($content, 'custom_block.add_form', array('custom_block_type' => $id), $options);
+      $output .= \Drupal::l($content, 'custom_block.add_form', array('custom_block_type' => $id), $options);
       $output .= '</li>';
     }
     $output .= '</ul>';