diff --git a/core/core.services.yml b/core/core.services.yml
index c158be4..50b4002 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -148,7 +148,7 @@ services:
     class: Drupal\Core\Path\AliasWhitelist
     tags:
       - { name: needs_destruction }
-    arguments: [path_alias_whitelist, '@cache.cache', '@lock', '@state', '@database']
+    arguments: [path_alias_whitelist, '@cache.cache', '@lock', '@state', '@path.crud']
   path.alias_manager:
     class: Drupal\Core\Path\AliasManager
     arguments: ['@path.crud', '@path.alias_whitelist', '@language_manager']
diff --git a/core/includes/batch.inc b/core/includes/batch.inc
index 0366c10..d78248d 100644
--- a/core/includes/batch.inc
+++ b/core/includes/batch.inc
@@ -47,38 +47,42 @@ function _batch_page(Request $request) {
   // Register database update for the end of processing.
   drupal_register_shutdown_function('_batch_shutdown');
 
-  $build = array();
-
   // Add batch-specific CSS.
+  $attached = array('#attached' => array('css' => array()));
   foreach ($batch['sets'] as $batch_set) {
     if (isset($batch_set['css'])) {
       foreach ($batch_set['css'] as $css) {
-        $build['#attached']['css'][$css] = array();
+        $attached['#attached']['css'][$css] = array();
       }
     }
   }
+  drupal_render($attached);
 
   $op = $request->get('op', '');
+  $output = NULL;
   switch ($op) {
     case 'start':
-    case 'do_nojs':
       // Display the full progress page on startup and on each additional
       // non-JavaScript iteration.
-      $current_set = _batch_current_set();
-      $build['#title'] = $current_set['title'];
-      $build['content'] = _batch_progress_page();
+      $output = _batch_progress_page();
       break;
 
     case 'do':
       // JavaScript-based progress page callback.
-      return _batch_do();
+      $output = _batch_do();
+      break;
+
+    case 'do_nojs':
+      // Non-JavaScript-based progress page.
+      $output = _batch_progress_page();
+      break;
 
     case 'finished':
-      // _batch_finished() returns a RedirectResponse.
-      return _batch_finished();
+      $output = _batch_finished();
+      break;
   }
 
-  return $build;
+  return $output;
 }
 
 /**
@@ -103,6 +107,7 @@ function _batch_progress_page() {
   $batch = &batch_get();
 
   $current_set = _batch_current_set();
+  drupal_set_title($current_set['title'], PASS_THROUGH);
 
   $new_op = 'do_nojs';
 
@@ -123,7 +128,6 @@ function _batch_progress_page() {
     $fallback = $current_set['error_message'] . '<br />' . $batch['error_message'];
     $fallback = array(
       '#theme' => 'maintenance_page',
-      '#title' => $current_set['title'],
       '#content' => $fallback,
       '#show_messages' => FALSE,
     );
@@ -191,7 +195,7 @@ function _batch_progress_page() {
       ),
     ),
   );
-  return $build;
+  return drupal_render($build);
 }
 
 /**
diff --git a/core/includes/errors.inc b/core/includes/errors.inc
index 56c276f..761b7bd 100644
--- a/core/includes/errors.inc
+++ b/core/includes/errors.inc
@@ -218,22 +218,19 @@ function _drupal_log_error($error, $fatal = FALSE) {
     }
 
     if ($fatal) {
+      // Should not translate the string to avoid errors producing more errors.
+      drupal_set_title('Error');
       // We fallback to a maintenance page at this point, because the page generation
       // itself can generate errors.
       // Should not translate the string to avoid errors producing more errors.
       $message = 'The website has encountered an error. Please try again later.';
       if ($is_installer) {
         // install_display_output() prints the output and ends script execution.
-        $output = array(
-          '#title' => 'Error',
-          '#markup' => $message,
-        );
-        install_display_output($output, $GLOBALS['install_state']);
+        install_display_output($message, $GLOBALS['install_state']);
       }
       else {
         $output = array(
           '#theme' => 'maintenance_page',
-          '#title' => 'Error',
           '#content' => $message,
         );
         $output = drupal_render($output);
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 7ae1360..8d08d94 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -10,9 +10,6 @@
 use Drupal\Core\Database\Database;
 use Drupal\Core\Database\DatabaseExceptionWrapper;
 use Drupal\Core\Database\Install\TaskException;
-use Drupal\Core\Installer\Exception\AlreadyInstalledException;
-use Drupal\Core\Installer\Exception\InstallerException;
-use Drupal\Core\Installer\Exception\NoProfilesException;
 use Drupal\Core\Language\Language;
 use Drupal\Core\Language\LanguageManager;
 use Drupal\Core\StringTranslation\Translator\FileTranslation;
@@ -92,24 +89,12 @@ function install_drupal($settings = array()) {
   $interactive = empty($settings);
   $install_state = $settings + array('interactive' => $interactive) + install_state_defaults();
 
-  try {
-    // Begin the page request. This adds information about the current state of
-    // the Drupal installation to the passed-in array.
-    install_begin_request($install_state);
-    // Based on the installation state, run the remaining tasks for this page
-    // request, and collect any output.
-    $output = install_run_tasks($install_state);
-  }
-  catch (InstallerException $e) {
-    // In the non-interactive installer, exceptions are always thrown directly.
-    if (!$install_state['interactive']) {
-      throw $e;
-    }
-    $output = array(
-      '#title' => $e->getTitle(),
-      '#markup' => $e->getMessage(),
-    );
-  }
+  // Begin the page request. This adds information about the current state of
+  // the Drupal installation to the passed-in array.
+  install_begin_request($install_state);
+  // Based on the installation state, run the remaining tasks for this page
+  // request, and collect any output.
+  $output = install_run_tasks($install_state);
 
   // After execution, all tasks might be complete, in which case
   // $install_state['installation_finished'] is TRUE. In case the last task
@@ -541,7 +526,7 @@ function install_begin_request(&$install_state) {
 
     // Do not install over a configured settings.php.
     if (!empty($GLOBALS['databases'])) {
-      throw new AlreadyInstalledException($container->get('string_translation'));
+      throw new Exception(install_already_done_error());
     }
   }
 
@@ -551,7 +536,7 @@ function install_begin_request(&$install_state) {
     $config = glob(config_get_config_directory(CONFIG_ACTIVE_DIRECTORY) . '/*.' . FileStorage::getFileExtension());
     if (!empty($config)) {
       $task = NULL;
-      throw new AlreadyInstalledException($container->get('string_translation'));
+      throw new Exception(install_already_done_error());
     }
   }
 
@@ -642,7 +627,7 @@ function install_run_task($task, &$install_state) {
       // rendered, which means the task is not complete yet.
       if (empty($form_state['executed'])) {
         $install_state['task_not_complete'] = TRUE;
-        return $form;
+        return drupal_render($form);
       }
       // Otherwise, return nothing so the next task will run in the same
       // request.
@@ -662,7 +647,7 @@ function install_run_task($task, &$install_state) {
       drupal_form_submit($function, $form_state);
       $errors = form_get_errors($form_state);
       if (!empty($errors)) {
-        throw new InstallerException(implode("\n", $errors));
+        throw new Exception(implode("\n", $errors));
       }
     }
   }
@@ -969,7 +954,7 @@ function install_full_redirect_url($install_state) {
 /**
  * Displays themed installer output and ends the page request.
  *
- * Installation tasks should use #title to set the desired page
+ * Installation tasks should use drupal_set_title() to set the desired page
  * title, but otherwise this function takes care of theming the overall page
  * output during every step of the installation.
  *
@@ -1015,17 +1000,7 @@ function install_display_output($output, $install_state) {
     );
     drupal_add_region_content('sidebar_first', drupal_render($task_list));
   }
-  $install_page = array(
-    '#theme' => 'install_page',
-    // $output has to be rendered here, because the install page template is not
-    // wrapped into the html template, which means that any #attached libraries
-    // in $output will not be loaded, because the wrapping HTML has been printed
-    // already.
-    '#content' => drupal_render($output),
-  );
-  if (isset($output['#title'])) {
-    $install_page['#page']['#title'] = $output['#title'];
-  }
+  $install_page = array('#theme' => 'install_page', '#content' => $output);
   print drupal_render($install_page);
   exit;
 }
@@ -1097,11 +1072,11 @@ function install_verify_completed_task() {
   }
   // Do not trigger an error if the database query fails, since the database
   // might not be set up yet.
-  catch (\Exception $e) {
+  catch (Exception $e) {
   }
   if (isset($task)) {
     if ($task == 'done') {
-      throw new AlreadyInstalledException(\Drupal::service('string_translation'));
+      throw new Exception(install_already_done_error());
     }
     return $task;
   }
@@ -1139,7 +1114,7 @@ function install_settings_form($form, &$form_state, &$install_state) {
   $conf_path = './' . conf_path(FALSE);
   $settings_file = $conf_path . '/settings.php';
 
-  $form['#title'] = t('Database configuration');
+  drupal_set_title(t('Database configuration'));
 
   $drivers = drupal_get_database_types();
   $drivers_keys = array_keys($drivers);
@@ -1330,21 +1305,26 @@ function install_settings_form_submit($form, &$form_state) {
  */
 function install_select_profile(&$install_state) {
   if (empty($install_state['parameters']['profile'])) {
-    // If there are no profiles at all, installation cannot proceed.
-    if (empty($install_state['profiles'])) {
-      throw new NoProfilesException(\Drupal::service('string_translation'));
-    }
-    // Try to automatically select a profile.
-    if ($profile = _install_select_profile($install_state['profiles'])) {
-      $install_state['parameters']['profile'] = $profile;
+    // Try to find a profile.
+    $profile = _install_select_profile($install_state['profiles']);
+    if (empty($profile)) {
+      // We still don't have a profile, so display a form for selecting one.
+      // Only do this in the case of interactive installations, since this is
+      // not a real form with submit handlers (the database isn't even set up
+      // yet), rather just a convenience method for setting parameters in the
+      // URL.
+      if ($install_state['interactive']) {
+        include_once __DIR__ . '/form.inc';
+        drupal_set_title(t('Select an installation profile'));
+        $form = drupal_get_form('install_select_profile_form', $install_state);
+        return drupal_render($form);
+      }
+      else {
+        throw new Exception(install_no_profile_error());
+      }
     }
     else {
-      // The non-interactive installer requires a profile parameter.
-      if (!$install_state['interactive']) {
-        throw new InstallerException(t('Missing profile parameter.'));
-      }
-      // Otherwise, display a form to select a profile.
-      return drupal_get_form('install_select_profile_form', $install_state);
+      $install_state['parameters']['profile'] = $profile;
     }
   }
 }
@@ -1404,10 +1384,9 @@ function _install_select_profile($profiles) {
  * @ingroup forms
  */
 function install_select_profile_form($form, &$form_state, $install_state) {
-  $form['#title'] = t('Select an installation profile');
-
   $profiles = array();
   $names = array();
+
   foreach ($install_state['profiles'] as $profile) {
     $details = install_profile_info($profile->name);
     // Skip this extension if its type is not profile.
@@ -1581,7 +1560,10 @@ function install_select_language(&$install_state) {
     // translation files were found the form shows a select list of the
     // corresponding languages to choose from.
     if ($install_state['interactive']) {
-      return drupal_get_form('install_select_language_form', count($files) > 1 ? $files : array());
+      drupal_set_title(t('Choose language'));
+      include_once __DIR__ . '/form.inc';
+      $elements = drupal_get_form('install_select_language_form', count($files) > 1 ? $files : array());
+      return drupal_render($elements);
     }
     // If we are performing a non-interactive installation. If only one language
     // (English) is available, assume the user knows what he is doing. Otherwise
@@ -1592,7 +1574,7 @@ function install_select_language(&$install_state) {
         return;
       }
       else {
-        throw new InstallerException(t('Sorry, you must select a language to continue the installation.'));
+        throw new Exception(t('Sorry, you must select a language to continue the installation.'));
       }
     }
   }
@@ -1613,8 +1595,6 @@ function install_select_language_form($form, &$form_state, $files = array()) {
   $select_options = array();
   $browser_options = array();
 
-  $form['#title'] = t('Choose language');
-
   // Build a select list with language names in native language for the user
   // to choose from. And build a list of available languages for the browser
   // to select the language default from.
@@ -1893,6 +1873,24 @@ function _install_get_version_info($version) {
 }
 
 /**
+ * Indicates that there are no profiles available.
+ */
+function install_no_profile_error() {
+  drupal_set_title(t('No profiles available'));
+  return t('We were unable to find any installation profiles. Installation profiles tell us what modules to enable and what schema to install in the database. A profile is necessary to continue with the installation process.');
+}
+
+/**
+ * Indicates that Drupal has already been installed.
+ */
+function install_already_done_error() {
+  global $base_url;
+
+  drupal_set_title(t('Drupal already installed'));
+  return t('<ul><li>To start over, you must empty your existing database, delete your active configuration, and copy <em>default.settings.php</em> over <em>settings.php</em>.</li><li>To install to a different database, edit the appropriate <em>settings.php</em> file in the <em>sites</em> folder.</li><li>To locate your active configuration, view the appropriate <em>settings.php</em> file in the <em>sites</em> folder.</li><li>To upgrade an existing installation, proceed to the <a href="@base-url/core/update.php">update script</a>.</li><li>View your <a href="@base-url">existing site</a>.</li></ul>', array('@base-url' => $base_url));
+}
+
+/**
  * Loads information about the chosen profile during installation.
  *
  * @param $install_state
@@ -1908,7 +1906,7 @@ function install_load_profile(&$install_state) {
     $install_state['profile_info'] = install_profile_info($install_state['parameters']['profile'], $install_state['parameters']['langcode']);
   }
   else {
-    throw new InstallerException(t('Sorry, the profile you have chosen cannot be loaded.'));
+    throw new Exception(t('Sorry, the profile you have chosen cannot be loaded.'));
   }
 }
 
@@ -2074,7 +2072,7 @@ function _install_prepare_import($langcode) {
  * @ingroup forms
  */
 function install_configure_form($form, &$form_state, &$install_state) {
-  $form['#title'] = t('Configure site');
+  drupal_set_title(t('Configure site'));
 
   // Warn about settings.php permissions risk
   $settings_dir = conf_path();
@@ -2176,6 +2174,8 @@ function install_finished(&$install_state) {
   // registered by the installation profile are registered correctly.
   drupal_flush_all_caches();
 
+  drupal_set_title(t('@drupal installation complete', array('@drupal' => drupal_install_profile_distribution_name())), PASS_THROUGH);
+
   $messages = drupal_set_message();
   $output = '<p>' . t('Congratulations, you installed @drupal!', array('@drupal' => drupal_install_profile_distribution_name())) . '</p>';
   // Ensure the URL that is generated for the home page does not have 'install.php'
@@ -2197,11 +2197,7 @@ function install_finished(&$install_state) {
   $snapshot = \Drupal::service('config.storage.snapshot');
   \Drupal::service('config.manager')->createSnapshot($active, $snapshot);
 
-  $build = array(
-    '#title' => t('@drupal installation complete', array('@drupal' => drupal_install_profile_distribution_name())),
-    '#markup' => $output,
-  );
-  return $build;
+  return $output;
 }
 
 /**
@@ -2529,7 +2525,7 @@ function install_check_requirements($install_state) {
  *   in the URL. Otherwise, no output is returned, so that the next task can be
  *   run in the same page request.
  *
- * @throws \Drupal\Core\Installer\Exception\InstallerException
+ * @thows \Exception
  */
 function install_display_requirements($install_state, $requirements) {
   // Check the severity of the requirements reported.
@@ -2540,13 +2536,14 @@ function install_display_requirements($install_state, $requirements) {
   // and indicating a desire to continue anyway. See drupal_requirements_url().
   if ($severity == REQUIREMENT_ERROR || ($severity == REQUIREMENT_WARNING && empty($install_state['parameters']['continue']))) {
     if ($install_state['interactive']) {
-      $build['#title'] = t('Requirements problem');
-      $build['report'] = array(
+      drupal_set_title(t('Requirements problem'));
+      $status_report = array(
         '#theme' => 'status_report',
         '#requirements' => $requirements,
-        '#suffix' => t('Check the messages and <a href="!url">try again</a>.', array('!url' => check_url(drupal_requirements_url($severity)))),
       );
-      return $build;
+      $status_report = drupal_render($status_report);
+      $status_report .= t('Check the messages and <a href="!url">try again</a>.', array('!url' => check_url(drupal_requirements_url($severity))));
+      return $status_report;
     }
     else {
       // Throw an exception showing any unmet requirements.
@@ -2560,7 +2557,7 @@ function install_display_requirements($install_state, $requirements) {
         }
       }
       if (!empty($failures)) {
-        throw new InstallerException(implode("\n\n", $failures));
+        throw new \Exception(implode("\n\n", $failures));
       }
     }
   }
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 435b9da..1526113 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2120,6 +2120,9 @@ function template_preprocess_html(&$variables) {
  * Uses the arg() function to generate a series of page template suggestions
  * based on the current path.
  *
+ * Any changes to variables in this preprocessor should also be changed inside
+ * template_preprocess_maintenance_page() to keep all of them consistent.
+ *
  * @see drupal_render_page()
  */
 function template_preprocess_page(&$variables) {
@@ -2374,12 +2377,19 @@ function template_preprocess_maintenance_page(&$variables) {
 
   $variables['head_title_array']  = $head_title;
   $variables['head_title']        = implode(' | ', $head_title);
+  $variables['base_path']         = base_path();
   $variables['front_page']        = url();
+  $variables['breadcrumb']        = '';
+  $variables['feed_icons']        = '';
   $variables['help']              = '';
   $variables['language']          = $language_interface;
+  $variables['language']->dir     = $language_interface->direction ? 'rtl' : 'ltr';
   $variables['logo']              = theme_get_setting('logo.url');
+  $variables['main_menu']         = array();
+  $variables['secondary_menu']    = array();
   $variables['site_name']         = (theme_get_setting('features.name') ? String::checkPlain($site_name) : '');
   $variables['site_slogan']       = (theme_get_setting('features.slogan') ? filter_xss_admin($site_slogan) : '');
+  $variables['tabs']              = '';
 
   // Compile a list of classes that are going to be applied to the body element.
   $variables['attributes']['class'][] = 'maintenance-page';
@@ -2437,7 +2447,6 @@ function template_preprocess_maintenance_page(&$variables) {
  */
 function template_preprocess_install_page(&$variables) {
   template_preprocess_maintenance_page($variables);
-  $variables['attributes']['class'][] = 'install-page';
   // Override the site name that is displayed on the page, since Drupal is
   // still in the process of being installed.
   $variables['site_name'] = drupal_install_profile_distribution_name();
@@ -2552,7 +2561,7 @@ function drupal_common_theme() {
       'template' => 'maintenance-page',
     ),
     'install_page' => array(
-      'variables' => array('content' => NULL, 'show_messages' => TRUE, 'page' => array()),
+      'variables' => array('content' => NULL, 'show_messages' => TRUE),
       'template' => 'install-page',
     ),
     'task_list' => array(
diff --git a/core/includes/update.inc b/core/includes/update.inc
index 0bca244..fc1e0af 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc
@@ -147,6 +147,7 @@ function update_check_requirements($skip_warnings = FALSE) {
   // them if the caller has indicated they should be skipped.
   if ($severity == REQUIREMENT_ERROR || ($severity == REQUIREMENT_WARNING && !$skip_warnings)) {
     update_task_list('requirements');
+    drupal_set_title('Requirements problem');
     $status = array(
       '#theme' => 'status_report',
       '#requirements' => $requirements,
@@ -156,7 +157,6 @@ function update_check_requirements($skip_warnings = FALSE) {
     drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
     $maintenance_page = array(
       '#theme' => 'maintenance_page',
-      '#title' => 'Requirements problem',
       '#content' => $status_report,
     );
     print drupal_render($maintenance_page);
diff --git a/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php
index 93bfb42..39aad11 100644
--- a/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php
@@ -44,9 +44,9 @@ public function onKernelRequestMaintenance(GetResponseEvent $event) {
     if ($request->attributes->get('_maintenance') != MENU_SITE_ONLINE && !($response instanceof RedirectResponse)) {
       // Deliver the 503 page.
       drupal_maintenance_theme();
+      drupal_set_title(t('Site under maintenance'));
       $maintenance_page = array(
         '#theme' => 'maintenance_page',
-        '#title' => t('Site under maintenance'),
         '#content' => filter_xss_admin(
           t(\Drupal::config('system.maintenance')->get('message'), array('@site' => \Drupal::config('system.site')->get('name')))
         ),
diff --git a/core/lib/Drupal/Core/Field/FormatterBase.php b/core/lib/Drupal/Core/Field/FormatterBase.php
index 1b4287f..35bbf33 100644
--- a/core/lib/Drupal/Core/Field/FormatterBase.php
+++ b/core/lib/Drupal/Core/Field/FormatterBase.php
@@ -106,7 +106,7 @@ public function view(FieldItemListInterface $items) {
         }
       }
 
-      $addition = array_merge($info, $elements);
+      $addition[$field_name] = array_merge($info, $elements);
     }
 
     return $addition;
diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php
index 7c27fff..93fc622 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php
+++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php
@@ -18,9 +18,7 @@
  *   id = "email",
  *   label = @Translation("E-mail"),
  *   description = @Translation("An entity field containing an e-mail value."),
- *   configurable = FALSE,
- *   default_widget = "string",
- *   default_formatter = "string"
+ *   configurable = FALSE
  * )
  */
 class EmailItem extends FieldItemBase {
diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringItem.php
index 2ef9971..5d09d90 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringItem.php
+++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringItem.php
@@ -21,9 +21,7 @@
  *   settings = {
  *     "max_length" = "255"
  *   },
- *   configurable = FALSE,
- *   default_widget = "string",
- *   default_formatter = "string"
+ *   configurable = FALSE
  * )
  */
 class StringItem extends FieldItemBase {
@@ -62,12 +60,7 @@ public function getConstraints() {
     if ($max_length = $this->getSetting('max_length')) {
       $constraint_manager = \Drupal::typedDataManager()->getValidationConstraintManager();
       $constraints[] = $constraint_manager->create('ComplexData', array(
-        'value' => array(
-          'Length' => array(
-            'max' => $max_length,
-            'maxMessage' => t('%name: may not be longer than @max characters.', array('%name' => $this->getFieldDefinition()->getLabel(), '@max' => $max_length)),
-          ),
-        ),
+        'value' => array('Length' => array('max' => $max_length))
       ));
     }
 
diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringWidget.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringWidget.php
deleted file mode 100644
index 8d13286..0000000
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringWidget.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Field\Plugin\Field\FieldWidget\StringWidget.
- */
-
-namespace Drupal\Core\Field\Plugin\Field\FieldWidget;
-
-use Drupal\Core\Field\FieldItemListInterface;
-use Drupal\Core\Field\WidgetBase;
-
-/**
- * Plugin implementation of the 'string' widget.
- *
- * @FieldWidget(
- *   id = "string",
- *   label = @Translation("String field"),
- *   field_types = {
- *     "string",
- *     "email"
- *   },
- *   settings = {
- *     "size" = "60",
- *     "placeholder" = ""
- *   }
- * )
- */
-class StringWidget extends WidgetBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function settingsForm(array $form, array &$form_state) {
-    $element['size'] = array(
-      '#type' => 'number',
-      '#title' => t('Size of textfield'),
-      '#default_value' => $this->getSetting('size'),
-      '#required' => TRUE,
-      '#min' => 1,
-    );
-    $element['placeholder'] = array(
-      '#type' => 'textfield',
-      '#title' => t('Placeholder'),
-      '#default_value' => $this->getSetting('placeholder'),
-      '#description' => t('Text that will be shown inside the field until a value is entered. This hint is usually a sample value or a brief description of the expected format.'),
-    );
-    return $element;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function settingsSummary() {
-    $summary = array();
-
-    $summary[] = t('Textfield size: !size', array('!size' => $this->getSetting('size')));
-    $placeholder = $this->getSetting('placeholder');
-    if (!empty($placeholder)) {
-      $summary[] = t('Placeholder: @placeholder', array('@placeholder' => $placeholder));
-    }
-
-    return $summary;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
-    $element['value'] = $element + array(
-      '#type' => 'textfield',
-      '#default_value' => isset($items[$delta]->value) ? $items[$delta]->value : NULL,
-      '#size' => $this->getSetting('size'),
-      '#placeholder' => $this->getSetting('placeholder'),
-      '#maxlength' => $this->getFieldSetting('max_length'),
-      '#attributes' => array('class' => array('text-full')),
-    );
-
-    return $element;
-  }
-
-}
diff --git a/core/lib/Drupal/Core/Field/WidgetBase.php b/core/lib/Drupal/Core/Field/WidgetBase.php
index 6432fb1..d770871 100644
--- a/core/lib/Drupal/Core/Field/WidgetBase.php
+++ b/core/lib/Drupal/Core/Field/WidgetBase.php
@@ -111,21 +111,25 @@ public function form(FieldItemListInterface $items, array &$form, array &$form_s
     // Most widgets need their internal structure preserved in submitted values.
     $elements += array('#tree' => TRUE);
 
-    return array(
-      // Aid in theming of widgets by rendering a classified container.
-      '#type' => 'container',
-      // Assign a different parent, to keep the main id for the widget itself.
-      '#parents' => array_merge($parents, array($field_name . '_wrapper')),
-      '#attributes' => array(
-        'class' => array(
-          'field-type-' . drupal_html_class($this->fieldDefinition->getType()),
-          'field-name-' . drupal_html_class($field_name),
-          'field-widget-' . drupal_html_class($this->getPluginId()),
+    $return = array(
+      $field_name => array(
+        // Aid in theming of widgets by rendering a classified container.
+        '#type' => 'container',
+        // Assign a different parent, to keep the main id for the widget itself.
+        '#parents' => array_merge($parents, array($field_name . '_wrapper')),
+        '#attributes' => array(
+          'class' => array(
+            'field-type-' . drupal_html_class($this->fieldDefinition->getType()),
+            'field-name-' . drupal_html_class($field_name),
+            'field-widget-' . drupal_html_class($this->getPluginId()),
+          ),
         ),
+        '#access' => $items->access('edit'),
+        'widget' => $elements,
       ),
-      '#access' => $items->access('edit'),
-      'widget' => $elements,
     );
+
+    return $return;
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Installer/Exception/AlreadyInstalledException.php b/core/lib/Drupal/Core/Installer/Exception/AlreadyInstalledException.php
deleted file mode 100644
index 3f16728..0000000
--- a/core/lib/Drupal/Core/Installer/Exception/AlreadyInstalledException.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Installer\Exception\AlreadyInstalledException.
- */
-
-namespace Drupal\Core\Installer\Exception;
-
-use Drupal\Core\StringTranslation\TranslationInterface;
-
-/**
- * Exception thrown if Drupal is installed already.
- */
-class AlreadyInstalledException extends InstallerException {
-
-  /**
-   * Constructs a new "already installed" exception.
-   *
-   * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
-   *   The string translation manager.
-   */
-  public function __construct(TranslationInterface $string_translation) {
-    $this->stringTranslation = $string_translation;
-
-    $title = $this->t('Drupal already installed');
-    $message = $this->t('<ul>
-<li>To start over, you must empty your existing database, delete your active configuration, and copy <em>default.settings.php</em> over <em>settings.php</em>.</li>
-<li>To install to a different database, edit the appropriate <em>settings.php</em> file in the <em>sites</em> folder.</li>
-<li>To locate your active configuration, view the appropriate <em>settings.php</em> file in the <em>sites</em> folder.</li>
-<li>To upgrade an existing installation, proceed to the <a href="@base-url/core/update.php">update script</a>.</li>
-<li>View your <a href="@base-url">existing site</a>.</li>
-</ul>', array(
-      '@base-url' => $GLOBALS['base_url'],
-    ));
-    parent::__construct($message, $title);
-  }
-
-}
diff --git a/core/lib/Drupal/Core/Installer/Exception/InstallerException.php b/core/lib/Drupal/Core/Installer/Exception/InstallerException.php
deleted file mode 100644
index e8c1ec3..0000000
--- a/core/lib/Drupal/Core/Installer/Exception/InstallerException.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Installer\Exception\InstallerException.
- */
-
-namespace Drupal\Core\Installer\Exception;
-
-/**
- * Base class for exceptions thrown by installer.
- */
-class InstallerException extends \RuntimeException {
-
-  /**
-   * The page title to output.
-   *
-   * @var string
-   */
-  protected $title;
-
-  /**
-   * The string translation manager.
-   *
-   * @var \Drupal\Core\StringTranslation\TranslationInterface
-   */
-  protected $stringTranslation;
-
-  /**
-   * Constructs a new installer exception.
-   *
-   * @param string $title
-   *   The page title.
-   * @param string $message
-   *   (optional) The exception message. Defaults to 'Error'.
-   * @param int $code
-   *   (optional) The exception code. Defaults to 0.
-   * @param \Exception $previous
-   *   (optional) A previous exception.
-   */
-  public function __construct($message, $title = 'Error', $code = 0, \Exception $previous = NULL) {
-    parent::__construct($message, $code, $previous);
-    $this->title = $title;
-  }
-
-  /**
-   * Returns the exception page title.
-   *
-   * @return string
-   */
-  public function getTitle() {
-    return $this->title;
-  }
-
-  /**
-   * Translates a string using StringTranslation.
-   *
-   * @see \Drupal\Core\StringTranslation\TranslationInterface::translate()
-   */
-  protected function t($string, array $args = array(), array $options = array()) {
-    return $this->stringTranslation->translate($string, $args, $options);
-  }
-
-}
diff --git a/core/lib/Drupal/Core/Installer/Exception/NoProfilesException.php b/core/lib/Drupal/Core/Installer/Exception/NoProfilesException.php
deleted file mode 100644
index cc8d596..0000000
--- a/core/lib/Drupal/Core/Installer/Exception/NoProfilesException.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Installer\Exception\NoProfilesException.
- */
-
-namespace Drupal\Core\Installer\Exception;
-
-use Drupal\Core\StringTranslation\TranslationInterface;
-
-/**
- * Exception thrown if no installation profiles are available.
- */
-class NoProfilesException extends InstallerException {
-
-  /**
-   * Constructs a new "no profiles available" exception.
-   *
-   * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
-   *   The string translation manager.
-   */
-  public function __construct(TranslationInterface $string_translation) {
-    $this->stringTranslation = $string_translation;
-
-    $title = $this->t('No profiles available');
-    $message = $this->t('We were unable to find any installation profiles. Installation profiles tell us what modules to enable and what schema to install in the database. A profile is necessary to continue with the installation process.');
-    parent::__construct($message, $title);
-  }
-
-}
diff --git a/core/lib/Drupal/Core/Path/AliasWhitelist.php b/core/lib/Drupal/Core/Path/AliasWhitelist.php
index 643fea4..2f9b1c1 100644
--- a/core/lib/Drupal/Core/Path/AliasWhitelist.php
+++ b/core/lib/Drupal/Core/Path/AliasWhitelist.php
@@ -26,11 +26,11 @@ class AliasWhitelist extends CacheCollector implements AliasWhitelistInterface {
   protected $state;
 
   /**
-   * The database connection.
+   * The Path CRUD service.
    *
-   * @var \Drupal\Core\Database\Connection
+   * @var \Drupal\Core\Path\Path
    */
-  protected $connection;
+  protected $path;
 
   /**
    * Constructs an AliasWhitelist object.
@@ -43,13 +43,13 @@ class AliasWhitelist extends CacheCollector implements AliasWhitelistInterface {
    *   The lock backend.
    * @param \Drupal\Core\KeyValueStore\StateInterface $state
    *   The state keyvalue store.
-   * @param \Drupal\Core\Database\Connection $connection
-   *   The database connection.
+   * @param \Drupal\Core\Path\Path $path
+   *   The Path CRUD service.
    */
-  public function __construct($cid, CacheBackendInterface $cache, LockBackendInterface $lock, StateInterface $state, Connection $connection) {
+  public function __construct($cid, CacheBackendInterface $cache, LockBackendInterface $lock, StateInterface $state, Path $path) {
     parent::__construct($cid, $cache, $lock);
     $this->state = $state;
-    $this->connection = $connection;
+    $this->path = $path;
   }
 
   /**
@@ -107,13 +107,7 @@ public function get($offset) {
    * {@inheritdoc}
    */
   public function resolveCacheMiss($root) {
-    $query = $this->connection->select('url_alias', 'u');
-    $query->addExpression(1);
-    $exists = (bool) $query
-      ->condition('u.source', $this->connection->escapeLike($root) . '%', 'LIKE')
-      ->range(0, 1)
-      ->execute()
-      ->fetchField();
+    $exists = $this->path->pathHasAlias($root);
     $this->storage[$root] = $exists;
     $this->persist($root);
     if ($exists) {
diff --git a/core/lib/Drupal/Core/Path/Path.php b/core/lib/Drupal/Core/Path/Path.php
index 6802030..9947b7c 100644
--- a/core/lib/Drupal/Core/Path/Path.php
+++ b/core/lib/Drupal/Core/Path/Path.php
@@ -246,4 +246,87 @@ public function lookupPathSource($path, $langcode) {
 
     return $result->fetchField();
   }
+
+  /**
+   * Checks if same alias already exists for a different path.
+   *
+   * @param string $alias
+   *   Alias to check against.
+   * @param string $langcode
+   *   Language of the alias.
+   * @param string $source
+   *   Path that alias is to be assigned to (optional).
+   * @param int $pid
+   *   PID that alias is to be assigned to (optional).
+   * @return boolean
+   *   TRUE if alias already exists and FALSE otherwise.
+   */
+  public function aliasExists($alias, $langcode, $source = NULL, $pid = NULL) {
+    $query = $this->connection->select('url_alias')
+      ->condition('alias', $alias)
+      ->condition('langcode', $langcode);
+    if (!empty($source)) {
+      $query->condition('source', $source, '<>');
+    }
+    if (!empty($pid)) {
+      $query->condition('pid', $pid, '<>');
+    }
+    $query->addExpression('1');
+    $query->range(0, 1);
+    return (bool) $query->execute()->fetchField();
+  }
+
+  /**
+   * Checks if there are any aliases with language defined.
+   *
+   * @return bool
+   *   TRUE if aliases with language exist.
+   */
+  public function languageAliasExists() {
+    return (bool) $this->connection->queryRange('SELECT 1 FROM {url_alias} WHERE langcode <> :langcode', 0, 1, array(':langcode' => Language::LANGCODE_NOT_SPECIFIED))->fetchField();
+  }
+
+  /**
+   * Loads list of alias for one page of alias admin listing.
+   *
+   * @param array $header
+   *   Table header.
+   * @param string $keys
+   *   Search keys.
+   * @return array
+   *   Array of items to be displayed on the current page.
+   */
+  public function adminListing($header, $keys = NULL) {
+    $query = $this->connection->select('url_alias')
+      ->extend('Drupal\Core\Database\Query\PagerSelectExtender')
+      ->extend('Drupal\Core\Database\Query\TableSortExtender');
+    if ($keys) {
+      // Replace wildcards with PDO wildcards.
+      $query->condition('alias', '%' . preg_replace('!\*+!', '%', $keys) . '%', 'LIKE');
+    }
+    return $query
+      ->fields('url_alias')
+      ->orderByHeader($header)
+      ->limit(50)
+      ->execute()
+      ->fetchAll();
+  }
+
+  /**
+   * Check if path (prefix) already has any alias-es.
+   *
+   * @param $path_prefix
+   *   Path prefix to test for.
+   * @return
+   *   TRUE if alias-es exists, FALSE otherwise.
+   */
+  public function pathHasAlias($path_prefix) {
+    $query = $this->connection->select('url_alias', 'u');
+    $query->addExpression(1);
+    return (bool) $query
+      ->condition('u.source', $this->connection->escapeLike($path_prefix) . '%', 'LIKE')
+      ->range(0, 1)
+      ->execute()
+      ->fetchField();
+  }
 }
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php
index 56f8a54..020e1ab 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentValidationTest.php
@@ -136,8 +136,7 @@ protected function assertLengthViolation(CommentInterface $comment, $field_name,
     $violations = $comment->validate();
     $this->assertEqual(count($violations), 1, "Violation found when $field_name is too long.");
     $this->assertEqual($violations[0]->getPropertyPath(), "$field_name.0.value");
-    $field_label = $comment->get($field_name)->getFieldDefinition()->getLabel();
-    $this->assertEqual($violations[0]->getMessage(), t('%name: may not be longer than @max characters.', array('%name' => $field_label, '@max' => $length)));
+    $this->assertEqual($violations[0]->getMessage(), t('This value is too long. It should have %limit characters or less.', array('%limit' => $length)));
   }
 
 }
diff --git a/core/modules/email/email.module b/core/modules/email/email.module
index 54d426a..f74da6f 100644
--- a/core/modules/email/email.module
+++ b/core/modules/email/email.module
@@ -35,5 +35,20 @@ function email_field_info_alter(&$info) {
   $info['email']['class'] = '\Drupal\email\ConfigurableEmailItem';
   $info['email']['list_class'] = '\Drupal\Core\Field\ConfigFieldItemList';
   $info['email']['default_widget'] = 'email_default';
+  if (\Drupal::moduleHandler()->moduleExists('text')) {
+    $info['email']['default_formatter'] = 'text_plain';
+  }
+  else {
+    $info['email']['default_formatter'] = 'email_mailto';
+  }
   $info['email']['provider'] = 'email';
 }
+
+/**
+ * Implements hook_field_formatter_info_alter().
+ */
+function email_field_formatter_info_alter(&$info) {
+  if (isset($info['text_plain'])) {
+    $info['text_plain']['field_types'][] = 'email';
+  }
+}
diff --git a/core/modules/entity/config/schema/entity.schema.yml b/core/modules/entity/config/schema/entity.schema.yml
index 6334cb4..a2d0b43 100644
--- a/core/modules/entity/config/schema/entity.schema.yml
+++ b/core/modules/entity/config/schema/entity.schema.yml
@@ -139,13 +139,3 @@ entity_form_display.field.*:
     weight:
       type: integer
       label: 'Weight'
-
-entity_view_display.field.string:
-  type: entity_field_view_display_base
-  label: 'Plain text display format settings'
-  mapping:
-    settings:
-      type: sequence
-      label: 'Settings'
-      sequence:
-        - type: string
diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php
index e4d3880..a35c4ac 100644
--- a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php
+++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php
@@ -230,7 +230,7 @@ public function buildMultiple(array $entities) {
         // Then let the formatter build the output for each entity.
         foreach ($entities as $key => $entity) {
           $items = $entity->get($field_name);
-          $build[$key][$field_name] = $formatter->view($items);
+          $build[$key] += $formatter->view($items);
         }
       }
     }
diff --git a/core/modules/field/field.attach.inc b/core/modules/field/field.attach.inc
index a2f6c7c..3898037 100644
--- a/core/modules/field/field.attach.inc
+++ b/core/modules/field/field.attach.inc
@@ -91,13 +91,20 @@ function field_invoke_method($method, $target_function, EntityInterface $entity,
     $target = call_user_func($target_function, $field_definition);
 
     if (method_exists($target, $method)) {
-      $field_name = $field_definition->getName();
-      $items = $entity->get($field_name);
+      $items = $entity->get($field_definition->getName());
       $items->filterEmptyItems();
 
       $result = $target->$method($items, $a, $b);
+
       if (isset($result)) {
-        $return[$field_name] = $result;
+        // For methods with array results, we merge results together.
+        // For methods with scalar results, we collect results in an array.
+        if (is_array($result)) {
+          $return = array_merge($return, $result);
+        }
+        else {
+          $return[] = $result;
+        }
       }
     }
   }
diff --git a/core/modules/field/lib/Drupal/field/Tests/Views/FieldUITest.php b/core/modules/field/lib/Drupal/field/Tests/Views/FieldUITest.php
index 3f01234..07507fe 100644
--- a/core/modules/field/lib/Drupal/field/Tests/Views/FieldUITest.php
+++ b/core/modules/field/lib/Drupal/field/Tests/Views/FieldUITest.php
@@ -73,7 +73,7 @@ public function testHandlerUI() {
     }, $result);
     // @todo Replace this sort by assertArray once it's in.
     sort($options, SORT_STRING);
-    $this->assertEqual($options, array('string', 'text_default', 'text_trimmed'), 'The text formatters for a simple text field appear as expected.');
+    $this->assertEqual($options, array('text_default', 'text_plain', 'text_trimmed'), 'The text formatters for a simple text field appear as expected.');
 
     $this->drupalPostForm(NULL, array('options[type]' => 'text_trimmed'), t('Apply'));
 
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php
index c9ce1be..ecd41fd 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php
@@ -63,7 +63,7 @@
   public function __construct(EntityManagerInterface $entity_manager, FieldTypePluginManagerInterface $field_type_manager, PluginManagerBase $plugin_manager, ConfigFactoryInterface $config_factory) {
     parent::__construct($entity_manager);
 
-    $this->fieldTypes = $field_type_manager->getDefinitions();
+    $this->fieldTypes = $field_type_manager->getConfigurableDefinitions();
     $this->pluginManager = $plugin_manager;
     $this->configFactory = $config_factory;
   }
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index c44cffe..1a55bfe 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -74,7 +74,7 @@ function forum_theme() {
   return array(
     'forums' => array(
       'template' => 'forums',
-      'variables' => array('forums' => array(), 'topics' => array(), 'topics_pager' => array(), 'parents' => NULL, 'term' => NULL, 'sortby' => NULL, 'forum_per_page' => NULL, 'header' => array()),
+      'variables' => array('forums' => array(), 'topics' => array(), 'topics_pager' => array(), 'parents' => NULL, 'term' => NULL, 'sortby' => NULL, 'forum_per_page' => NULL),
     ),
     'forum_list' => array(
       'template' => 'forum-list',
@@ -623,7 +623,7 @@ function template_preprocess_forums(&$variables) {
     }
 
     if ($variables['term'] && empty($variables['term']->forum_container->value) && !empty($variables['topics'])) {
-      $forum_topic_list_header = $variables['header'];
+      global $forum_topic_list_header;
 
       $table = array(
         '#theme' => 'table__forum_topic_list',
diff --git a/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php b/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php
index d503cdb..e982429 100644
--- a/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php
+++ b/core/modules/forum/lib/Drupal/forum/Controller/ForumController.php
@@ -82,15 +82,12 @@ public function forumPage(TermInterface $taxonomy_term) {
     $taxonomy_term->parents = $this->forumManager->getParents($taxonomy_term->id());
 
     if (empty($taxonomy_term->forum_container->value)) {
-      $build = $this->forumManager->getTopics($taxonomy_term->id());
-      $topics = $build['topics'];
-      $header = $build['header'];
+      $topics = $this->forumManager->getTopics($taxonomy_term->id());
     }
     else {
       $topics = '';
-      $header = array();
     }
-    return $this->build($taxonomy_term->forums, $taxonomy_term, $topics, $taxonomy_term->parents, $header);
+    return $this->build($taxonomy_term->forums, $taxonomy_term, $topics, $taxonomy_term->parents);
   }
 
   /**
@@ -125,20 +122,17 @@ public function forumIndex() {
    *   The topics of this forum.
    * @param array $parents
    *   The parent forums in relation this forum.
-   * @param array $header
-   *   Array of header cells.
    *
    * @return array
    *   A render array.
    */
-  protected function build($forums, TermInterface $term, $topics = array(), $parents = array(), $header = array()) {
+  protected function build($forums, TermInterface $term, $topics = array(), $parents = array()) {
     $config = $this->config('forum.settings');
     $build = array(
       '#theme' => 'forums',
       '#forums' => $forums,
       '#topics' => $topics,
       '#parents' => $parents,
-      '#header' => $header,
       '#term' => $term,
       '#sortby' => $config->get('topics.order'),
       '#forums_per_page' => $config->get('topics.page_limit'),
diff --git a/core/modules/forum/lib/Drupal/forum/ForumManager.php b/core/modules/forum/lib/Drupal/forum/ForumManager.php
index a5ba96b..bcc7372 100644
--- a/core/modules/forum/lib/Drupal/forum/ForumManager.php
+++ b/core/modules/forum/lib/Drupal/forum/ForumManager.php
@@ -140,18 +140,19 @@ public function getTopics($tid) {
     $forum_per_page = $config->get('topics.page_limit');
     $sortby = $config->get('topics.order');
 
+    global $forum_topic_list_header;
     $user = \Drupal::currentUser();
 
-    $header = array(
+    $forum_topic_list_header = array(
       array('data' => $this->t('Topic'), 'field' => 'f.title'),
       array('data' => $this->t('Replies'), 'field' => 'f.comment_count'),
       array('data' => $this->t('Last reply'), 'field' => 'f.last_comment_timestamp'),
     );
 
     $order = $this->getTopicOrder($sortby);
-    for ($i = 0; $i < count($header); $i++) {
-      if ($header[$i]['field'] == $order['field']) {
-        $header[$i]['sort'] = $order['sort'];
+    for ($i = 0; $i < count($forum_topic_list_header); $i++) {
+      if ($forum_topic_list_header[$i]['field'] == $order['field']) {
+        $forum_topic_list_header[$i]['sort'] = $order['sort'];
       }
     }
 
@@ -164,7 +165,7 @@ public function getTopics($tid) {
       ->addTag('node_access')
       ->addMetaData('base_table', 'forum_index')
       ->orderBy('f.sticky', 'DESC')
-      ->orderByHeader($header)
+      ->orderByHeader($forum_topic_list_header)
       ->limit($forum_per_page);
 
     $count_query = $this->connection->select('forum_index', 'f');
@@ -206,7 +207,7 @@ public function getTopics($tid) {
 
       $query
         ->orderBy('f.sticky', 'DESC')
-        ->orderByHeader($header)
+        ->orderByHeader($forum_topic_list_header)
         ->condition('n.nid', $nids)
         // @todo This should be actually filtering on the desired node language
         //   and just fall back to the default language.
@@ -265,7 +266,7 @@ public function getTopics($tid) {
       $topics[$topic->id()] = $topic;
     }
 
-    return array('topics' => $topics, 'header' => $header);
+    return $topics;
 
   }
 
diff --git a/core/modules/forum/lib/Drupal/forum/ForumManagerInterface.php b/core/modules/forum/lib/Drupal/forum/ForumManagerInterface.php
index cdcfb38..b8896ce 100644
--- a/core/modules/forum/lib/Drupal/forum/ForumManagerInterface.php
+++ b/core/modules/forum/lib/Drupal/forum/ForumManagerInterface.php
@@ -21,7 +21,7 @@
    *   Term ID.
    *
    * @return array
-   *   Array with keys 'topics' and 'header'.
+   *   Array of topics.
    */
   public function getTopics($tid);
 
diff --git a/core/modules/node/lib/Drupal/node/Entity/Node.php b/core/modules/node/lib/Drupal/node/Entity/Node.php
index 1774c75..62f697f 100644
--- a/core/modules/node/lib/Drupal/node/Entity/Node.php
+++ b/core/modules/node/lib/Drupal/node/Entity/Node.php
@@ -378,7 +378,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
       ->setLabel(t('Language code'))
       ->setDescription(t('The node language code.'));
 
-    $fields['title'] = FieldDefinition::create('string')
+    $fields['title'] = FieldDefinition::create('text')
       ->setLabel(t('Title'))
       ->setDescription(t('The title of this node, always treated as non-markup plain text.'))
       ->setRequired(TRUE)
@@ -386,14 +386,15 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
       ->setSettings(array(
         'default_value' => '',
         'max_length' => 255,
+        'text_processing' => 0,
       ))
       ->setDisplayOptions('view', array(
         'label' => 'hidden',
-        'type' => 'string',
+        'type' => 'text_default',
         'weight' => -5,
       ))
       ->setDisplayOptions('form', array(
-        'type' => 'string',
+        'type' => 'text_textfield',
         'weight' => -5,
       ))
       ->setDisplayConfigurable('form', TRUE);
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeValidationTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeValidationTest.php
index e71d75b..7b0a0a0 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeValidationTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeValidationTest.php
@@ -54,7 +54,7 @@ public function testValidation() {
     $violations = $node->validate();
     $this->assertEqual(count($violations), 1, 'Violation found when title is too long.');
     $this->assertEqual($violations[0]->getPropertyPath(), 'title.0.value');
-    $this->assertEqual($violations[0]->getMessage(), '<em class="placeholder">Title</em>: may not be longer than 255 characters.');
+    $this->assertEqual($violations[0]->getMessage(), '<em class="placeholder">Title</em>: the text may not be longer than 255 characters.');
 
     $node->set('title', NULL);
     $violations = $node->validate();
diff --git a/core/modules/path/path.admin.inc b/core/modules/path/path.admin.inc
index a2b2072..d6b1812 100644
--- a/core/modules/path/path.admin.inc
+++ b/core/modules/path/path.admin.inc
@@ -22,8 +22,7 @@ function path_admin_overview($keys = NULL) {
   $build['path_admin_filter_form'] = drupal_get_form('path_admin_filter_form', $keys);
   // Enable language column if language.module is enabled or if we have any
   // alias with a language.
-  $alias_exists = (bool) db_query_range('SELECT 1 FROM {url_alias} WHERE langcode <> :langcode', 0, 1, array(':langcode' => Language::LANGCODE_NOT_SPECIFIED))->fetchField();
-  $multilanguage = (\Drupal::moduleHandler()->moduleExists('language') || $alias_exists);
+  $multilanguage = (\Drupal::moduleHandler()->moduleExists('language') || \Drupal::service('path.crud')->languageAliasExists());
 
   $header = array();
   $header[] = array('data' => t('Alias'), 'field' => 'alias', 'sort' => 'asc');
@@ -33,22 +32,9 @@ function path_admin_overview($keys = NULL) {
   }
   $header[] = t('Operations');
 
-  $query = db_select('url_alias')
-    ->extend('Drupal\Core\Database\Query\PagerSelectExtender')
-    ->extend('Drupal\Core\Database\Query\TableSortExtender');
-  if ($keys) {
-    // Replace wildcards with PDO wildcards.
-    $query->condition('alias', '%' . preg_replace('!\*+!', '%', $keys) . '%', 'LIKE');
-  }
-  $result = $query
-    ->fields('url_alias')
-    ->orderByHeader($header)
-    ->limit(50)
-    ->execute();
-
   $rows = array();
   $destination = drupal_get_destination();
-  foreach ($result as $data) {
+  foreach (\Drupal::service('path.crud')->adminListing($header, $keys) as $data) {
     $row = array();
     $row['data']['alias'] = l(truncate_utf8($data->alias, 50, FALSE, TRUE), $data->source, array(
       'attributes' => array('title' => $data->alias),
@@ -235,14 +221,7 @@ function path_admin_form_validate($form, &$form_state) {
   // languages.
   $langcode = isset($form_state['values']['langcode']) ? $form_state['values']['langcode'] : Language::LANGCODE_NOT_SPECIFIED;
 
-  $has_alias = db_query("SELECT COUNT(alias) FROM {url_alias} WHERE pid <> :pid AND alias = :alias AND langcode = :langcode", array(
-      ':pid' => $pid,
-      ':alias' => $alias,
-      ':langcode' => $langcode,
-    ))
-    ->fetchField();
-
-  if ($has_alias) {
+  if (\Drupal::service('path.crud')->aliasExists($alias, $langcode, NULL, $pid)) {
     form_set_error('alias', $form_state, t('The alias %alias is already in use in this language.', array('%alias' => $alias)));
   }
   if (!drupal_valid_path($source)) {
diff --git a/core/modules/path/path.module b/core/modules/path/path.module
index 20d9fae..0b8a5a4 100644
--- a/core/modules/path/path.module
+++ b/core/modules/path/path.module
@@ -146,15 +146,7 @@ function path_form_element_validate($element, &$form_state, $complete_form) {
     $path = $form_state['values']['path'];
 
     // Ensure that the submitted alias does not exist yet.
-    $query = db_select('url_alias')
-      ->condition('alias', $path['alias'])
-      ->condition('langcode', $path['langcode']);
-    if (!empty($path['source'])) {
-      $query->condition('source', $path['source'], '<>');
-    }
-    $query->addExpression('1');
-    $query->range(0, 1);
-    if ($query->execute()->fetchField()) {
+    if (\Drupal::service('path.crud')->aliasExists($path['alias'], $path['langcode'], $path['source'], NULL)) {
       form_error($element, $form_state, t('The alias is already in use.'));
     }
   }
diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TextFieldRdfaTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TextFieldRdfaTest.php
index d10318c..b350b95 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TextFieldRdfaTest.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TextFieldRdfaTest.php
@@ -73,7 +73,7 @@ public function testDefaultFormatter() {
    * Tests the plain formatter.
    */
   public function testPlainFormatter() {
-    $this->assertFormatterRdfa('string', 'http://schema.org/text', $this->testValue);
+    $this->assertFormatterRdfa('text_plain', 'http://schema.org/text', $this->testValue);
   }
 
   /**
diff --git a/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php b/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php
index 4c4f6bc..749337c 100644
--- a/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php
+++ b/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Contains \Drupal\rest\test\CreateTest.
+ * Definition of Drupal\rest\test\CreateTest.
  */
 
 namespace Drupal\rest\Tests;
@@ -106,7 +106,7 @@ public function testCreate() {
       $response = $this->httpRequest('entity/' . $entity_type, 'POST', $invalid_serialized, $this->defaultMimeType);
       $this->assertResponse(422);
       $error = drupal_json_decode($response);
-      $this->assertEqual($error['error'], "Unprocessable Entity: validation failed.\nuuid.0.value: <em class=\"placeholder\">UUID</em>: may not be longer than 128 characters.\n");
+      $this->assertEqual($error['error'], "Unprocessable Entity: validation failed.\nuuid.0.value: This value is too long. It should have <em class=\"placeholder\">128</em> characters or less.\n");
 
       // Try to create an entity without proper permissions.
       $this->drupalLogout();
@@ -125,5 +125,4 @@ public function testCreate() {
     // @todo Add a security test. It should not be possible for example to
     //   create a test entity on a node resource route.
   }
-
 }
diff --git a/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php b/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php
index 598401b..9f8d413 100644
--- a/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php
+++ b/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Contains \Drupal\rest\test\UpdateTest.
+ * Contains Drupal\rest\test\UpdateTest.
  */
 
 namespace Drupal\rest\Tests;
@@ -149,7 +149,7 @@ public function testPatchUpdate() {
     $response = $this->httpRequest('entity/' . $entity_type . '/' . $entity->id(), 'PATCH', $invalid_serialized, $this->defaultMimeType);
     $this->assertResponse(422);
     $error = drupal_json_decode($response);
-    $this->assertEqual($error['error'], "Unprocessable Entity: validation failed.\nuuid.0.value: <em class=\"placeholder\">UUID</em>: may not be longer than 128 characters.\n");
+    $this->assertEqual($error['error'], "Unprocessable Entity: validation failed.\nuuid.0.value: This value is too long. It should have <em class=\"placeholder\">128</em> characters or less.\n");
 
     // Try to update an entity without proper permissions.
     $this->drupalLogout();
@@ -162,5 +162,4 @@ public function testPatchUpdate() {
     $this->httpRequest('entity/' . $entity_type . '/' . $entity->id(), 'PATCH', $serialized, $this->defaultMimeType);
     $this->assertResponse(404);
   }
-
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypedDataDefinitionTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypedDataDefinitionTest.php
index 3704dd9..e2669d5 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypedDataDefinitionTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTypedDataDefinitionTest.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Entity\EntityTypedDataDefinitionTest.
+ * Definition of Drupal\system\Tests\TypedData\EntityTypedDataDefinitionTest.
  */
 
 namespace Drupal\system\Tests\Entity;
@@ -101,7 +101,7 @@ public function testEntities() {
     // Comparison should ignore the internal static cache, so compare the
     // serialized objects instead.
     $this->assertEqual(serialize($field_definitions), serialize(\Drupal::entityManager()->getBaseFieldDefinitions('node')));
-    $this->assertEqual($entity_definition->getPropertyDefinition('title')->getItemDefinition()->getDataType(), 'field_item:string');
+    $this->assertEqual($entity_definition->getPropertyDefinition('title')->getItemDefinition()->getDataType(), 'field_item:text');
     $this->assertNull($entity_definition->getMainPropertyName());
     $this->assertNull($entity_definition->getPropertyDefinition('invalid'));
 
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityValidationTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityValidationTest.php
index 118abe9..f88f281 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityValidationTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityValidationTest.php
@@ -108,7 +108,7 @@ protected function checkValidation($entity_type) {
     $test_entity->uuid->value = $this->randomString(129);
     $violations = $test_entity->validate();
     $this->assertEqual($violations->count(), 1, 'Validation failed.');
-    $this->assertEqual($violations[0]->getMessage(), t('%name: may not be longer than @max characters.', array('%name' => 'UUID', '@max' => 128)));
+    $this->assertEqual($violations[0]->getMessage(), t('This value is too long. It should have %limit characters or less.', array('%limit' => '128')));
 
     $test_entity = clone $entity;
     $test_entity->langcode->value = $this->randomString(13);
@@ -126,7 +126,7 @@ protected function checkValidation($entity_type) {
     $test_entity->name->value = $this->randomString(33);
     $violations = $test_entity->validate();
     $this->assertEqual($violations->count(), 1, 'Validation failed.');
-    $this->assertEqual($violations[0]->getMessage(), t('%name: may not be longer than @max characters.', array('%name' => 'Name', '@max' => 32)));
+    $this->assertEqual($violations[0]->getMessage(), t('This value is too long. It should have %limit characters or less.', array('%limit' => '32')));
 
     // Make sure the information provided by a violation is correct.
     $violation = $violations[0];
diff --git a/core/modules/system/lib/Drupal/system/Tests/Path/AliasTest.php b/core/modules/system/lib/Drupal/system/Tests/Path/AliasTest.php
index 5f5d368..a3708de 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Path/AliasTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Path/AliasTest.php
@@ -168,8 +168,8 @@ function testWhitelist() {
     $memoryCounterBackend = new MemoryCounterBackend('cache');
 
     // Create AliasManager and Path object.
-    $whitelist = new AliasWhitelist('path_alias_whitelist', $memoryCounterBackend, $this->container->get('lock'), $this->container->get('state'), $connection);
     $path = new Path($connection, $this->container->get('module_handler'));
+    $whitelist = new AliasWhitelist('path_alias_whitelist', $memoryCounterBackend, $this->container->get('lock'), $this->container->get('state'), $path);
     $aliasManager = new AliasManager($path, $whitelist, $this->container->get('language_manager'));
 
     // No alias for user and admin yet, so should be NULL.
@@ -208,7 +208,7 @@ function testWhitelist() {
 
     // Re-initialize the whitelist using the same cache backend, should load
     // from cache.
-    $whitelist = new AliasWhitelist('path_alias_whitelist', $memoryCounterBackend, $this->container->get('lock'), $this->container->get('state'), $connection);
+    $whitelist = new AliasWhitelist('path_alias_whitelist', $memoryCounterBackend, $this->container->get('lock'), $this->container->get('state'), $path);
     $this->assertNull($whitelist->get('user'));
     $this->assertTrue($whitelist->get('admin'));
     $this->assertNull($whitelist->get($this->randomName()));
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 5442b26..3ded508 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -2250,7 +2250,7 @@ function hook_uninstall() {
  * installer to pause and display a page to the user by returning any themed
  * output that should be displayed on that page (but see below for tasks that
  * use the form API or batch API; the return values of these task functions are
- * handled differently). You should also use #title within the task
+ * handled differently). You should also use drupal_set_title() within the task
  * callback function to set a custom page title. For some tasks, however, you
  * may want to simply do some processing and pass control to the next task
  * without ending the page request; to indicate this, simply do not send back
diff --git a/core/modules/system/templates/install-page.html.twig b/core/modules/system/templates/install-page.html.twig
index 031013e..a462a5a 100644
--- a/core/modules/system/templates/install-page.html.twig
+++ b/core/modules/system/templates/install-page.html.twig
@@ -12,14 +12,14 @@
  */
 #}
 <!DOCTYPE html>
-<html{{ html_attributes }}>
+<html lang="{{ language.langcode }}" dir="{{ language.dir }}">
 <head>
   {{ head }}
   <title>{{ head_title }}</title>
   {{ styles }}
   {{ scripts }}
 </head>
-<body class="{{ attributes.class }}">
+<body class="install-page">
 
   <div class="l-container">
 
diff --git a/core/modules/system/templates/maintenance-page.html.twig b/core/modules/system/templates/maintenance-page.html.twig
index b5275c7..b71fa24 100644
--- a/core/modules/system/templates/maintenance-page.html.twig
+++ b/core/modules/system/templates/maintenance-page.html.twig
@@ -3,7 +3,8 @@
  * @file
  * Default theme implementation to display a single Drupal page while offline.
  *
- * All of the available variables are mirrored in html.html.twig.
+ * All the available variables are mirrored in html.html.twig and
+ * page.html.twig.
  * Some may be blank but they are provided for consistency.
  *
  * @see template_preprocess_maintenance_page()
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php
index 009d871..e36668f 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermValidationTest.php
@@ -56,8 +56,7 @@ public function testValidation() {
     $violations = $term->validate();
     $this->assertEqual(count($violations), 1, 'Violation found when name is too long.');
     $this->assertEqual($violations[0]->getPropertyPath(), 'name.0.value');
-    $field_label = $term->get('name')->getFieldDefinition()->getLabel();
-    $this->assertEqual($violations[0]->getMessage(), t('%name: may not be longer than @max characters.', array('%name' => $field_label, '@max' => 255)));
+    $this->assertEqual($violations[0]->getMessage(), t('This value is too long. It should have %limit characters or less.', array('%limit' => 255)));
 
     $term->set('name', NULL);
     $violations = $term->validate();
diff --git a/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php b/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php
index 6a47145..e710ded 100644
--- a/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php
+++ b/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php
@@ -19,7 +19,7 @@
  *   label = @Translation("Telephone number"),
  *   description = @Translation("This field stores a telephone number in the database."),
  *   default_widget = "telephone_default",
- *   default_formatter = "string"
+ *   default_formatter = "telephone_link"
  * )
  */
 class TelephoneItem extends ConfigFieldItemBase {
diff --git a/core/modules/telephone/telephone.module b/core/modules/telephone/telephone.module
index eee9213..23099a9 100644
--- a/core/modules/telephone/telephone.module
+++ b/core/modules/telephone/telephone.module
@@ -26,8 +26,20 @@ function telephone_help($path, $arg) {
 }
 
 /**
+ * Implements hook_field_info_alter().
+ */
+function telephone_field_info_alter(&$info) {
+  if (\Drupal::moduleHandler()->moduleExists('text')) {
+    $info['telephone']['default_formatter'] = 'text_plain';
+  }
+}
+
+
+/**
  * Implements hook_field_formatter_info_alter().
  */
 function telephone_field_formatter_info_alter(&$info) {
-  $info['string']['field_types'][] = 'telephone';
+  if (isset($info['text_plain'])) {
+    $info['text_plain']['field_types'][] = 'telephone';
+  }
 }
diff --git a/core/modules/text/config/schema/text.schema.yml b/core/modules/text/config/schema/text.schema.yml
index dc54670..d377366 100644
--- a/core/modules/text/config/schema/text.schema.yml
+++ b/core/modules/text/config/schema/text.schema.yml
@@ -110,6 +110,16 @@ entity_view_display.field.text_default:
       sequence:
         - type: string
 
+entity_view_display.field.text_plain:
+  type: entity_field_view_display_base
+  label: 'Plain text display format settings'
+  mapping:
+    settings:
+      type: sequence
+      label: 'Settings'
+      sequence:
+        - type: string
+
 entity_view_display.field.text_summary_or_trimmed:
   type: entity_field_view_display_base
   label: 'Summary or trimmed text display format settings'
diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldFormatter/TextPlainFormatter.php
similarity index 59%
rename from core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php
rename to core/modules/text/lib/Drupal/text/Plugin/Field/FieldFormatter/TextPlainFormatter.php
index d5e0c17..6c15bf5 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php
+++ b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldFormatter/TextPlainFormatter.php
@@ -2,31 +2,31 @@
 
 /**
  * @file
- * Contains \Drupal\Core\Field\Plugin\Field\FieldFormatter\StringFormatter.
+ * Contains \Drupal\text\Plugin\field\formatter\TextPlainFormatter.
  */
 
-namespace Drupal\Core\Field\Plugin\Field\FieldFormatter;
+namespace Drupal\text\Plugin\Field\FieldFormatter;
 
-use Drupal\Component\Utility\String;
 use Drupal\Core\Field\FormatterBase;
 use Drupal\Core\Field\FieldItemListInterface;
 
 /**
- * Plugin implementation of the 'string' formatter.
+ * Plugin implementation of the 'text_plain' formatter.
  *
  * @FieldFormatter(
- *   id = "string",
+ *   id = "text_plain",
  *   label = @Translation("Plain text"),
  *   field_types = {
- *     "string",
- *     "email"
+ *     "text",
+ *     "text_long",
+ *     "text_with_summary"
  *   },
  *   edit = {
  *     "editor" = "plain_text"
  *   }
  * )
  */
-class StringFormatter extends FormatterBase {
+class TextPlainFormatter extends FormatterBase {
 
   /**
    * {@inheritdoc}
@@ -37,7 +37,7 @@ public function viewElements(FieldItemListInterface $items) {
     foreach ($items as $delta => $item) {
       // The text value has no text format assigned to it, so the user input
       // should equal the output, including newlines.
-      $elements[$delta] = array('#markup' => nl2br(String::checkPlain($item->value)));
+      $elements[$delta] = array('#markup' => nl2br(check_plain($item->value)));
     }
 
     return $elements;
diff --git a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldWidget/TextfieldWidget.php b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldWidget/TextfieldWidget.php
index 35f6957..b35e633 100644
--- a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldWidget/TextfieldWidget.php
+++ b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldWidget/TextfieldWidget.php
@@ -8,7 +8,7 @@
 namespace Drupal\text\Plugin\Field\FieldWidget;
 
 use Drupal\Core\Field\FieldItemListInterface;
-use Drupal\Core\Field\Plugin\Field\FieldWidget\StringWidget;
+use Drupal\Core\Field\WidgetBase;
 use Symfony\Component\Validator\ConstraintViolationInterface;
 
 /**
@@ -18,8 +18,7 @@
  *   id = "text_textfield",
  *   label = @Translation("Text field"),
  *   field_types = {
- *     "text",
- *     "string"
+ *     "text"
  *   },
  *   settings = {
  *     "size" = "60",
@@ -27,22 +26,67 @@
  *   }
  * )
  */
-class TextfieldWidget extends StringWidget {
+class TextfieldWidget extends WidgetBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function settingsForm(array $form, array &$form_state) {
+    $element['size'] = array(
+      '#type' => 'number',
+      '#title' => t('Size of textfield'),
+      '#default_value' => $this->getSetting('size'),
+      '#required' => TRUE,
+      '#min' => 1,
+    );
+    $element['placeholder'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Placeholder'),
+      '#default_value' => $this->getSetting('placeholder'),
+      '#description' => t('Text that will be shown inside the field until a value is entered. This hint is usually a sample value or a brief description of the expected format.'),
+    );
+    return $element;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function settingsSummary() {
+    $summary = array();
+
+    $summary[] = t('Textfield size: !size', array('!size' => $this->getSetting('size')));
+    $placeholder = $this->getSetting('placeholder');
+    if (!empty($placeholder)) {
+      $summary[] = t('Placeholder: @placeholder', array('@placeholder' => $placeholder));
+    }
+
+    return $summary;
+  }
 
   /**
    * {@inheritdoc}
    */
   public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, array &$form_state) {
-    $main_widget = parent::formElement($items, $delta, $element, $form, $form_state);
+    $main_widget = $element + array(
+      '#type' => 'textfield',
+      '#default_value' => isset($items[$delta]->value) ? $items[$delta]->value : NULL,
+      '#size' => $this->getSetting('size'),
+      '#placeholder' => $this->getSetting('placeholder'),
+      '#maxlength' => $this->getFieldSetting('max_length'),
+      '#attributes' => array('class' => array('text-full')),
+    );
 
     if ($this->getFieldSetting('text_processing')) {
-      $element = $main_widget['value'];
+      $element = $main_widget;
       $element['#type'] = 'text_format';
       $element['#format'] = isset($items[$delta]->format) ? $items[$delta]->format : NULL;
-      $element['#base_type'] = $main_widget['value']['#type'];
-      return $element;
+      $element['#base_type'] = $main_widget['#type'];
+    }
+    else {
+      $element['value'] = $main_widget;
     }
-    return $main_widget;
+
+    return $element;
   }
 
   /**
diff --git a/core/modules/text/lib/Drupal/text/TextProcessed.php b/core/modules/text/lib/Drupal/text/TextProcessed.php
index 5d99de3..d07a196 100644
--- a/core/modules/text/lib/Drupal/text/TextProcessed.php
+++ b/core/modules/text/lib/Drupal/text/TextProcessed.php
@@ -2,12 +2,11 @@
 
 /**
  * @file
- * Contains \Drupal\text\TextProcessed.
+ * Definition of Drupal\text\TextProcessed.
  */
 
 namespace Drupal\text;
 
-use Drupal\Component\Utility\String;
 use Drupal\Core\TypedData\DataDefinitionInterface;
 use Drupal\Core\TypedData\TypedDataInterface;
 use Drupal\Core\TypedData\TypedData;
@@ -58,8 +57,8 @@ public function getValue($langcode = NULL) {
     }
     else {
       // Escape all HTML and retain newlines.
-      // @see \Drupal\Core\Field\Plugin\Field\FieldFormatter\StringFormatter
-      $this->processed = nl2br(String::checkPlain($text));
+      // @see \Drupal\text\Plugin\field\formatter\TextPlainFormatter
+      $this->processed = nl2br(check_plain($text));
     }
     return $this->processed;
   }
diff --git a/core/modules/text/text.module b/core/modules/text/text.module
index 339d9da..b1672de 100644
--- a/core/modules/text/text.module
+++ b/core/modules/text/text.module
@@ -170,12 +170,3 @@ function text_filter_format_update($format) {
 function text_filter_format_disable($format) {
   field_cache_clear();
 }
-
-/**
- * Implements hook_field_formatter_info_alter().
- */
-function text_field_formatter_info_alter(&$info) {
-  $info['string']['field_types'][] = 'text';
-  $info['string']['field_types'][] = 'text_with_summary';
-  $info['string']['field_types'][] = 'text_long';
-}
diff --git a/core/modules/user/lib/Drupal/user/TempStore.php b/core/modules/user/lib/Drupal/user/TempStore.php
index 458bf5c..dd6451c 100644
--- a/core/modules/user/lib/Drupal/user/TempStore.php
+++ b/core/modules/user/lib/Drupal/user/TempStore.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\user;
 
-use Drupal\Component\Utility\String;
 use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface;
 use Drupal\Core\Lock\LockBackendInterface;
 
@@ -35,6 +34,9 @@
  * editing certain data, or even to restrict other users from editing it at
  * the same time. It is the responsibility of the implementation to decide
  * when and whether one owner can use or update another owner's data.
+ *
+ * @todo We could add getIfOwner() or setIfOwner() methods to make this more
+ *   explicit.
  */
 class TempStore {
 
@@ -83,7 +85,7 @@ class TempStore {
    * @param mixed $owner
    *   The owner key to store along with the data (e.g. a user or session ID).
    */
-  public function __construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lockBackend, $owner) {
+  function __construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lockBackend, $owner) {
     $this->storage = $storage;
     $this->lockBackend = $lockBackend;
     $this->owner = $owner;
@@ -98,30 +100,13 @@ public function __construct(KeyValueStoreExpirableInterface $storage, LockBacken
    * @return mixed
    *   The data associated with the key, or NULL if the key does not exist.
    */
-  public function get($key) {
+  function get($key) {
     if ($object = $this->storage->get($key)) {
       return $object->data;
     }
   }
 
   /**
-   * Retrieves a value from this TempStore for a given key.
-   *
-   * Only returns the value if the value is owned by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to retrieve.
-   *
-   * @return mixed
-   *   The data associated with the key, or NULL if the key does not exist.
-   */
-  public function getIfOwner($key) {
-    if (($object = $this->storage->get($key)) && ($object->owner == $this->owner)) {
-      return $object->data;
-    }
-  }
-
-  /**
    * Stores a particular key/value pair only if the key doesn't already exist.
    *
    * @param string $key
@@ -132,7 +117,7 @@ public function getIfOwner($key) {
    * @return bool
    *   TRUE if the data was set, or FALSE if it already existed.
    */
-  public function setIfNotExists($key, $value) {
+  function setIfNotExists($key, $value) {
     $value = (object) array(
       'owner' => $this->owner,
       'data' => $value,
@@ -144,46 +129,18 @@ public function setIfNotExists($key, $value) {
   /**
    * Stores a particular key/value pair in this TempStore.
    *
-   * Only stores the given key/value pair if it does not exist yet or is owned
-   * by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   * @param mixed $value
-   *   The data to store.
-   *
-   * @return bool
-   *   TRUE if the data was set, or FALSE if it already exists and is not owned
-   * by $this->user.
-   */
-  public function setIfOwner($key, $value) {
-    if ($this->setIfNotExists($key, $value)) {
-      return TRUE;
-    }
-
-    if (($object = $this->storage->get($key)) && ($object->owner == $this->owner)) {
-      $this->set($key, $value);
-      return TRUE;
-    }
-
-    return FALSE;
-  }
-
-  /**
-   * Stores a particular key/value pair in this TempStore.
-   *
    * @param string $key
    *   The key of the data to store.
    * @param mixed $value
    *   The data to store.
    */
-  public function set($key, $value) {
+  function set($key, $value) {
     if (!$this->lockBackend->acquire($key)) {
       $this->lockBackend->wait($key);
       if (!$this->lockBackend->acquire($key)) {
-        throw new TempStoreException(String::format("Couldn't acquire lock to update item %key in %collection temporary storage.", array(
+        throw new TempStoreException(format_string("Couldn't acquire lock to update item %key in %collection temporary storage.", array(
           '%key' => $key,
-          '%collection' => $this->storage->getCollectionName(),
+          '%collection' => $this->storage->collection,
         )));
       }
     }
@@ -207,7 +164,7 @@ public function set($key, $value) {
    *   An object with the owner and updated time if the key has a value, or
    *   NULL otherwise.
    */
-  public function getMetadata($key) {
+  function getMetadata($key) {
     // Fetch the key/value pair and its metadata.
     $object = $this->storage->get($key);
     if ($object) {
@@ -223,13 +180,13 @@ public function getMetadata($key) {
    * @param string $key
    *   The key of the data to delete.
    */
-  public function delete($key) {
+  function delete($key) {
     if (!$this->lockBackend->acquire($key)) {
       $this->lockBackend->wait($key);
       if (!$this->lockBackend->acquire($key)) {
-        throw new TempStoreException(String::format("Couldn't acquire lock to delete item %key from %collection temporary storage.", array(
+        throw new TempStoreException(format_string("Couldn't acquire lock to delete item %key from %collection temporary storage.", array(
           '%key' => $key,
-          '%collection' => $this->storage->getCollectionName(),
+          '%collection' => $this->storage->collection,
         )));
       }
     }
@@ -237,28 +194,4 @@ public function delete($key) {
     $this->lockBackend->release($key);
   }
 
-  /**
-   * Deletes data from the store for a given key and releases the lock on it.
-   *
-   * Only delete the given key if it is owned by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to delete.
-   *
-   * @return bool
-   *   TRUE if the object was deleted or does not exist, FALSE if it exists but
-   *   is not owned by $this->owner.
-   */
-  public function deleteIfOwner($key) {
-    if (!$object = $this->storage->get($key)) {
-      return TRUE;
-    }
-    elseif ($object->owner == $this->owner) {
-      $this->delete($key);
-      return TRUE;
-    }
-
-    return FALSE;
-  }
-
 }
diff --git a/core/modules/user/lib/Drupal/user/Tests/TempStoreDatabaseTest.php b/core/modules/user/lib/Drupal/user/Tests/TempStoreDatabaseTest.php
index 0437837..28edf55 100644
--- a/core/modules/user/lib/Drupal/user/Tests/TempStoreDatabaseTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/TempStoreDatabaseTest.php
@@ -123,12 +123,6 @@ public function testUserTempStore() {
     $this->assertIdenticalObject($this->objects[2], $stores[0]->get($key));
     // The object is the same when another user loads it.
     $this->assertIdenticalObject($this->objects[2], $stores[1]->get($key));
-
-    // This user should be allowed to get, update, delete.
-    $this->assertTrue($stores[0]->getIfOwner($key) instanceof \stdClass);
-    $this->assertTrue($stores[0]->setIfOwner($key, $this->objects[1]));
-    $this->assertTrue($stores[0]->deleteIfOwner($key));
-
     // Another user can update the object and become the owner.
     $stores[1]->set($key, $this->objects[3]);
     $this->assertIdenticalObject($this->objects[3], $stores[0]->get($key));
@@ -140,11 +134,6 @@ public function testUserTempStore() {
     $metadata = $stores[0]->getMetadata($key);
     $this->assertEqual($users[1], $metadata->owner);
 
-    // The first user should no longer be allowed to get, update, delete.
-    $this->assertNull($stores[0]->getIfOwner($key));
-    $this->assertFalse($stores[0]->setIfOwner($key, $this->objects[1]));
-    $this->assertFalse($stores[0]->deleteIfOwner($key));
-
     // Now manually expire the item (this is not exposed by the API) and then
     // assert it is no longer accessible.
     db_update('key_value_expire')
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php b/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php
index 02c8d4d..754a08f 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserValidationTest.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Contains \Drupal\user\Tests\UserValidationTest.
+ * Definition of Drupal\user\Tests\UserValidationTest.
  */
 
 namespace Drupal\user\Tests;
@@ -160,8 +160,6 @@ protected function assertLengthViolation(EntityInterface $entity, $field_name, $
     $violations = $entity->validate();
     $this->assertEqual(count($violations), 1, "Violation found when $field_name is too long.");
     $this->assertEqual($violations[0]->getPropertyPath(), "$field_name.0.value");
-    $field_label = $entity->get($field_name)->getFieldDefinition()->getLabel();
-    $this->assertEqual($violations[0]->getMessage(), t('%name: may not be longer than @max characters.', array('%name' => $field_label, '@max' => $length)));
+    $this->assertEqual($violations[0]->getMessage(), t('This value is too long. It should have %limit characters or less.', array('%limit' => $length)));
   }
-
 }
diff --git a/core/modules/user/tests/Drupal/user/Tests/TempStoreTest.php b/core/modules/user/tests/Drupal/user/Tests/TempStoreTest.php
deleted file mode 100644
index af54c81..0000000
--- a/core/modules/user/tests/Drupal/user/Tests/TempStoreTest.php
+++ /dev/null
@@ -1,361 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\TempStoreTest.
- */
-
-namespace Drupal\user\Tests;
-
-use Drupal\Tests\UnitTestCase;
-use Drupal\user\TempStore;
-
-/**
- * Tests the TempStore namespace.
- *
- * @group Drupal
- * @group User
- *
- * @coversDefaultClass \Drupal\user\TempStore
- */
-class TempStoreTest extends UnitTestCase {
-
-  /**
-   * The mock key value expirable backend.
-   *
-   * @var \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $keyValue;
-
-  /**
-   * The mock lock backend.
-   *
-   * @var \Drupal\Core\Lock\LockBackendInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $lock;
-
-  /**
-   * The user temp store.
-   *
-   * @var \Drupal\user\TempStore
-   */
-  protected $tempStore;
-
-  /**
-   * The owner used in this test.
-   *
-   * @var int
-   */
-  protected $owner = 1;
-
-  /**
-   * A tempstore object belonging to the owner.
-   *
-   * @var \stdClass
-   */
-  protected $ownObject;
-
-  /**
-   * A tempstore object not belonging to the owner.
-   *
-   * @var \stdClass
-   */
-  protected $otherObject;
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'TempStore',
-      'description' => 'Unit tests the Drupal\user\TempStore class.',
-      'group' => 'User',
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    $this->keyValue = $this->getMock('Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface');
-    $this->lock = $this->getMock('Drupal\Core\Lock\LockBackendInterface');
-
-    $this->tempStore = new TempStore($this->keyValue, $this->lock, $this->owner);
-
-    $this->ownObject = (object) array(
-      'data' => 'test_data',
-      'owner' => $this->owner,
-      'updated' => REQUEST_TIME,
-    );
-
-    // Clone the object but change the owner.
-    $this->otherObject = clone $this->ownObject;
-    $this->otherObject->owner = 2;
-  }
-
-  /**
-   * @covers ::get()
-   */
-  public function testGet() {
-    $this->keyValue->expects($this->at(0))
-      ->method('get')
-      ->with('test_2')
-      ->will($this->returnValue(FALSE));
-    $this->keyValue->expects($this->at(1))
-      ->method('get')
-      ->with('test')
-      ->will($this->returnValue($this->ownObject));
-
-    $this->assertNull($this->tempStore->get('test_2'));
-    $this->assertSame($this->ownObject->data, $this->tempStore->get('test'));
-  }
-
-  /**
-   * Tests the getIfOwner() method.
-   *
-   * @covers ::getIfOwner()
-   */
-  public function testGetIfOwner() {
-    $this->keyValue->expects($this->at(0))
-      ->method('get')
-      ->with('test_2')
-      ->will($this->returnValue(FALSE));
-    $this->keyValue->expects($this->at(1))
-      ->method('get')
-      ->with('test')
-      ->will($this->returnValue($this->ownObject));
-    $this->keyValue->expects($this->at(2))
-      ->method('get')
-      ->with('test')
-      ->will($this->returnValue($this->otherObject));
-
-    $this->assertNull($this->tempStore->getIfOwner('test_2'));
-    $this->assertSame($this->ownObject->data, $this->tempStore->getIfOwner('test'));
-    $this->assertNull($this->tempStore->getIfOwner('test'));
-  }
-
-  /**
-   * Tests the set() method with no lock available.
-   *
-   * @covers ::set()
-   * @expectedException \Drupal\user\TempStoreException
-   */
-  public function testSetWithNoLockAvailable() {
-    $this->lock->expects($this->at(0))
-      ->method('acquire')
-      ->with('test')
-      ->will($this->returnValue(FALSE));
-    $this->lock->expects($this->at(1))
-      ->method('wait')
-      ->with('test');
-    $this->lock->expects($this->at(2))
-      ->method('acquire')
-      ->with('test')
-      ->will($this->returnValue(FALSE));
-
-    $this->keyValue->expects($this->once())
-      ->method('getCollectionName');
-
-    $this->tempStore->set('test', 'value');
-  }
-
-  /**
-   * Tests a successful set() call.
-   *
-   * @covers ::set()
-   */
-  public function testSet() {
-    $this->lock->expects($this->once())
-      ->method('acquire')
-      ->with('test')
-      ->will($this->returnValue(TRUE));
-    $this->lock->expects($this->never())
-      ->method('wait');
-    $this->lock->expects($this->once())
-      ->method('release')
-      ->with('test');
-
-    $this->keyValue->expects($this->once())
-      ->method('setWithExpire')
-      ->with('test', $this->ownObject, 604800);
-
-    $this->tempStore->set('test', 'test_data');
-  }
-
-  /**
-   * Tests the setIfNotExists() methods.
-   *
-   * @covers ::setIfNotExists()
-   */
-  public function testSetIfNotExists() {
-    $this->keyValue->expects($this->once())
-      ->method('setWithExpireIfNotExists')
-      ->with('test', $this->ownObject, 604800)
-      ->will($this->returnValue(TRUE));
-
-    $this->assertTrue($this->tempStore->setIfNotExists('test', 'test_data'));
-  }
-
-  /**
-   * Tests the setIfOwner() method when no key exists.
-   *
-   * @covers ::setIfOwner()
-   */
-  public function testSetIfOwnerWhenNotExists() {
-    $this->keyValue->expects($this->once())
-      ->method('setWithExpireIfNotExists')
-      ->will($this->returnValue(TRUE));
-
-    $this->assertTrue($this->tempStore->setIfOwner('test', 'test_data'));
-  }
-
-  /**
-   * Tests the setIfOwner() method when a key already exists but no object.
-   *
-   * @covers ::setIfOwner()
-   */
-  public function testSetIfOwnerNoObject() {
-    $this->keyValue->expects($this->once())
-      ->method('setWithExpireIfNotExists')
-      ->will($this->returnValue(FALSE));
-
-    $this->keyValue->expects($this->once())
-      ->method('get')
-      ->with('test')
-      ->will($this->returnValue(FALSE));
-
-    $this->assertFalse($this->tempStore->setIfOwner('test', 'test_data'));
-  }
-
-  /**
-   * Tests the setIfOwner() method with matching and non matching owners.
-   *
-   * @covers ::setIfOwner()
-   */
-  public function testSetIfOwner() {
-    $this->lock->expects($this->once())
-      ->method('acquire')
-      ->with('test')
-      ->will($this->returnValue(TRUE));
-
-    $this->keyValue->expects($this->exactly(2))
-      ->method('setWithExpireIfNotExists')
-      ->will($this->returnValue(FALSE));
-
-    $this->keyValue->expects($this->exactly(2))
-      ->method('get')
-      ->with('test')
-      ->will($this->onConsecutiveCalls($this->ownObject, $this->otherObject));
-
-    $this->assertTrue($this->tempStore->setIfOwner('test', 'test_data'));
-    $this->assertFalse($this->tempStore->setIfOwner('test', 'test_data'));
-  }
-
-  /**
-   * Tests the getMetadata() method.
-   *
-   * @covers ::getMetadata()
-   */
-  public function testGetMetadata() {
-    $this->keyValue->expects($this->at(0))
-      ->method('get')
-      ->with('test')
-      ->will($this->returnValue($this->ownObject));
-
-    $this->keyValue->expects($this->at(1))
-      ->method('get')
-      ->with('test')
-      ->will($this->returnValue(FALSE));
-
-    $metadata = $this->tempStore->getMetadata('test');
-    $this->assertObjectHasAttribute('owner', $metadata);
-    // Data should get removed.
-    $this->assertObjectNotHasAttribute('data', $metadata);
-
-    $this->assertNull($this->tempStore->getMetadata('test'));
-  }
-
-  /**
-   * Tests the delete() method.
-   *
-   * @covers ::delete()
-   */
-  public function testDelete() {
-    $this->lock->expects($this->once())
-      ->method('acquire')
-      ->with('test')
-      ->will($this->returnValue(TRUE));
-    $this->lock->expects($this->never())
-      ->method('wait');
-    $this->lock->expects($this->once())
-      ->method('release')
-      ->with('test');
-
-    $this->keyValue->expects($this->once())
-      ->method('delete')
-      ->with('test');
-
-    $this->tempStore->delete('test');
-  }
-
-  /**
-   * Tests the delete() method with no lock available.
-   *
-   * @covers ::delete()
-   * @expectedException \Drupal\user\TempStoreException
-   */
-  public function testDeleteWithNoLockAvailable() {
-    $this->lock->expects($this->at(0))
-      ->method('acquire')
-      ->with('test')
-      ->will($this->returnValue(FALSE));
-    $this->lock->expects($this->at(1))
-      ->method('wait')
-      ->with('test');
-    $this->lock->expects($this->at(2))
-      ->method('acquire')
-      ->with('test')
-      ->will($this->returnValue(FALSE));
-
-    $this->keyValue->expects($this->once())
-      ->method('getCollectionName');
-
-    $this->tempStore->delete('test');
-  }
-
-  /**
-   * Tests the deleteIfOwner() method.
-   *
-   * @covers ::deleteIfOwner()
-   */
-  public function testDeleteIfOwner() {
-    $this->lock->expects($this->once())
-      ->method('acquire')
-      ->with('test_2')
-      ->will($this->returnValue(TRUE));
-
-    $this->keyValue->expects($this->at(0))
-      ->method('get')
-      ->with('test_1')
-      ->will($this->returnValue(FALSE));
-    $this->keyValue->expects($this->at(1))
-      ->method('get')
-      ->with('test_2')
-      ->will($this->returnValue($this->ownObject));
-    $this->keyValue->expects($this->at(2))
-      ->method('delete')
-      ->with('test_2');
-    $this->keyValue->expects($this->at(3))
-      ->method('get')
-      ->with('test_3')
-      ->will($this->returnValue($this->otherObject));
-
-    $this->assertTrue($this->tempStore->deleteIfOwner('test_1'));
-    $this->assertTrue($this->tempStore->deleteIfOwner('test_2'));
-    $this->assertFalse($this->tempStore->deleteIfOwner('test_3'));
-  }
-
-}
-
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/BrokenHandlerTrait.php b/core/modules/views/lib/Drupal/views/Plugin/views/BrokenHandlerTrait.php
deleted file mode 100644
index e1623f7..0000000
--- a/core/modules/views/lib/Drupal/views/Plugin/views/BrokenHandlerTrait.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\views\Plugin\views\BrokenHandlerTrait.
- */
-
-namespace Drupal\views\Plugin\views;
-
-/**
- * A Trait for Views broken handlers.
- */
-trait BrokenHandlerTrait {
-
-  /**
-   * Returns this handlers name in the UI.
-   *
-   * @see \Drupal\views\Plugin\views\PluginBase::defineOptions().
-   */
-  public function adminLabel($short = FALSE) {
-    $args = array(
-      '@module' => $this->definition['original_configuration']['provider'],
-    );
-    return $this->isOptional() ? t('Optional handler is missing (Module: @module) …', $args) : t('Broken/missing handler (Module: @module) …', $args);
-  }
-
-  /**
-   * The option definition for this handler.
-   *
-   * @see \Drupal\views\Plugin\views\PluginBase::defineOptions().
-   */
-  public function defineOptions() {
-    return array();
-  }
-
-  /**
-   * Ensure the main table for this handler is in the query. This is used
-   * a lot.
-   *
-   * @see \Drupal\views\Plugin\views\HandlerBase::ensureMyTable().
-   */
-  public function ensureMyTable() {
-    // No table to ensure.
-  }
-
-  /**
-   * Modify the views query.
-   */
-  public function query($group_by = FALSE) {
-    /* No query to run */
-  }
-
-  /**
-   * Provides a form to edit options for this plugin.
-   *
-   * @see \Drupal\views\Plugin\views\PluginBase::defineOptions().
-   */
-  public function buildOptionsForm(&$form, &$form_state) {
-    if ($this->isOptional()) {
-      $description_top = t('The handler for this item is optional. The following details are available:');
-    }
-    else {
-      $description_top = t('The handler for this item is broken or missing. The following details are available:');
-    }
-
-    $items = array(
-      t('Module: @module', array('@module' => $this->definition['original_configuration']['provider'])),
-      t('Table: @table', array('@table' => $this->definition['original_configuration']['table'])),
-      t('Field: @field', array('@field' => $this->definition['original_configuration']['field'])),
-    );
-
-    $description_bottom = t('Enabling the appropriate module will may solve this issue. Otherwise, check to see if there is a module update available.');
-
-    $form['description'] = array(
-      '#type' => 'container',
-      '#attributes' => array(
-        'class' => array('form-item', 'description'),
-      ),
-      'description_top' => array(
-        '#markup' => '<p>' . $description_top . '</p>',
-      ),
-      'detail_list' => array(
-        '#theme' => 'item_list',
-        '#items' => $items,
-      ),
-      'description_bottom' => array(
-        '#markup' => '<p>' . $description_bottom . '</p>',
-      ),
-    );
-  }
-
-  /**
-   * Determines if the handler is considered 'broken'.
-   *
-   * This means it's a placeholder used when a handler can't be found.
-   *
-   * @see \Drupal\views\Plugin\views\HandlerBase::broken().
-   */
-  public function broken() {
-    return TRUE;
-  }
-
-}
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/Broken.php
index 6a0967c..dff668b 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/area/Broken.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/Broken.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\views\Plugin\views\area;
 
-use Drupal\views\Plugin\views\BrokenHandlerTrait;
-
 /**
  * A special handler to take the place of missing or broken handlers.
  *
@@ -17,7 +15,30 @@
  * @PluginID("broken")
  */
 class Broken extends AreaPluginBase {
-  use BrokenHandlerTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function adminLabel($short = FALSE) {
+    $args = array(
+      '@module' => $this->definition['original_configuration']['provider'],
+    );
+    return $this->isOptional() ? t('Optional handler is missing (Module: @module) …', $args) : t('Broken/missing handler (Module: @module) …', $args);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function defineOptions() {
+    return array();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function ensureMyTable() {
+    // No table to ensure.
+  }
 
   /**
    * {@inheritdoc}
@@ -27,4 +48,48 @@ public function render($empty = FALSE) {
     return array();
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function buildOptionsForm(&$form, &$form_state) {
+    if ($this->isOptional()) {
+      $description_top = t('The handler for this item is optional. The following details are available:');
+    }
+    else {
+      $description_top = t('The handler for this item is broken or missing. The following details are available:');
+    }
+
+    $items = array(
+      t('Module: @module', array('@module' => $this->definition['original_configuration']['provider'])),
+      t('Table: @table', array('@table' => $this->definition['original_configuration']['table'])),
+      t('Field: @field', array('@field' => $this->definition['original_configuration']['field'])),
+    );
+
+    $description_bottom = t('Enabling the appropriate module will may solve this issue. Otherwise, check to see if there is a module update available.');
+
+    $form['description'] = array(
+      '#type' => 'container',
+      '#attributes' => array(
+        'class' => array('form-item', 'description'),
+      ),
+      'description_top' => array(
+        '#markup' => '<p>' . $description_top . '</p>',
+      ),
+      'detail_list' => array(
+        '#theme' => 'item_list',
+        '#items' => $items,
+      ),
+      'description_bottom' => array(
+        '#markup' => '<p>' . $description_bottom . '</p>',
+      ),
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function broken() {
+    return TRUE;
+  }
+
 }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/Broken.php
index f9f90ac..9e82624 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/argument/Broken.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/Broken.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\views\Plugin\views\argument;
 
-use Drupal\views\Plugin\views\BrokenHandlerTrait;
-
 /**
  * A special handler to take the place of missing or broken handlers.
  *
@@ -17,6 +15,58 @@
  * @PluginID("broken")
  */
 class Broken extends ArgumentPluginBase {
-  use BrokenHandlerTrait;
+
+  public function adminLabel($short = FALSE) {
+    $args = array(
+      '@module' => $this->definition['original_configuration']['provider'],
+    );
+    return $this->isOptional() ? t('Optional handler is missing (Module: @module) …', $args) : t('Broken/missing handler (Module: @module) …', $args);
+  }
+
+  public function defineOptions() { return array(); }
+  public function ensureMyTable() { /* No table to ensure! */ }
+  public function query($group_by = FALSE) { /* No query to run */ }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildOptionsForm(&$form, &$form_state) {
+    if ($this->isOptional()) {
+      $description_top = t('The handler for this item is optional. The following details are available:');
+    }
+    else {
+      $description_top = t('The handler for this item is broken or missing. The following details are available:');
+    }
+
+    $items = array(
+      t('Module: @module', array('@module' => $this->definition['original_configuration']['provider'])),
+      t('Table: @table', array('@table' => $this->definition['original_configuration']['table'])),
+      t('Field: @field', array('@field' => $this->definition['original_configuration']['field'])),
+    );
+
+    $description_bottom = t('Enabling the appropriate module will may solve this issue. Otherwise, check to see if there is a module update available.');
+
+    $form['description'] = array(
+      '#type' => 'container',
+      '#attributes' => array(
+        'class' => array('form-item', 'description'),
+      ),
+      'description_top' => array(
+        '#markup' => '<p>' . $description_top . '</p>',
+      ),
+      'detail_list' => array(
+        '#theme' => 'item_list',
+        '#items' => $items,
+      ),
+      'description_bottom' => array(
+        '#markup' => '<p>' . $description_bottom . '</p>',
+      ),
+    );
+  }
+
+  /**
+   * Determine if the handler is considered 'broken'
+   */
+  public function broken() { return TRUE; }
 
 }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/Broken.php
index c76431e..062927f 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/field/Broken.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/Broken.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\views\Plugin\views\field;
 
-use Drupal\views\Plugin\views\BrokenHandlerTrait;
-
 /**
  * A special handler to take the place of missing or broken handlers.
  *
@@ -17,6 +15,58 @@
  * @PluginID("broken")
  */
 class Broken extends FieldPluginBase {
-  use BrokenHandlerTrait;
+
+  public function adminLabel($short = FALSE) {
+    $args = array(
+      '@module' => $this->definition['original_configuration']['provider'],
+    );
+    return $this->isOptional() ? t('Optional handler is missing (Module: @module) …', $args) : t('Broken/missing handler (Module: @module) …', $args);
+  }
+
+  public function defineOptions() { return array(); }
+  public function ensureMyTable() { /* No table to ensure! */ }
+  public function query($group_by = FALSE) { /* No query to run */ }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildOptionsForm(&$form, &$form_state) {
+    if ($this->isOptional()) {
+      $description_top = t('The handler for this item is optional. The following details are available:');
+    }
+    else {
+      $description_top = t('The handler for this item is broken or missing. The following details are available:');
+    }
+
+    $items = array(
+      t('Module: @module', array('@module' => $this->definition['original_configuration']['provider'])),
+      t('Table: @table', array('@table' => $this->definition['original_configuration']['table'])),
+      t('Field: @field', array('@field' => $this->definition['original_configuration']['field'])),
+    );
+
+    $description_bottom = t('Enabling the appropriate module will may solve this issue. Otherwise, check to see if there is a module update available.');
+
+    $form['description'] = array(
+      '#type' => 'container',
+      '#attributes' => array(
+        'class' => array('form-item', 'description'),
+      ),
+      'description_top' => array(
+        '#markup' => '<p>' . $description_top . '</p>',
+      ),
+      'detail_list' => array(
+        '#theme' => 'item_list',
+        '#items' => $items,
+      ),
+      'description_bottom' => array(
+        '#markup' => '<p>' . $description_bottom . '</p>',
+      ),
+    );
+  }
+
+  /**
+   * Determine if the handler is considered 'broken'
+   */
+  public function broken() { return TRUE; }
 
 }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/Broken.php
index 2a4abcf..e4b1333 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/Broken.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/Broken.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\views\Plugin\views\filter;
 
-use Drupal\views\Plugin\views\BrokenHandlerTrait;
 use Drupal\views\Plugin\views\display\DisplayPluginBase;
 use Drupal\views\ViewExecutable;
 
@@ -19,12 +18,64 @@
  * @PluginID("broken")
  */
 class Broken extends FilterPluginBase {
-  use BrokenHandlerTrait;
 
   /**
-   * {@inheritdoc}
+   * Overrides \Drupal\views\Plugin\views\filter\FilterPluginBase::init().
    */
   public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
   }
 
+  public function adminLabel($short = FALSE) {
+    $args = array(
+      '@module' => $this->definition['original_configuration']['provider'],
+    );
+    return $this->isOptional() ? t('Optional handler is missing (Module: @module) …', $args) : t('Broken/missing handler (Module: @module) …', $args);
+  }
+
+  public function defineOptions() { return array(); }
+  public function ensureMyTable() { /* No table to ensure! */ }
+  public function query($group_by = FALSE) { /* No query to run */ }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildOptionsForm(&$form, &$form_state) {
+    if ($this->isOptional()) {
+      $description_top = t('The handler for this item is optional. The following details are available:');
+    }
+    else {
+      $description_top = t('The handler for this item is broken or missing. The following details are available:');
+    }
+
+    $items = array(
+      t('Module: @module', array('@module' => $this->definition['original_configuration']['provider'])),
+      t('Table: @table', array('@table' => $this->definition['original_configuration']['table'])),
+      t('Field: @field', array('@field' => $this->definition['original_configuration']['field'])),
+    );
+
+    $description_bottom = t('Enabling the appropriate module will may solve this issue. Otherwise, check to see if there is a module update available.');
+
+    $form['description'] = array(
+      '#type' => 'container',
+      '#attributes' => array(
+        'class' => array('form-item', 'description'),
+      ),
+      'description_top' => array(
+        '#markup' => '<p>' . $description_top . '</p>',
+      ),
+      'detail_list' => array(
+        '#theme' => 'item_list',
+        '#items' => $items,
+      ),
+      'description_bottom' => array(
+        '#markup' => '<p>' . $description_bottom . '</p>',
+      ),
+    );
+  }
+
+  /**
+   * Determine if the handler is considered 'broken'
+   */
+  public function broken() { return TRUE; }
+
 }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/Broken.php
index 16ee48c..19d49c7 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/Broken.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/Broken.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\views\Plugin\views\relationship;
 
-use Drupal\views\Plugin\views\BrokenHandlerTrait;
-
 /**
  * A special handler to take the place of missing or broken handlers.
  *
@@ -17,6 +15,80 @@
  * @PluginID("broken")
  */
 class Broken extends RelationshipPluginBase {
-  use BrokenHandlerTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function adminLabel($short = FALSE) {
+    $args = array(
+      '@module' => $this->definition['original_configuration']['provider'],
+    );
+    return $this->isOptional() ? t('Optional handler is missing (Module: @module) …', $args) : t('Broken/missing handler (Module: @module) …', $args);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function defineOptions() {
+    return array();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function ensureMyTable() {
+    // No table to ensure.
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function query() {
+    // No query to run.
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildOptionsForm(&$form, &$form_state) {
+    if ($this->isOptional()) {
+      $description_top = t('The handler for this item is optional. The following details are available:');
+    }
+    else {
+      $description_top = t('The handler for this item is broken or missing. The following details are available:');
+    }
+
+    $items = array(
+      t('Module: @module', array('@module' => $this->definition['original_configuration']['provider'])),
+      t('Table: @table', array('@table' => $this->definition['original_configuration']['table'])),
+      t('Field: @field', array('@field' => $this->definition['original_configuration']['field'])),
+    );
+
+    $description_bottom = t('Enabling the appropriate module will may solve this issue. Otherwise, check to see if there is a module update available.');
+
+    $form['description'] = array(
+      '#type' => 'container',
+      '#attributes' => array(
+        'class' => array('form-item', 'description'),
+      ),
+      'description_top' => array(
+        '#markup' => '<p>' . $description_top . '</p>',
+      ),
+      'detail_list' => array(
+        '#theme' => 'item_list',
+        '#items' => $items,
+      ),
+      'description_bottom' => array(
+        '#markup' => '<p>' . $description_bottom . '</p>',
+      ),
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function broken() {
+    return TRUE;
+  }
 
 }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/sort/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/sort/Broken.php
index a702625..234ee57 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/sort/Broken.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/sort/Broken.php
@@ -7,8 +7,6 @@
 
 namespace Drupal\views\Plugin\views\sort;
 
-use Drupal\views\Plugin\views\BrokenHandlerTrait;
-
 /**
  * A special handler to take the place of missing or broken handlers.
  *
@@ -17,6 +15,58 @@
  * @PluginID("broken")
  */
 class Broken extends SortPluginBase {
-  use BrokenHandlerTrait;
+
+  public function adminLabel($short = FALSE) {
+    $args = array(
+      '@module' => $this->definition['original_configuration']['provider'],
+    );
+    return $this->isOptional() ? t('Optional handler is missing (Module: @module) …', $args) : t('Broken/missing handler (Module: @module) …', $args);
+  }
+
+  public function defineOptions() { return array(); }
+  public function ensureMyTable() { /* No table to ensure! */ }
+  public function query($group_by = FALSE) { /* No query to run */ }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildOptionsForm(&$form, &$form_state) {
+    if ($this->isOptional()) {
+      $description_top = t('The handler for this item is optional. The following details are available:');
+    }
+    else {
+      $description_top = t('The handler for this item is broken or missing. The following details are available:');
+    }
+
+    $items = array(
+      t('Module: @module', array('@module' => $this->definition['original_configuration']['provider'])),
+      t('Table: @table', array('@table' => $this->definition['original_configuration']['table'])),
+      t('Field: @field', array('@field' => $this->definition['original_configuration']['field'])),
+    );
+
+    $description_bottom = t('Enabling the appropriate module will may solve this issue. Otherwise, check to see if there is a module update available.');
+
+    $form['description'] = array(
+      '#type' => 'container',
+      '#attributes' => array(
+        'class' => array('form-item', 'description'),
+      ),
+      'description_top' => array(
+        '#markup' => '<p>' . $description_top . '</p>',
+      ),
+      'detail_list' => array(
+        '#theme' => 'item_list',
+        '#items' => $items,
+      ),
+      'description_bottom' => array(
+        '#markup' => '<p>' . $description_bottom . '</p>',
+      ),
+    );
+  }
+
+  /**
+   * Determine if the handler is considered 'broken'
+   */
+  public function broken() { return TRUE; }
 
 }
diff --git a/core/themes/bartik/templates/maintenance-page.html.twig b/core/themes/bartik/templates/maintenance-page.html.twig
index b29cafa..031f073 100644
--- a/core/themes/bartik/templates/maintenance-page.html.twig
+++ b/core/themes/bartik/templates/maintenance-page.html.twig
@@ -3,7 +3,7 @@
  * @file
  * Bartik's theme implementation to display a single Drupal page while offline.
  *
- * All of the available variables are mirrored in html.html.twig.
+ * All of the available variables are mirrored in page.html.twig.
  *
  * @see template_preprocess_maintenance_page()
  *
diff --git a/core/themes/seven/templates/install-page.html.twig b/core/themes/seven/install-page.html.twig
similarity index 92%
rename from core/themes/seven/templates/install-page.html.twig
rename to core/themes/seven/install-page.html.twig
index 81ddece..1e9a1c2 100644
--- a/core/themes/seven/templates/install-page.html.twig
+++ b/core/themes/seven/install-page.html.twig
@@ -13,14 +13,14 @@
  */
 #}
 <!DOCTYPE html>
-<html{{ html_attributes }} class="install-background">
+<html lang="{{ language.langcode }}" dir="{{ language.dir }}" class="install-background">
 <head>
   {{ head }}
   <title>{{ head_title }}</title>
   {{ styles }}
   {{ scripts }}
 </head>
-<body class="{{ attributes.class }}">
+<body class="install-page">
 
 <div class="l-container">
 
diff --git a/core/themes/seven/templates/maintenance-page.html.twig b/core/themes/seven/templates/maintenance-page.html.twig
index dc691c1..b962317 100644
--- a/core/themes/seven/templates/maintenance-page.html.twig
+++ b/core/themes/seven/templates/maintenance-page.html.twig
@@ -3,7 +3,7 @@
  * @file
  * Seven's theme implementation to display a single Drupal page while offline.
  *
- * All of the available variables are mirrored in html.html.twig.
+ * All of the available variables are mirrored in page.html.twig.
  *
  * @see template_preprocess_maintenance_page()
  * @see seven_preprocess_maintenance_page()
diff --git a/core/update.php b/core/update.php
index c0f1139..433d5cf 100644
--- a/core/update.php
+++ b/core/update.php
@@ -54,12 +54,13 @@ function update_selection_page() {
   // Make sure there is no stale theme registry.
   \Drupal::cache()->deleteAll();
 
-  $build = \Drupal::formBuilder()->getForm('Drupal\Core\Update\Form\UpdateScriptSelectionForm');
-  $build['#title'] = 'Drupal database update';
+  drupal_set_title('Drupal database update');
+  $elements = \Drupal::formBuilder()->getForm('Drupal\Core\Update\Form\UpdateScriptSelectionForm');
+  $output = drupal_render($elements);
 
   update_task_list('select');
 
-  return $build;
+  return $output;
 }
 
 /**
@@ -97,6 +98,7 @@ function update_flush_all_caches() {
  * Displays results of the update script with any accompanying errors.
  */
 function update_results_page() {
+  drupal_set_title('Drupal database update');
 
   update_task_list();
   // Report end result.
@@ -176,11 +178,7 @@ function update_results_page() {
   unset($_SESSION['update_results']);
   unset($_SESSION['update_success']);
 
-  $build = array(
-    '#title' => 'Drupal database update',
-    '#markup' => $output,
-  );
-  return $build;
+  return $output;
 }
 
 /**
@@ -201,6 +199,7 @@ function update_info_page() {
   $keyvalue->get('update_available_release')->deleteAll();
 
   update_task_list('info');
+  drupal_set_title('Drupal database update');
   $token = drupal_get_token('update');
   $output = '<p>Use this utility to update your database whenever a new release of Drupal or a module is installed.</p><p>For more detailed information, see the <a href="http://drupal.org/upgrade">upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.</p>';
   $output .= "<ol>\n";
@@ -213,12 +212,7 @@ function update_info_page() {
   $form_action = check_url(drupal_current_script_url(array('op' => 'selection', 'token' => $token)));
   $output .= '<form method="post" action="' . $form_action . '"><p><input type="submit" value="Continue" class="form-submit button button-primary" /></p></form>';
   $output .= "\n";
-
-  $build = array(
-    '#title' => 'Drupal database update',
-    '#markup' => $output,
-  );
-  return $build;
+  return $output;
 }
 
 /**
@@ -231,19 +225,14 @@ function update_access_denied_page() {
   drupal_add_http_header('Status', '403 Forbidden');
   header(\Drupal::request()->server->get('SERVER_PROTOCOL') . ' 403 Forbidden');
   watchdog('access denied', 'update.php', NULL, WATCHDOG_WARNING);
-  $output = '<p>Access denied. You are not authorized to access this page. Log in using either an account with the <em>administer software updates</em> permission or the site maintenance account (the account you created during installation). If you cannot log in, you will have to edit <code>settings.php</code> to bypass this access check. To do this:</p>
+  drupal_set_title('Access denied');
+  return '<p>Access denied. You are not authorized to access this page. Log in using either an account with the <em>administer software updates</em> permission or the site maintenance account (the account you created during installation). If you cannot log in, you will have to edit <code>settings.php</code> to bypass this access check. To do this:</p>
 <ol>
  <li>With a text editor find the settings.php file on your system. From the main Drupal directory that you installed all the files into, go to <code>sites/your_site_name</code> if such directory exists, or else to <code>sites/default</code> which applies otherwise.</li>
  <li>There is a line inside your settings.php file that says <code>$settings[\'update_free_access\'] = FALSE;</code>. Change it to <code>$settings[\'update_free_access\'] = TRUE;</code>.</li>
  <li>As soon as the update.php script is done, you must change the settings.php file back to its original form with <code>$settings[\'update_free_access\'] = FALSE;</code>.</li>
  <li>To avoid having this problem in the future, remember to log in to your website using either an account with the <em>administer software updates</em> permission or the site maintenance account (the account you created during installation) before you backup your database at the beginning of the update process.</li>
 </ol>';
-
-  $build = array(
-    '#title' => 'Access denied',
-    '#markup' => $output,
-  );
-  return $build;
 }
 
 /**
@@ -463,16 +452,9 @@ function update_task_list($active = NULL) {
     drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
     $maintenance_page = array(
       '#theme' => 'maintenance_page',
-      // $output has to be rendered here, because the maintenance page template
-      // is not wrapped into the html template, which means that any #attached
-      // libraries in $output will not be loaded, because the wrapping HTML has
-      // been printed already.
-      '#content' => drupal_render($output),
+      '#content' => $output,
       '#show_messages' => !$progress_page,
     );
-    if (isset($output['#title'])) {
-      $maintenance_page['#page']['#title'] = $output['#title'];
-    }
     print drupal_render($maintenance_page);
   }
 }
