diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index d94ec3b..4757180 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -5,6 +5,7 @@
  * Controls the visual building blocks a page is constructed with.
  */
 
+use Drupal;
 use Drupal\Component\Plugin\Exception\PluginException;
 
 /**
@@ -158,7 +159,7 @@ function block_menu() {
   //   hook_menu_local_tasks() to check for the untranslated tab_parent path.
   // @see http://drupal.org/node/1067408
   $themes = list_themes();
-  foreach (drupal_container()->get('plugin.manager.system.plugin_ui')->getDefinitions() as $plugin_id => $plugin) {
+  foreach (Drupal::service('plugin.manager.system.plugin_ui')->getDefinitions() as $plugin_id => $plugin ) {
     list($plugin_base, $key) = explode(':', $plugin_id);
     if ($plugin_base == 'block_plugin_ui') {
       $theme = $themes[$key];
diff --git a/core/modules/block/custom_block/custom_block.pages.inc b/core/modules/block/custom_block/custom_block.pages.inc
index 9c802c4..d237a8d 100644
--- a/core/modules/block/custom_block/custom_block.pages.inc
+++ b/core/modules/block/custom_block/custom_block.pages.inc
@@ -5,6 +5,7 @@
  * Provides page callbacks for custom blocks.
  */
 
+use Drupal;
 use Drupal\custom_block\Plugin\Core\Entity\CustomBlockType;
 use Drupal\custom_block\Plugin\Core\Entity\CustomBlock;
 use Symfony\Component\HttpFoundation\RedirectResponse;
@@ -55,7 +56,7 @@ function custom_block_add(CustomBlockType $block_type) {
     'type' => $block_type->id()
   ));
   $options = array();
-  $request = drupal_container()->get('request');
+  $request = Drupal::service('request');
   if (($theme = $request->attributes->get('theme')) && in_array($theme, array_keys(list_themes()))) {
     // We have navigated to this page from the block library and will keep track
     // of the theme for redirecting the user to the configuration page for the
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockStorageController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockStorageController.php
index 87ff2d5..4457cf1 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockStorageController.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockStorageController.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\custom_block;
 
+use Drupal;
 use Drupal\Core\Entity\DatabaseStorageControllerNG;
 use Drupal\Core\Entity\EntityInterface;
 
@@ -69,7 +70,7 @@ protected function attachLoad(&$blocks, $load_revision = FALSE) {
    */
   protected function postSave(EntityInterface $block, $update) {
     // Invalidate the block cache to update custom block-based derivatives.
-    drupal_container()->get('plugin.manager.block')->clearCachedDefinitions();
+    Drupal::service('plugin.manager.block')->clearCachedDefinitions();
   }
 
   /**
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
index 01b11ba..1f3b7a9 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\custom_block\Plugin\Block;
 
+use Drupal;
 use Drupal\block\BlockBase;
 use Drupal\Component\Annotation\Plugin;
 use Drupal\Core\Annotation\Translation;
@@ -61,8 +62,8 @@ public function blockForm($form, &$form_state) {
    */
   public function blockSubmit($form, &$form_state) {
     // Invalidate the block cache to update custom block-based derivatives.
-    if (module_exists('block')) {
-      drupal_container()->get('plugin.manager.block')->clearCachedDefinitions();
+    if (Drupal::moduleManager()->moduleExists('block')) {
+      Drupal::service('plugin.manager.block')->clearCachedDefinitions();
     }
   }
 
diff --git a/core/modules/block/lib/Drupal/block/BlockAccessController.php b/core/modules/block/lib/Drupal/block/BlockAccessController.php
index 693fb32..67f0d7a 100644
--- a/core/modules/block/lib/Drupal/block/BlockAccessController.php
+++ b/core/modules/block/lib/Drupal/block/BlockAccessController.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\block;
 
+use Drupal;
 use Drupal\Core\Entity\EntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\user\Plugin\Core\Entity\User;
@@ -65,7 +66,7 @@ protected function checkAccess(EntityInterface $entity, $operation, $langcode, U
       if ($visibility['path']['visibility'] < BLOCK_VISIBILITY_PHP) {
         // Compare the lowercase path alias (if any) and internal path.
         $path = current_path();
-        $path_alias = drupal_strtolower(drupal_container()->get('path.alias_manager')->getPathAlias($path));
+        $path_alias = drupal_strtolower(Drupal::service('path.alias_manager')->getPathAlias($path));
         $page_match = drupal_match_path($path_alias, $pages) || (($path != $path_alias) && drupal_match_path($path, $pages));
         // When $block->visibility has a value of 0
         // (BLOCK_VISIBILITY_NOTLISTED), the block is displayed on all pages
diff --git a/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php b/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php
index 3c8b14c..605a77e 100644
--- a/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php
+++ b/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\block\Plugin\Core\Entity;
 
+use Drupal;
 use Drupal\Core\Config\Entity\ConfigEntityBase;
 use Drupal\Core\Entity\Annotation\EntityType;
 use Drupal\Core\Annotation\Translation;
diff --git a/core/modules/block/lib/Drupal/block/Plugin/PluginUI/BlockPluginUI.php b/core/modules/block/lib/Drupal/block/Plugin/PluginUI/BlockPluginUI.php
index cda4836..b9fc77c 100644
--- a/core/modules/block/lib/Drupal/block/Plugin/PluginUI/BlockPluginUI.php
+++ b/core/modules/block/lib/Drupal/block/Plugin/PluginUI/BlockPluginUI.php
@@ -6,6 +6,7 @@
 
 namespace Drupal\block\Plugin\PluginUI;
 
+use Drupal;
 use Drupal\system\Plugin\PluginUIBase;
 use Drupal\Component\Annotation\Plugin;
 use Drupal\Core\Annotation\Translation;
@@ -46,8 +47,8 @@ public function form($form, &$form_state, $facet = NULL) {
     // @todo Add an inline comment here.
     list($plugin, $theme) = explode(':', $this->getPluginId());
     $plugin_definition = $this->getDefinition();
-    // @todo Find out how to let the manager be injected into the class.
-    $manager = drupal_container()->get($plugin_definition['manager']);
+    // @todo Find out how to let the manager be injected into the class.]
+    $manager = Drupal::service($plugin_definition['manager']);
     $plugins = $manager->getDefinitions();
     $form['#theme'] = 'system_plugin_ui_form';
     $form['theme'] = array(
