diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 9dd3f56..545eed4 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -758,10 +758,10 @@ function drupal_get_filename($type, $name, $filename = NULL) {
     // Verify that we have an keyvalue service before using it. This is required
     // because this function is called during installation.
     // @todo Inject database connection into KeyValueStore\DatabaseStorage.
-    if (($container = drupal_container()) && $container->has('keyvalue') && function_exists('db_query')) {
+    if (($container = Drupal::getContainer()) && $container->has('keyvalue') && function_exists('db_query')) {
       if ($type == 'module') {
         if (empty($files[$type])) {
-          $files[$type] = drupal_container()->get('module_handler')->getModuleList();
+          $files[$type] = Drupal::moduleHandler()->getModuleList();
         }
         if (isset($files[$type][$name])) {
           return $files[$type][$name];
@@ -1009,7 +1009,7 @@ function drupal_page_is_cacheable($allow_caching = NULL) {
  * @see bootstrap_hooks()
  */
 function bootstrap_invoke_all($hook) {
-  $module_handler = drupal_container()->get('module_handler');
+  $module_handler = Drupal::service('module_handler');
   foreach ($module_handler->getBootstrapModules() as $module) {
     $module_handler->load($module);
     module_invoke($module, $hook);
@@ -1030,8 +1030,8 @@ function bootstrap_invoke_all($hook) {
  *   TRUE if the item is loaded or has already been loaded.
  */
 function drupal_load($type, $name) {
-  if ($type == 'module' && drupal_container()->get('module_handler')->moduleExists($name)) {
-    return drupal_container()->get('module_handler')->load($name);
+  if ($type == 'module' && Drupal::service('module_handler')->moduleExists($name)) {
+    return Drupal::service('module_handler')->load($name);
   }
 
   // Once a file is included this can't be reversed during a request so do not
@@ -2037,9 +2037,9 @@ function _drupal_bootstrap_configuration() {
  * Initialize the kernel / service container.
  */
 function _drupal_bootstrap_kernel() {
-  // Normally, index.php puts a container in drupal_container() by creating a
+  // Normally, index.php puts a container in the Drupal class by creating a
   // kernel. If there is no container yet, create one.
-  if (!drupal_container()) {
+  if (!Drupal::getContainer()) {
     $kernel = new DrupalKernel('prod', FALSE, drupal_classloader());
     $kernel->boot();
   }
@@ -2143,7 +2143,7 @@ function _drupal_bootstrap_variables() {
   $conf = variable_initialize(isset($conf) ? $conf : array());
   // Load bootstrap modules.
   require_once __DIR__ . '/module.inc';
-  drupal_container()->get('module_handler')->loadBootstrapModules();
+  Drupal::moduleHandler()->loadBootstrapModules();
 }
 
 /**
@@ -2175,12 +2175,12 @@ function drupal_container() {
  * Returns the list of enabled modules.
  *
  * @deprecated as of Drupal 8.0. Use
- *   drupal_container()->get('module_handler')->getModuleList().
+ *   Drupal::moduleHandler()->getModuleList().
  *
  * @see \Drupal\Core\Extension\ModuleHandler::getModuleList()
  */
 function module_list() {
-  $modules = array_keys(drupal_container()->get('module_handler')->getModuleList());
+  $modules = array_keys(Drupal::moduleHandler()->getModuleList());
   return array_combine($modules, $modules);
 }
 
@@ -2188,12 +2188,12 @@ function module_list() {
  * Determines which modules are implementing a hook.
  *
  * @deprecated as of Drupal 8.0. Use
- *   drupal_container()->get('module_handler')->getImplementations($hook).
+ *   Drupal::moduleHandler()->getImplementations($hook).
  *
  * @see \Drupal\Core\Extension\ModuleHandler::getImplementations()
  */
 function module_implements($hook) {
-  return drupal_container()->get('module_handler')->getImplementations($hook);
+  return Drupal::moduleHandler()->getImplementations($hook);
 }
 
 /**
@@ -2203,7 +2203,7 @@ function module_implements($hook) {
  * arguments by reference.
  *
  * @deprecated as of Drupal 8.0. Use
- *   drupal_container()->get('module_handler')->invoke($module, $hook, $args = array()).
+ *   Drupal::moduleHandler()->invoke($module, $hook, $args = array()).
  *
  * @see drupal_alter()
  * @see \Drupal\Core\Extension\ModuleHandler::invoke()
@@ -2212,7 +2212,7 @@ function module_invoke($module, $hook) {
   $args = func_get_args();
   // Remove $module and $hook from the arguments.
   unset($args[0], $args[1]);
-  return drupal_container()->get('module_handler')->invoke($module, $hook, $args);
+  return Drupal::moduleHandler()->invoke($module, $hook, $args);
 }
 
 /**
@@ -2222,7 +2222,7 @@ function module_invoke($module, $hook) {
  * arguments by reference.
  *
  * @deprecated as of Drupal 8.0. Use
- *   drupal_container()->get('module_handler')->invokeAll($hook).
+ *   Drupal::moduleHandler()->invokeAll($hook).
  *
  * @see drupal_alter()
  * @see \Drupal\Core\Extension\ModuleHandler::invokeAll()
@@ -2231,43 +2231,43 @@ function module_invoke_all($hook) {
   $args = func_get_args();
   // Remove $hook from the arguments.
   array_shift($args);
-  return drupal_container()->get('module_handler')->invokeAll($hook, $args);
+  return Drupal::moduleHandler()->invokeAll($hook, $args);
 }
 
 /**
  * Passes alterable variables to specific hook_TYPE_alter() implementations.
  *
  * @deprecated as of Drupal 8.0. Use
- *   drupal_container()->get('module_handler')->alter($hook).
+ *   Drupal::moduleHandler()->alter($hook).
  *
  * @see \Drupal\Core\Extension\ModuleHandler::alter()
  */
 function drupal_alter($type, &$data, &$context1 = NULL, &$context2 = NULL) {
-  return drupal_container()->get('module_handler')->alter($type, $data, $context1, $context2);
+  return Drupal::moduleHandler()->alter($type, $data, $context1, $context2);
 }
 
 /**
  * Determines whether a given module exists.
  *
  * @deprecated as of Drupal 8.0. Use
- *   drupal_container()->get('module_handler')->moduleExists($hook).
+ *   Drupal::moduleHandler()->moduleExists($hook).
  *
  * @see \Drupal\Core\Extension\ModuleHandler::moduleExists()
  */
 function module_exists($module) {
-  return drupal_container()->get('module_handler')->moduleExists($module);
+  return Drupal::moduleHandler()->moduleExists($module);
 }
 
 /**
  * Determines whether a module implements a hook.
  *
  * @deprecated as of Drupal 8.0. Use
- *   drupal_container()->get('module_handler')->implementsHook($module, $hook).
+ *   Drupal::moduleHandler()->implementsHook($module, $hook).
  *
  * @see \Drupal\Core\Extension\ModuleHandler::implementsHook()
  */
 function module_hook($module, $hook) {
-  return drupal_container()->get('module_handler')->implementsHook($module, $hook);
+  return Drupal::moduleHandler()->implementsHook($module, $hook);
 }
 
 /**
@@ -2282,7 +2282,7 @@ function module_hook($module, $hook) {
  * @return Drupal\Core\KeyValueStore\KeyValueStoreInterface
  */
 function state() {
-  return drupal_container()->get('keyvalue')->get('state');
+  return Drupal::keyValue('state');
 }
 
 /**
@@ -2454,7 +2454,7 @@ function get_t() {
  * @see language()
  */
 function drupal_language_initialize() {
-  drupal_container()->get('language_manager')->init();
+  Drupal::service('language_manager')->init();
 }
 
 /**
@@ -2466,7 +2466,7 @@ function drupal_language_initialize() {
  *   The type of language object needed, e.g. Language::TYPE_INTERFACE.
  */
 function language($type) {
-  $container = drupal_container();
+  $container = Drupal::getContainer();
   if (!$container) {
     return language_default();
   }
