diff --git a/core/includes/batch.inc b/core/includes/batch.inc
index ff0b4cb..473c1f2 100644
--- a/core/includes/batch.inc
+++ b/core/includes/batch.inc
@@ -258,7 +258,7 @@ function _batch_process() {
     // through the remaining sets, marking them 'successfully processed'
     // along the way, until we find a set that contains operations.
     // _batch_next_set() executes form submit handlers stored in 'control'
-    // sets (see form_execute_handlers()), which can in turn add new sets to
+    // sets (see form_execute_handlers()), which can in turn add sets to
     // the batch.
     $set_changed = FALSE;
     $old_set = $current_set;
@@ -356,7 +356,7 @@ function _batch_api_percentage($total, $current) {
     $percentage = "100";
   }
   else {
-    // We add a new digit at 200, 2000, etc. (since, for example, 199/200
+    // We add a digit at 200, 2000, etc. (since, for example, 199/200
     // would round up to 100% if we didn't).
     $decimal_places = max(0, floor(log10($total / 2.0)) - 1);
     do {
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index ce64e46..7dc75f5 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1697,8 +1697,8 @@ function watchdog($type, $message, array $variables = NULL, $severity = WATCHDOG
 /**
  * Sets a message to display to the user.
  *
- * Messages are stored in a session variable and displayed in the page template
- * via the $messages theme variable.
+ * Messages are stored in a session variable and displayed in page.tpl.php via
+ * the $messages theme variable.
  *
  * Example usage:
  * @code
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 8b9d9e3..eabc080 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -4994,14 +4994,14 @@ function drupal_pre_render_link($element) {
  *
  * In this example, the links are grouped by functionality, which can be
  * helpful to themers who want to display certain kinds of links independently.
- * For example, adding this code to node.html.twig will result in the comment
+ * For example, adding this code to node.tpl.php will result in the comment
  * links being rendered as a single list:
  * @code
  * print render($content['links']['comment']);
  * @endcode
  *
  * (where $node->content has been transformed into $content before handing
- * control to the node.html.twig template).
+ * control to the node.tpl.php template).
  *
  * The pre_render function defined here allows the above flexibility, but also
  * allows the following code to be used to render all remaining links into a
@@ -5065,7 +5065,7 @@ function drupal_pre_render_dropbutton($element) {
  *   A string or array representing the content of a page. The array consists of
  *   the following keys:
  *   - #type: Value is always 'page'. This pushes the theming through
- *     the page template (required).
+ *     page.tpl.php (required).
  *   - #show_messages: Suppress drupal_get_message() items. Used by Batch
  *     API (optional).
  *
diff --git a/core/includes/entity.api.php b/core/includes/entity.api.php
index 1912fe1..148f11d 100644
--- a/core/includes/entity.api.php
+++ b/core/includes/entity.api.php
@@ -344,7 +344,7 @@ function hook_entity_view(\Drupal\Core\Entity\EntityInterface $entity, \Drupal\e
  * If a module wishes to act on the rendered HTML of the entity rather than the
  * structured content array, it may use this hook to add a #post_render
  * callback. Alternatively, it could also implement hook_preprocess_HOOK() for
- * the particular entity type template, if there is one (e.g., node.html.twig).
+ * the particular entity type template, if there is one (e.g., node.tpl.php).
  * See drupal_render() and theme() for details.
  *
  * @param $build
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 782b562..ca626d8 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -743,7 +743,6 @@ function list_themes($refresh = FALSE) {
 
   if (empty($list)) {
     $list = array();
-    $themes = array();
     // Extract from the database only when it is available.
     // Also check that the site is not in the middle of an install or update.
     if (!defined('MAINTENANCE_MODE')) {
@@ -2198,7 +2197,6 @@ function theme_table($variables) {
       // Build colgroup
       if (is_array($cols) && count($cols)) {
         $output .= ' <colgroup' . new Attribute($attributes) . '>';
-        $i = 0;
         foreach ($cols as $col) {
           $output .= ' <col' . new Attribute($col) . ' />';
         }
@@ -2261,7 +2259,7 @@ function theme_table($variables) {
     $output .= "<tbody>\n";
     $flip = array('even' => 'odd', 'odd' => 'even');
     $class = 'even';
-    foreach ($rows as $number => $row) {
+    foreach ($rows as $row) {
       // Check if we're dealing with a simple or complex row
       if (isset($row['data'])) {
         $cells = $row['data'];
@@ -2671,8 +2669,6 @@ function _theme_table_cell($cell, $header = FALSE) {
  * @see template_process()
  */
 function template_preprocess(&$variables, $hook) {
-  global $user;
-
   // Tell all templates where they are located.
   $variables['directory'] = path_to_theme();
 
@@ -2725,15 +2721,10 @@ function _template_preprocess_default_variables() {
 }
 
 /**
- * Prepares variables for HTML document templates.
- *
- * Default template: html.html.twig.
- *
- * @param array $variables
- *   An associative array containing:
- *   - page: A render element representing the page.
+ * Preprocess variables for html.tpl.php
  *
  * @see system_elements()
+ * @see html.tpl.php
  */
 function template_preprocess_html(&$variables) {
   $language_interface = language(LANGUAGE_TYPE_INTERFACE);
@@ -2852,12 +2843,10 @@ function template_preprocess_html(&$variables) {
 }
 
 /**
- * Prepares variables for the page template.
- *
- * Default template: page.html.twig.
+ * Preprocess variables for page.tpl.php
  *
- * Most themes utilize their own copy of page.html.twig. The default is located
- * inside "modules/system/page.html.twig". Look in there for the full list of
+ * Most themes utilize their own copy of page.tpl.php. The default is located
+ * inside "modules/system/page.tpl.php". Look in there for the full list of
  * variables.
  *
  * Uses the arg() function to generate a series of page template suggestions
@@ -2868,6 +2857,7 @@ function template_preprocess_html(&$variables) {
  *
  * @see drupal_render_page()
  * @see template_process_page()
+ * @see page.tpl.php
  */
 function template_preprocess_page(&$variables) {
   $language_interface = language(LANGUAGE_TYPE_INTERFACE);
@@ -2904,36 +2894,6 @@ function template_preprocess_page(&$variables) {
   $variables['site_slogan']       = (theme_get_setting('features.slogan') ? filter_xss_admin($site_config->get('slogan')) : '');
   $variables['tabs']              = menu_local_tabs();
 
-  // Pass the main menu and secondary menu to the template as render arrays.
-  if (!empty($variables['main_menu'])) {
-    $variables['main_menu'] = array(
-      '#theme' =>'links__system_main_menu',
-      '#links' => $variables['main_menu'],
-      '#attributes' => array(
-        'id' => 'main-menu',
-        'class' => array('links', 'inline', 'clearfix'),
-      ),
-      '#heading' => array(
-        'text' => t('Main menu'),
-        'class' => array('element-invisible'),
-      )
-    );
-  }
-  if (!empty($variables['secondary_menu'])) {
-    $variables['secondary_menu'] = array(
-      '#theme' =>'links__system_secondary_menu',
-      '#links' => $variables['secondary_menu'],
-      '#attributes' => array(
-        'id' => 'secondary-menu',
-        'class' => array('links', 'inline', 'clearfix'),
-      ),
-      '#heading' => array(
-        'text' => t('Secondary menu'),
-        'class' => array('element-invisible'),
-      )
-    );
-  }
-
   if ($node = menu_get_object()) {
     $variables['node'] = $node;
   }
@@ -2945,12 +2905,13 @@ function template_preprocess_page(&$variables) {
 }
 
 /**
- * Processes variables for page.html.twig.
+ * Process variables for page.tpl.php
  *
  * Perform final addition of variables before passing them into the template.
  * To customize these variables, simply set them in an earlier step.
  *
  * @see template_preprocess_page()
+ * @see page.tpl.php
  */
 function template_process_page(&$variables) {
   if (!isset($variables['breadcrumb'])) {
@@ -2958,10 +2919,7 @@ function template_process_page(&$variables) {
     // re-use the cache of an already rendered menu containing the active link
     // for the current page.
     // @see menu_tree_page_data()
-    $variables['breadcrumb'] = array(
-      '#theme' => 'breadcrumb',
-      '#breadcrumb' => drupal_get_breadcrumb(),
-    );
+    $variables['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb()));
   }
   if (!isset($variables['title'])) {
     $variables['title'] = drupal_get_title();
@@ -2970,26 +2928,27 @@ function template_process_page(&$variables) {
   // Generate messages last in order to capture as many as possible for the
   // current page.
   if (!isset($variables['messages'])) {
-    $variables['messages'] = $variables['show_messages'] ? array('#theme' => 'status_messages') : '';
+    $variables['messages'] = $variables['show_messages'] ? theme('status_messages') : '';
   }
 }
 
 /**
- * Processes variables for html.html.twig.
+ * Process variables for html.tpl.php
  *
  * Perform final addition and modification of variables before passing into
  * the template. To customize these variables, call drupal_render() on elements
  * in $variables['page'] during THEME_preprocess_page().
  *
  * @see template_preprocess_html()
+ * @see html.tpl.php
  */
 function template_process_html(&$variables) {
   drupal_add_library('system', 'html5shiv', TRUE);
   // Render page_top and page_bottom into top level variables.
-  $variables['page_top'] = isset($variables['page']['page_top']) ? drupal_render($variables['page']['page_top']) : '';
-  $variables['page_bottom'] = isset($variables['page']['page_bottom']) ? drupal_render($variables['page']['page_bottom']) : '';
+  $variables['page_top'] = drupal_render($variables['page']['page_top']);
+  $variables['page_bottom'] = drupal_render($variables['page']['page_bottom']);
   // Place the rendered HTML for the page body into a top level variable.
-  $variables['page'] = $variables['page']['#children'];
+  $variables['page']              = $variables['page']['#children'];
   $variables['page_bottom'] .= drupal_get_js('footer');
 
   $variables['head']    = drupal_get_html_head();
@@ -3069,19 +3028,18 @@ function theme_get_suggestions($args, $base, $delimiter = '__') {
 }
 
 /**
- * Prepare variables for maintenance page templates.
- *
- * Default template: maintenance-page.html.twig.
+ * Process variables for maintenance-page.tpl.php.
  *
  * The variables array generated here is a mirror of
  * template_preprocess_page(). This preprocessor will run its course when
  * theme_maintenance_page() is invoked. An alternate template file of
- * maintenance-page--offline.html.twig can be used when the database is offline
- * to hide errors and completely replace the content.
+ * maintenance-page--offline.tpl.php can be used when the database is offline to
+ * hide errors and completely replace the content.
  *
- * @param array $variables
- *   An associative array containing:
- *   - content - An array of page content.
+ * The $variables array contains the following arguments:
+ * - $content
+ *
+ * @see maintenance-page.tpl.php
  */
 function template_preprocess_maintenance_page(&$variables) {
   global $theme;
@@ -3179,7 +3137,7 @@ function template_preprocess_maintenance_page(&$variables) {
  * The variables array generated here is a mirror of template_process_html().
  * This processor will run its course when theme_maintenance_page() is invoked.
  *
- * @see maintenance-page.html.twig
+ * @see maintenance-page.tpl.php
  * @see template_process_html()
  */
 function template_process_maintenance_page(&$variables) {
diff --git a/core/misc/drupal.js b/core/misc/drupal.js
index 9c86a0a..6ea7b45 100644
--- a/core/misc/drupal.js
+++ b/core/misc/drupal.js
@@ -1,4 +1,4 @@
-window.Drupal = { behaviors: {}, locale: {} };
+var Drupal = { behaviors: {}, locale: {} };
 
 // Class indicating that JS is enabled; used for styling purpose.
 document.documentElement.className += ' js';
diff --git a/core/misc/form.js b/core/misc/form.js
index d97559d..7999188 100644
--- a/core/misc/form.js
+++ b/core/misc/form.js
@@ -66,6 +66,7 @@ Drupal.behaviors.fillUserInfoFromCookie = {
   attach: function (context, settings) {
     var userInfo = ['name', 'mail', 'homepage'];
     $('form.user-info-from-cookie').once('user-info-from-cookie', function () {
+      var formContext = this;
       var $formContext = $(this);
       var i, il, $element, cookie;
       for (i = 0, il = userInfo.length; i < il; i += 1) {
diff --git a/core/misc/progress.js b/core/misc/progress.js
index 2e3a878..5fc2110 100644
--- a/core/misc/progress.js
+++ b/core/misc/progress.js
@@ -13,6 +13,7 @@
  *      some_element.appendChild(pb.element);
  */
 Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) {
+  var pb = this;
   this.id = id;
   this.method = method || 'GET';
   this.updateCallback = updateCallback;
diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js
index 5254224..63989db 100644
--- a/core/misc/tabledrag.js
+++ b/core/misc/tabledrag.js
@@ -522,7 +522,7 @@ Drupal.tableDrag.prototype.dragStart = function (event, self, item) {
   if (self.oldRowElement) {
     $(self.oldRowElement).removeClass('drag-previous');
   }
-};
+}
 
 /**
  * Pointer movement handler, bound to document.
@@ -671,6 +671,7 @@ Drupal.tableDrag.prototype.findDropTargetRow = function (x, y) {
   for (var n = 0; n < rows.length; n++) {
     var row = rows[n];
     var $row = $(row);
+    var indentDiff = 0;
     var rowY = $row.offset().top;
     var rowHeight;
     // Because Safari does not report offsetHeight on table rows, but does on
diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module
index 221b921..bd65f4f 100644
--- a/core/modules/aggregator/aggregator.module
+++ b/core/modules/aggregator/aggregator.module
@@ -539,7 +539,7 @@ function aggregator_filter_xss($value) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function aggregator_preprocess_block(&$variables) {
   if ($variables['configuration']['module'] == 'aggregator') {
diff --git a/core/modules/aggregator/aggregator.pages.inc b/core/modules/aggregator/aggregator.pages.inc
index 32509ce..10ba125 100644
--- a/core/modules/aggregator/aggregator.pages.inc
+++ b/core/modules/aggregator/aggregator.pages.inc
@@ -281,14 +281,9 @@ function theme_aggregator_summary_item($variables) {
 }
 
 /**
- * Prepares variables for aggregator item templates.
+ * Processes variables for aggregator-item.tpl.php.
  *
- * Default template: aggregator-item.html.twig.
- *
- * @param array $variables
- *   An associative array containing:
- *   - aggregator_item: An individual feed item for display on the aggregator
- *     page.
+ * @see aggregator-item.tpl.php
  */
 function template_preprocess_aggregator_item(&$variables) {
   $item = $variables['aggregator_item'];
@@ -314,8 +309,6 @@ function template_preprocess_aggregator_item(&$variables) {
   foreach ($item->categories as $category) {
     $variables['categories'][$category->cid] = l($category->title, 'aggregator/categories/' . $category->cid);
   }
-
-  $variables['attributes']['class'][] = 'feed-item';
 }
 
 /**
@@ -522,15 +515,9 @@ function theme_aggregator_page_opml($variables) {
 }
 
 /**
- * Prepares variables for aggregator summary templates.
+ * Processes variables for aggregator-summary-items.tpl.php.
  *
- * Default template: aggregator-summary-items.html.twig.
- *
- * @param array $variables
- *   An associative array containing:
- *   - source: A Drupal\aggregator\Plugin\Core\Entity\Feed instance representing
- *     the feed source.
- *   - summary_items: An array of feed items.
+ * @see aggregator-summary-items.tpl.php
  */
 function template_preprocess_aggregator_summary_items(&$variables) {
   $variables['title'] = check_plain($variables['source'] instanceof EntityInterface ? $variables['source']->label() : $variables['source']->title);
@@ -546,14 +533,9 @@ function template_preprocess_aggregator_summary_items(&$variables) {
 }
 
 /**
- * Processes variables for aggregator summary item templates.
+ * Processes variables for aggregator-summary-item.tpl.php.
  *
- * Default template: aggregator-summary-item.html.twig.
- *
- * @param array $variables
- *   An associative array containing:
- *   - aggregator_item: The feed item.
- *   - view_mode: How the item is being displayed.
+ * @see aggregator-summary-item.tpl.php
  */
 function template_preprocess_aggregator_summary_item(&$variables) {
   $item = $variables['aggregator_item'];
@@ -574,14 +556,9 @@ function template_preprocess_aggregator_summary_item(&$variables) {
 }
 
 /**
- * Prepares variables for aggregator feed source templates.
- *
- * Default template: aggregator-feed-source.html.twig.
+ * Processes variables for aggregator-feed-source.tpl.php.
  *
- * @param array $variables
- *   An associative array containing:
- *   - aggregator_feed: A Drupal\aggregator\Plugin\Core\Entity\Feed instance
- *     representing the feed source.
+ * @see aggregator-feed-source.tpl.php
  */
 function template_preprocess_aggregator_feed_source(&$variables) {
   $feed = $variables['aggregator_feed'];
@@ -607,6 +584,4 @@ function template_preprocess_aggregator_feed_source(&$variables) {
   if (user_access('administer news feeds')) {
     $variables['last_checked'] = l($variables['last_checked'], 'admin/config/services/aggregator');
   }
-
-  $variables['attributes']['class'][] = 'feed-source';
 }
diff --git a/core/modules/aggregator/templates/aggregator-feed-source.html.twig b/core/modules/aggregator/templates/aggregator-feed-source.html.twig
deleted file mode 100644
index 0bb2ddb..0000000
--- a/core/modules/aggregator/templates/aggregator-feed-source.html.twig
+++ /dev/null
@@ -1,35 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to present the source of the feed.
- *
- * The contents are rendered above feed listings when browsing source feeds.
- * For example, "example.com/aggregator/sources/1".
- *
- * Available variables:
- * - source_icon: Feed icon linked to the source. Rendered through
- *   feed-icon.html.twig.
- * - source_image: Image set by the feed source.
- * - source_description: Description set by the feed source.
- * - source_url: URL to the feed source.
- * - last_checked: How long ago the feed was checked locally.
- *
- * @see template_preprocess()
- * @see template_preprocess_aggregator_feed_source()
- *
- * @ingroup themeable
- */
-#}
-<div{{ attributes}}>
-  {{ source_icon }}
-  {{ source_image }}
-  <div class="feed-description">
-    {{ source_description }}
-  </div>
-  <div class="feed-url">
-    <em>{{ 'URL'|t }}:</em> <a href="{{ source_url }}">{{ source_url }}</a>
-  </div>
-  <div class="feed-updated">
-    <em>{{ 'Updated'|t }}:</em> {{ last_checked }}
-  </div>
-</div>
diff --git a/core/modules/aggregator/templates/aggregator-feed-source.tpl.php b/core/modules/aggregator/templates/aggregator-feed-source.tpl.php
new file mode 100644
index 0000000..f9cfa55
--- /dev/null
+++ b/core/modules/aggregator/templates/aggregator-feed-source.tpl.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to present the source of the feed.
+ *
+ * The contents are rendered above feed listings when browsing source feeds.
+ * For example, "example.com/aggregator/sources/1".
+ *
+ * Available variables:
+ * - $source_icon: Feed icon linked to the source. Rendered through
+ *   theme_feed_icon().
+ * - $source_image: Image set by the feed source.
+ * - $source_description: Description set by the feed source.
+ * - $source_url: URL to the feed source.
+ * - $last_checked: How long ago the feed was checked locally.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_aggregator_feed_source()
+ *
+ * @ingroup themeable
+ */
+?>
+<div class="feed-source">
+  <?php print $source_icon; ?>
+  <?php print $source_image; ?>
+  <div class="feed-description">
+    <?php print $source_description; ?>
+  </div>
+  <div class="feed-url">
+    <em><?php print t('URL:'); ?></em> <a href="<?php print $source_url; ?>"><?php print $source_url; ?></a>
+  </div>
+  <div class="feed-updated">
+    <em><?php print t('Updated:'); ?></em> <?php print $last_checked; ?>
+  </div>
+</div>
diff --git a/core/modules/aggregator/templates/aggregator-item.html.twig b/core/modules/aggregator/templates/aggregator-item.html.twig
deleted file mode 100644
index 6a0185b..0000000
--- a/core/modules/aggregator/templates/aggregator-item.html.twig
+++ /dev/null
@@ -1,44 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to present a feed item in an aggregator page.
- *
- * Available variables:
- * - feed_url: URL to the originating feed item.
- * - feed_title: Title of the feed item.
- * - source_url: Link to the local source section.
- * - source_title: Title of the remote source.
- * - source_date: Date the feed was posted on the remote source.
- * - content: Feed item content.
- * - categories: Linked categories assigned to the feed.
- *
- * @see template_preprocess()
- * @see template_preprocess_aggregator_item()
- *
- * @ingroup themeable
- */
-#}
-<div{{ attributes }}>
-  <h3 class="feed-item-title">
-    <a href="{{ feed_url }}">{{ feed_title }}</a>
-  </h3>
-
-  <div class="feed-item-meta">
-    {% if source_url %}
-      <a href="{{ source_url }}" class="feed-item-source">{{ source_title }}</a> -
-    {% endif %}
-    <span class="feed-item-date">{{ source_date }}</span>
-  </div>
-
-  {% if content %}
-    <div class="feed-item-body">
-      {{ content }}
-    </div>
-  {% endif %}
-
-  {% if categories %}
-    <div class="feed-item-categories">
-      {{ 'Categories'|t }}: {{ categories|join(', ') }}
-    </div>
-  {% endif %}
-</div>
diff --git a/core/modules/aggregator/templates/aggregator-item.tpl.php b/core/modules/aggregator/templates/aggregator-item.tpl.php
new file mode 100644
index 0000000..74b2284
--- /dev/null
+++ b/core/modules/aggregator/templates/aggregator-item.tpl.php
@@ -0,0 +1,47 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to format an individual feed item for display
+ * on the aggregator page.
+ *
+ * Available variables:
+ * - $feed_url: URL to the originating feed item.
+ * - $feed_title: Title of the feed item.
+ * - $source_url: Link to the local source section.
+ * - $source_title: Title of the remote source.
+ * - $source_date: Date the feed was posted on the remote source.
+ * - $content: Feed item content.
+ * - $categories: Linked categories assigned to the feed.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_aggregator_item()
+ *
+ * @ingroup themeable
+ */
+?>
+<div class="feed-item">
+  <h3 class="feed-item-title">
+    <a href="<?php print $feed_url; ?>"><?php print $feed_title; ?></a>
+  </h3>
+
+  <div class="feed-item-meta">
+  <?php if ($source_url): ?>
+    <a href="<?php print $source_url; ?>" class="feed-item-source"><?php print $source_title; ?></a> -
+  <?php endif; ?>
+    <span class="feed-item-date"><?php print $source_date; ?></span>
+  </div>
+
+<?php if ($content): ?>
+  <div class="feed-item-body">
+    <?php print $content; ?>
+  </div>
+<?php endif; ?>
+
+<?php if ($categories): ?>
+  <div class="feed-item-categories">
+    <?php print t('Categories'); ?>: <?php print implode(', ', $categories); ?>
+  </div>
+<?php endif ;?>
+
+</div>
diff --git a/core/modules/aggregator/templates/aggregator-summary-items.html.twig b/core/modules/aggregator/templates/aggregator-summary-items.html.twig
deleted file mode 100644
index 5376fda..0000000
--- a/core/modules/aggregator/templates/aggregator-summary-items.html.twig
+++ /dev/null
@@ -1,24 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to present feeds as list items.
- *
- * Each iteration generates a single feed source or category.
- *
- * Available variables:
- * - title: Title of the feed or category.
- * - summary_list: Unordered list of linked feed items generated through
- *   theme_item_list().
- * - source_url: URL to the local source or category.
- *
- * @see template_preprocess()
- * @see template_preprocess_aggregator_summary_items()
- *
- * @ingroup themeable
- */
-#}
-<h3>{{ title }}</h3>
-{{ summary_list }}
-<div class="links">
-  <a href="{{ source_url }}">{{ 'More<span class="element-invisible"> posts about %title</span>'|t({ '%title': title }) }}</a>
-</div>
diff --git a/core/modules/aggregator/templates/aggregator-summary-items.tpl.php b/core/modules/aggregator/templates/aggregator-summary-items.tpl.php
new file mode 100644
index 0000000..8f19fe1
--- /dev/null
+++ b/core/modules/aggregator/templates/aggregator-summary-items.tpl.php
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to present feeds as list items.
+ *
+ * Each iteration generates a single feed source or category.
+ *
+ * Available variables:
+ * - $title: Title of the feed or category.
+ * - $summary_list: Render array of unordered feed items list.
+ * - $source_url: URL to the local source or category.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_aggregator_summary_items()
+ *
+ * @ingroup themeable
+ */
+?>
+<h3><?php print $title; ?></h3>
+<?php print render($summary_list); ?>
+<div class="links">
+  <a href="<?php print $source_url; ?>"><?php print t("More<span class=\"element-invisible\"> posts about %title</span>", array('%title' => $title)); ?></a>
+</div>
diff --git a/core/modules/aggregator/templates/aggregator-wrapper.tpl.php b/core/modules/aggregator/templates/aggregator-wrapper.tpl.php
new file mode 100644
index 0000000..0e97ba4
--- /dev/null
+++ b/core/modules/aggregator/templates/aggregator-wrapper.tpl.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to wrap aggregator content.
+ *
+ * Available variables:
+ * - $content: All aggregator content.
+ * - $page: Pager links rendered through theme_pager().
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_aggregator_wrapper()
+ *
+ * @ingroup themeable
+ */
+?>
+<div class="<?php print $attributes['class']; ?>">
+  <?php print $content; ?>
+  <?php print $pager; ?>
+</div>
diff --git a/core/modules/block/block.admin.inc b/core/modules/block/block.admin.inc
index 6af9fe3..f94ce25 100644
--- a/core/modules/block/block.admin.inc
+++ b/core/modules/block/block.admin.inc
@@ -6,7 +6,6 @@
  */
 
 use Drupal\block\Plugin\Core\Entity\Block;
-use Drupal\Core\Template\Attribute;
 
 /**
  * Page callback: Attaches CSS for the block region demo.
@@ -85,13 +84,13 @@ function block_admin_edit(Block $entity) {
 }
 
 /**
- * Prepares variables for block admin display form templates.
+ * Processes variables for block-admin-display-form.tpl.php.
  *
- * Default template: block-admin-display-form.html.twig.
+ * The $variables array contains the following arguments:
+ * - $form
  *
- * @param array $variables
- *   An associative array containing:
- *   - form: A render element representing the form.
+ * @see block-admin-display.tpl.php
+ * @see theme_block_admin_display()
  */
 function template_preprocess_block_admin_display_form(&$variables) {
   $variables['block_regions'] = $variables['form']['block_regions']['#value'];
@@ -104,9 +103,6 @@ function template_preprocess_block_admin_display_form(&$variables) {
     $variables['block_listing'][$key] = array();
   }
 
-  $default_attributes = new Attribute(array('class' => array('draggable')));
-  $row = 0;
-
   // Initialize disabled blocks array.
   $variables['block_listing'][BLOCK_REGION_NONE] = array();
 
@@ -122,28 +118,14 @@ function template_preprocess_block_admin_display_form(&$variables) {
     $block['weight']['#attributes']['class'] = array('block-weight', 'block-weight-' . $region);
 
     $variables['block_listing'][$region][$i] = new stdClass();
-    $variables['block_listing'][$region][$i]->attributes = clone $default_attributes;
-    $variables['block_listing'][$region][$i]->attributes['class'][] = $row % 2 == 0 ? 'odd' : 'even';
-    $row++;
-    if(!empty($block['#attributes']['class'])) {
-      $variables['block_listing'][$region][$i]->attributes['class'][] = implode(' ', $block['#attributes']['class']);
-    }
-
     $variables['block_listing'][$region][$i]->row_class = !empty($block['#attributes']['class']) ? implode(' ', $block['#attributes']['class']) : '';
     $variables['block_listing'][$region][$i]->block_modified = !empty($block['#attributes']['class']) && in_array('block-modified', $block['#attributes']['class']);
-    $variables['block_listing'][$region][$i]->block_title = $block['info'];
-    $variables['block_listing'][$region][$i]->region_select = array(
-      'region' => array(
-        'data' => $block['region'],
-        '#weight' => 1,
-      ),
-      'theme' => array(
-        'data' => $block['theme'],
-        '#weight' => 2,
-      ),
-    );
-    $variables['block_listing'][$region][$i]->weight_select = $block['weight'];
-    $variables['block_listing'][$region][$i]->operations = $block['operations'];
+    $variables['block_listing'][$region][$i]->block_title = drupal_render($block['info']);
+    $variables['block_listing'][$region][$i]->region_select = drupal_render($block['region']) . drupal_render($block['theme']);
+    $variables['block_listing'][$region][$i]->weight_select = drupal_render($block['weight']);
+    $variables['block_listing'][$region][$i]->operations = drupal_render($block['operations']);
     $variables['block_listing'][$region][$i]->printed = FALSE;
   }
+
+  $variables['form_submit'] = drupal_render_children($variables['form']);
 }
diff --git a/core/modules/block/block.api.php b/core/modules/block/block.api.php
index 93a113a..c2bf7ff 100644
--- a/core/modules/block/block.api.php
+++ b/core/modules/block/block.api.php
@@ -20,7 +20,7 @@
  * If the module wishes to act on the rendered HTML of the block rather than
  * the structured content array, it may use this hook to add a #post_render
  * callback. Alternatively, it could also implement hook_preprocess_HOOK() for
- * block.html.twig. See drupal_render() and theme() documentation respectively
+ * block.tpl.php. See drupal_render() and theme() documentation respectively
  * for details.
  *
  * In addition to hook_block_view_alter(), which is called for all blocks, there
diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index 9e93550..d94ec3b 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -465,10 +465,6 @@ function block_list($region) {
     $blocks[$region] = array();
   }
 
-  uasort($blocks[$region], function($first, $second) {
-    return $first->weight < $second->weight ? ($first->weight === $second->weight ? 0 : -1) : 1;
-  });
-
   return $blocks[$region];
 }
 
@@ -519,23 +515,21 @@ function block_rebuild() {
 }
 
 /**
- * Prepares variables for block templates.
- *
- * Default template: block.html.twig.
+ * Processes variables for block.tpl.php.
  *
  * Prepares the values passed to the theme_block function to be passed
  * into a pluggable template engine. Uses block properties to generate a
  * series of template file suggestions. If none are found, the default
- * block.html.twig is used.
+ * block.tpl.php is used.
+ *
+ * Most themes utilize their own copy of block.tpl.php. The default is located
+ * inside "modules/block/block.tpl.php". Look in there for the full list of
+ * variables.
  *
- * Most themes use their own copy of block.html.twig. The default is located
- * inside "core/modules/block/templates/block.html.twig". Look in there for the
- * full list of available variables.
+ * The $variables array contains the following arguments:
+ * - $block
  *
- * @param array $variables
- *   An associative array containing:
- *   - elements: An associative array containing the properties of the element.
- *     Properties used: #block, #configuration, #children, #plugin_id.
+ * @see block.tpl.php
  */
 function template_preprocess_block(&$variables) {
   $block_counter = &drupal_static(__FUNCTION__, array());
@@ -572,7 +566,7 @@ function template_preprocess_block(&$variables) {
   if ($id = $variables['elements']['#block']->id()) {
     $config_id = explode('.', $id);
     $machine_name = array_pop($config_id);
-    $variables['attributes']['id'] = drupal_html_id('block-' . $machine_name);
+    $variables['block_html_id'] = drupal_html_id('block-' . $machine_name);
     $variables['theme_hook_suggestions'][] = 'block__' . $machine_name;
   }
 }
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php
deleted file mode 100644
index d69d844..0000000
--- a/core/modules/block/lib/Drupal/block/Tests/BlockRenderOrderTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\block\Tests\BlockRenderOrderTest.
- */
-
-namespace Drupal\block\Tests;
-
-use Drupal\simpletest\WebTestBase;
-
-/**
- * Tests block HTML ID validity.
- */
-class BlockRenderOrderTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('block', 'block_test', 'search');
-
-  public static function getInfo() {
-    return array(
-      'name' => 'Block Render Order',
-      'description' => 'Test blocks are being rendered in order by weight.',
-      'group' => 'Block',
-    );
-  }
-
-  function setUp() {
-    parent::setUp();
-    // Create a test user.
-    $end_user = $this->drupalCreateUser(array(
-      'access content',
-      'search content',
-    ));
-    $this->drupalLogin($end_user);
-  }
-
-  /**
-   * Tests the render order of the blocks.
-   */
-  function testBlockRenderOrder() {
-    //Enable test blocks and place them in the same region.
-    $blocks = array(array($this->randomName(8), 'system_powered_by_block'), array($this->randomName(8), 'search_form_block'));
-    foreach ($blocks as $weight => $settings) {
-      $this->drupalPlaceBlock($settings[1], array(
-        'label' => $settings[0],
-        'weight' => $weight,
-        'region' => 'header',
-      ));
-    }
-    $this->drupalGet('');
-    $test_content = $this->drupalGetContent('');
-    foreach ($blocks as $weight => $settings) {
-      $this->assertRaw('<h2>' . $settings[0] . '</h2>', 'Block "' . $settings[0]  . '" is in place.');
-      $position[$weight] = strpos($test_content, $settings[0]);
-    }
-    $this->assertTrue($position[0] < $position[1], 'The blocks are rendered in the correct order.');
-  }
-}
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
index c3fbca3..dfc3b61 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
@@ -135,13 +135,11 @@ protected function renderTests() {
     $entity = entity_load('block', 'stark.test_block');
     $output = entity_view($entity, 'block');
     $expected = array();
-    $expected[] = '<div class="block block-block-test" id="block-test-block">';
-    $expected[] = '  ';
-    $expected[] = '    ';
+    $expected[] = '  <div id="block-test-block"  class="block block-block-test">';
     $expected[] = '';
-    $expected[] = '  <div class="content">';
     $expected[] = '    ';
-    $expected[] = '  </div>';
+    $expected[] = '  <div class="content">';
+    $expected[] = '      </div>';
     $expected[] = '</div>';
     $expected[] = '';
     $expected_output = implode("\n", $expected);
@@ -161,14 +159,12 @@ protected function renderTests() {
     $entity->save();
     $output = entity_view($entity, 'block');
     $expected = array();
-    $expected[] = '<div class="block block-block-test" id="block-test-block2">';
-    $expected[] = '  ';
-    $expected[] = '      <h2>Powered by Bananas</h2>';
-    $expected[] = '    ';
+    $expected[] = '  <div id="block-test-block2"  class="block block-block-test">';
     $expected[] = '';
+    $expected[] = '    <h2>Powered by Bananas</h2>';
+    $expected[] = '  ';
     $expected[] = '  <div class="content">';
-    $expected[] = '    ';
-    $expected[] = '  </div>';
+    $expected[] = '      </div>';
     $expected[] = '</div>';
     $expected[] = '';
     $expected_output = implode("\n", $expected);
diff --git a/core/modules/block/templates/block-admin-display-form.html.twig b/core/modules/block/templates/block-admin-display-form.html.twig
deleted file mode 100644
index 545a06c..0000000
--- a/core/modules/block/templates/block-admin-display-form.html.twig
+++ /dev/null
@@ -1,56 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to configure blocks.
- *
- * Available variables:
- * - block_regions: A collection of regions. Keyed by name with the title as value.
- * - block_listing: A collection of blocks keyed by region and then delta.
- * - form: The form elements.
- *
- * Each block_listing[region] contains a collection of blocks for that region.
- * - data: Each data in block_listing[region] contains.
- *    - region_title: Region title for the listed block.
- *    - block_title: Block title.
- *    - region_select: Drop-down menu for assigning a region.
- *    - weight_select: Drop-down menu for setting weights.
- *    - operations: Block operations.
- *
- * @see template_preprocess()
- * @see template_preprocess_block_admin_display_form()
- *
- * @ingroup themeable
- */
-#}
-<table id="blocks" class="sticky-enabled">
-  <thead>
-    <tr>
-      <th>{{ 'Block'|t }}</th>
-      <th>{{ 'Region'|t }}</th>
-      <th>{{ 'Weight'|t }}</th>
-      <th>{{ 'Operations'|t }}</th>
-    </tr>
-  </thead>
-  <tbody>
-    {% set row = 0 %}
-    {% for region, title in block_regions %}
-      <tr class="region-title region-title-{{ region }}">
-        <td colspan="5">{{ title }}</td>
-      </tr>
-      <tr class="region-message region-{{ region }}-message {{ block_listing[region] is empty ? 'region-empty' : 'region-populated' }}">
-        <td colspan="5"><em>{{ 'No blocks in this region'|t }}</em></td>
-      </tr>
-      {% for delta, data in block_listing[region] %}
-      <tr{{ data.attributes }}>
-        <td class="block">{{ data.block_title }}</td>
-        <td>{{ data.region_select }}</td>
-        <td>{{ data.weight_select }}</td>
-        <td>{{ data.operations }}</td>
-      </tr>
-      {% set row = row + 1 %}
-      {% endfor %}
-    {% endfor %}
-  </tbody>
-</table>
-
-{{ form }}
diff --git a/core/modules/block/templates/block-admin-display-form.tpl.php b/core/modules/block/templates/block-admin-display-form.tpl.php
new file mode 100644
index 0000000..4fa3e70
--- /dev/null
+++ b/core/modules/block/templates/block-admin-display-form.tpl.php
@@ -0,0 +1,58 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to configure blocks.
+ *
+ * Available variables:
+ * - $block_regions: An array of regions. Keyed by name with the title as value.
+ * - $block_listing: An array of blocks keyed by region and then delta.
+ * - $form_submit: Form submit button.
+ *
+ * Each $block_listing[$region] contains an array of blocks for that region.
+ *
+ * Each $data in $block_listing[$region] contains:
+ * - $data->region_title: Region title for the listed block.
+ * - $data->block_title: Block title.
+ * - $data->region_select: Drop-down menu for assigning a region.
+ * - $data->weight_select: Drop-down menu for setting weights.
+ * - $data->operations: Block operations.
+ *
+ * @see template_preprocess_block_admin_display_form()
+ * @see theme_block_admin_display()
+ *
+ * @ingroup themeable
+ */
+?>
+<table id="blocks" class="sticky-enabled">
+  <thead>
+    <tr>
+      <th><?php print t('Block'); ?></th>
+      <th><?php print t('Region'); ?></th>
+      <th><?php print t('Weight'); ?></th>
+      <th><?php print t('Operations'); ?></th>
+    </tr>
+  </thead>
+  <tbody>
+    <?php $row = 0; ?>
+    <?php foreach ($block_regions as $region => $title): ?>
+      <tr class="region-title region-title-<?php print $region?>">
+        <td colspan="5"><?php print $title; ?></td>
+      </tr>
+      <tr class="region-message region-<?php print $region?>-message <?php print empty($block_listing[$region]) ? 'region-empty' : 'region-populated'; ?>">
+        <td colspan="5"><em><?php print t('No blocks in this region'); ?></em></td>
+      </tr>
+      <?php foreach ($block_listing[$region] as $delta => $data): ?>
+      <tr class="draggable <?php print $row % 2 == 0 ? 'odd' : 'even'; ?><?php print $data->row_class ? ' ' . $data->row_class : ''; ?>">
+        <td class="block"><?php print $data->block_title; ?></td>
+        <td><?php print $data->region_select; ?></td>
+        <td><?php print $data->weight_select; ?></td>
+        <td><?php print $data->operations; ?></td>
+      </tr>
+      <?php $row++; ?>
+      <?php endforeach; ?>
+    <?php endforeach; ?>
+  </tbody>
+</table>
+
+<?php print $form_submit; ?>
diff --git a/core/modules/block/templates/block.html.twig b/core/modules/block/templates/block.html.twig
deleted file mode 100644
index 757f8f5..0000000
--- a/core/modules/block/templates/block.html.twig
+++ /dev/null
@@ -1,55 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a block.
- *
- * Available variables:
- * - plugin_id: The ID of the block implementation.
- * - label: The configured label of the block if visible.
- * - configuration: A list of the block's configuration values.
- *   - label: The configured label for the block.
- *   - label_display: The display settings for the label.
- *   - module: The module that provided this block plugin.
- *   - cache: The cache settings.
- *   - Block plugin specific settings will also be stored here.
- * - block - The full block entity.
- *   - label_hidden: The hidden block title value if the block was
- *     configured to hide the title ('label' is empty in this case).
- *   - module: The module that generated the block.
- *   - delta: An ID for the block, unique within each module.
- *   - region: The block region embedding the current block.
- * - content: The content of this block.
- * - attributes: HTML attributes for the containing element.
- *   - id: A valid HTML ID and guaranteed unique.
- *   - class: Classes that can be used to style contextually through
- *     CSS. These can be manipulated through preprocess functions. The default
- *     values can be one or more of the following:
- *     - block: The current template type, i.e., "theming hook".
- *     - block-[module]: The module generating the block. For example, the user
- *       module is responsible for handling the default user navigation block.
- *       In that case the class would be 'block-user'.
- * - title_attributes: HTML attributes for the title element.
- * - content_attributes: HTML attributes for the content element.
- * - title_prefix: Additional output populated by modules, intended to be
- *   displayed in front of the main title tag that appears in the template.
- * - title_suffix: Additional output populated by modules, intended to be
- *   displayed after the main title tag that appears in the template.
- *
- * @see template_preprocess()
- * @see template_preprocess_block()
- *
- * @ingroup themeable
- */
- @todo Remove the div around content as per http://drupal.org/node/1972122.
-#}
-<div{{ attributes }}>
-  {{ title_prefix }}
-  {% if label %}
-    <h2{{ title_attributes }}>{{ label }}</h2>
-  {% endif %}
-  {{ title_suffix }}
-
-  <div{{ content_attributes }}>
-    {{ content }}
-  </div>
-</div>
diff --git a/core/modules/block/templates/block.tpl.php b/core/modules/block/templates/block.tpl.php
new file mode 100644
index 0000000..106dd6b
--- /dev/null
+++ b/core/modules/block/templates/block.tpl.php
@@ -0,0 +1,59 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to display a block.
+ *
+ * Available variables:
+ * - $plugin_id: The ID of the block implementation.
+ * - $label: The configured label of the block if visible.
+ * - $configuration: An array of the block's configuration values.
+ *   - label: The configured label for the block.
+ *   - label_display: The display settings for the label.
+ *   - module: The module that provided this block plugin.
+ *   - cache: The cache settings.
+ *   - Block plugin specific settings will also be stored here.
+ * - $content: Block content.
+ * - $attributes: An instance of Attributes class that can be manipulated as an
+ *    array and printed as a string.
+ *    It includes the 'class' information, which includes:
+ *   - block: The current template type, i.e., "theming hook".
+ *   - block-[module]: The module generating the block. For example, the user
+ *     module is responsible for handling the default user navigation block. In
+ *     that case the class would be 'block-user'.
+ * - $title_prefix (array): An array containing additional output populated by
+ *   modules, intended to be displayed in front of the main title tag that
+ *   appears in the template.
+ * - $title_suffix (array): An array containing additional output populated by
+ *   modules, intended to be displayed after the main title tag that appears in
+ *   the template.
+ *
+ * Helper variables:
+ * - $is_front: Flags true when presented in the front page.
+ * - $logged_in: Flags true when the current user is a logged-in member.
+ * - $is_admin: Flags true when the current user is an administrator.
+ * - $block_html_id: A valid HTML ID and guaranteed unique.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_block()
+ * @see template_process()
+ *
+ * @ingroup themeable
+ */
+?>
+<?php if (isset($block_html_id)): ?>
+  <div id="<?php print $block_html_id; ?>" <?php print $attributes; ?>>
+<?php else: ?>
+  <div <?php print $attributes; ?>>
+<?php endif; ?>
+
+  <?php print render($title_prefix); ?>
+<?php if ($label): ?>
+  <h2<?php print $title_attributes; ?>><?php print $label; ?></h2>
+<?php endif;?>
+  <?php print render($title_suffix); ?>
+
+  <div<?php print $content_attributes; ?>>
+    <?php print render($content) ?>
+  </div>
+</div>
diff --git a/core/modules/block/tests/themes/block_test_theme/page.tpl.php b/core/modules/block/tests/themes/block_test_theme/page.tpl.php
new file mode 100644
index 0000000..ba72882
--- /dev/null
+++ b/core/modules/block/tests/themes/block_test_theme/page.tpl.php
@@ -0,0 +1,78 @@
+<?php
+
+/**
+ * @file
+ * Custom theme implementation to display a single Drupal page without
+ * sidebars. The sidebars are hidden by regions_hidden for this theme, so
+ * the default page.tpl.php will not work without throwing exceptions.
+ */
+?>
+
+  <div id="page-wrapper"><div id="page">
+
+    <div id="header"><div class="section clearfix">
+
+      <?php if ($logo): ?>
+        <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
+          <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
+        </a>
+      <?php endif; ?>
+
+      <?php if ($site_name || $site_slogan): ?>
+        <div id="name-and-slogan">
+          <?php if ($site_name): ?>
+            <?php if ($title): ?>
+              <div id="site-name"><strong>
+                <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
+              </strong></div>
+            <?php else: /* Use h1 when the content title is empty */ ?>
+              <h1 id="site-name">
+                <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
+              </h1>
+            <?php endif; ?>
+          <?php endif; ?>
+
+          <?php if ($site_slogan): ?>
+            <div id="site-slogan"><?php print $site_slogan; ?></div>
+          <?php endif; ?>
+        </div> <!-- /#name-and-slogan -->
+      <?php endif; ?>
+
+      <?php print render($page['header']); ?>
+
+    </div></div> <!-- /.section, /#header -->
+
+    <?php if ($main_menu || $secondary_menu): ?>
+      <div id="navigation"><div class="section">
+        <?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t('Main menu'))); ?>
+        <?php print theme('links__system_secondary_menu', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t('Secondary menu'))); ?>
+      </div></div> <!-- /.section, /#navigation -->
+    <?php endif; ?>
+
+    <?php if ($breadcrumb): ?>
+      <div id="breadcrumb"><?php print $breadcrumb; ?></div>
+    <?php endif; ?>
+
+    <?php print $messages; ?>
+
+    <div id="main-wrapper"><div id="main" class="clearfix">
+
+      <div id="content" class="column"><div class="section">
+        <?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
+        <a id="main-content"></a>
+        <?php print render($title_prefix); ?>
+        <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
+        <?php print render($title_suffix); ?>
+        <?php if ($tabs = render($tabs)): ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
+        <?php print render($page['help']); ?>
+        <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
+        <?php print render($page['content']); ?>
+        <?php print $feed_icons; ?>
+      </div></div> <!-- /.section, /#content -->
+    </div></div> <!-- /#main, /#main-wrapper -->
+
+    <div id="footer"><div class="section">
+      <?php print render($page['footer']); ?>
+    </div></div> <!-- /.section, /#footer -->
+
+  </div></div> <!-- /#page, /#page-wrapper -->
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index 59f1e45..3ac47f4 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -948,7 +948,7 @@ function _book_link_defaults($nid) {
 }
 
  /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function book_preprocess_block(&$variables) {
   if ($variables['configuration']['module'] == 'book') {
@@ -957,9 +957,7 @@ function book_preprocess_block(&$variables) {
 }
 
 /**
- * Prepares variables for book listing block templates.
- *
- * Default template: book-all-books-block.html.twig.
+ * Processes variables for book-all-books-block.tpl.php.
  *
  * All non-renderable elements are removed so that the template has full access
  * to the structured data but can also simply iterate over all elements and
@@ -967,8 +965,9 @@ function book_preprocess_block(&$variables) {
  *
  * @param array $variables
  *   An associative array containing the following key:
- *   - book_menus: An associative array containing renderable menu links for all
- *     book menus.
+ *   - book_menus
+ *
+ * @see book-all-books-block.tpl.php
  */
 function template_preprocess_book_all_books_block(&$variables) {
   // Remove all non-renderable elements.
@@ -980,14 +979,13 @@ function template_preprocess_book_all_books_block(&$variables) {
 }
 
 /**
- * Prepares variables for book navigation templates.
- *
- * Default template: book-navigation.html.twig.
+ * Processes variables for book-navigation.tpl.php.
  *
  * @param array $variables
  *   An associative array containing the following key:
- *   - book_link: An associative array of book link properties.
- *     Properties used: bid, link_title, depth, plid, mlid.
+ *   - book_link
+ *
+ * @see book-navigation.tpl.php
  */
 function template_preprocess_book_navigation(&$variables) {
   drupal_add_css(drupal_get_path('module', 'book') . '/book.theme.css');
@@ -1103,15 +1101,15 @@ function book_toc($bid, $depth_limit, $exclude = array()) {
 }
 
 /**
- * Prepares variables for book export templates.
- *
- * Default template: book-export-html.html.twig.
+ * Preprocesses variables for book-export-html.tpl.php.
  *
  * @param array $variables
- *   An associative array containing:
- *   - title: The title of the book.
- *   - contents: Output of each book page.
- *   - depth: The max depth of the book.
+ *   An associative array containing the following keys:
+ *   - title
+ *   - contents
+ *   - depth
+ *
+ * @see book-export-html.tpl.php
  */
 function template_preprocess_book_export_html(&$variables) {
   global $base_url;
@@ -1193,15 +1191,14 @@ function book_node_export(EntityInterface $node, $children = '') {
 }
 
 /**
- * Prepares variables for single node export templates.
- *
- * Default template: book-node-export-html.html.twig.
+ * Processes variables for book-node-export-html.tpl.php.
  *
  * @param array $variables
  *   An associative array containing the following keys:
- *   - node: The node that will be output.
- *   - children: All the rendered child nodes within the current node. Defaults
- *     to an empty string.
+ *   - node
+ *   - children
+ *
+ * @see book-node-export-html.tpl.php
  */
 function template_preprocess_book_node_export_html(&$variables) {
   $variables['depth'] = $variables['node']->book['depth'];
diff --git a/core/modules/book/templates/book-all-books-block.html.twig b/core/modules/book/templates/book-all-books-block.html.twig
deleted file mode 100644
index 518c1e1..0000000
--- a/core/modules/book/templates/book-all-books-block.html.twig
+++ /dev/null
@@ -1,24 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for rendering book outlines within a block.
- *
- * This template is used only when the block is configured to "show block on all
- * pages", which presents multiple independent books on all pages.
- *
- * Available variables:
- * - book_menus: Book outlines.
- *   - book_id: The parent book ID.
- *   - menu: The top-level book links.
- *
- * @see template_preprocess()
- * @see template_preprocess_book_all_books_block()
- *
- * @ingroup themeable
- */
-#}
-{% for book_id, menu in book_menus %}
-  <nav id="book-block-menu-{{ book_id }}" class="book-block-menu">
-    {{ menu }}
-  </nav>
-{% endfor %}
diff --git a/core/modules/book/templates/book-all-books-block.tpl.php b/core/modules/book/templates/book-all-books-block.tpl.php
new file mode 100644
index 0000000..8e5343b
--- /dev/null
+++ b/core/modules/book/templates/book-all-books-block.tpl.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation for rendering book outlines within a block.
+ *
+ * This template is used only when the block is configured to "show block on all
+ * pages", which presents multiple independent books on all pages.
+ *
+ * Available variables:
+ * - $book_menus: Array of book outlines keyed to the parent book ID. Call
+ *   render() on each to print it as an unordered list.
+ *
+ * @see template_preprocess_book_all_books_block()
+ *
+ * @ingroup themeable
+ */
+?>
+<?php foreach ($book_menus as $book_id => $menu): ?>
+  <nav id="book-block-menu-<?php print $book_id; ?>" class="book-block-menu">
+    <?php print render($menu); ?>
+  </nav>
+<?php endforeach; ?>
diff --git a/core/modules/book/templates/book-export-html.html.twig b/core/modules/book/templates/book-export-html.html.twig
deleted file mode 100644
index 95d5de3..0000000
--- a/core/modules/book/templates/book-export-html.html.twig
+++ /dev/null
@@ -1,51 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for printed version of book outline.
- *
- * Available variables:
- * - title: Top level node title.
- * - head: Header tags.
- * - language: Language object.
- * - language_rtl: A flag indicating whether the current display language is a
- *   right to left language.
- * - base_url: URL to the home page.
- * - contents: Nodes within the current outline rendered through
- *   book-node-export-html.html.twig.
- *
- * @see template_preprocess()
- * @see template_preprocess_book_export_html()
- *
- * @ingroup themeable
- */
-#}
-<!DOCTYPE html>
-<html{{ html_attributes }}>
-  <head>
-    <title>{{ title }}></title>
-    {{ head }}
-    <base href="{{ base_url }}" />
-    <link type="text/css" rel="stylesheet" href="misc/print.css" />
-    {% if language_rtl %}
-      <link type="text/css" rel="stylesheet" href="misc/print-rtl.css" />
-    {% endif %}
-  </head>
-  <body>
-    {#
-      The given node is embedded to its absolute depth in a top level section.
-      For example, a child node with depth 2 in the hierarchy is contained in
-      (otherwise empty) div elements corresponding to depth 0 and depth 1. This
-      is intended to support WYSIWYG output - e.g., level 3 sections always look
-      like level 3 sections, no matter their depth relative to the node selected
-      to be exported as printer-friendly HTML.
-    #}
-
-  {% for i in 1..depth-1 if depth > 1 %}
-    <div class="section-{{ i }}">
-  {% endfor %}
-  {{ contents }}
-  {% for i in 1..depth-1 if depth > 1 %}
-    </div>
-  {% endfor %}
-  </body>
-</html>
diff --git a/core/modules/book/templates/book-export-html.tpl.php b/core/modules/book/templates/book-export-html.tpl.php
new file mode 100644
index 0000000..df04dab
--- /dev/null
+++ b/core/modules/book/templates/book-export-html.tpl.php
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation for printed version of book outline.
+ *
+ * Available variables:
+ * - $title: Top level node title.
+ * - $head: Header tags.
+ * - $language: Language object.
+ * - $language_rtl: TRUE or FALSE depending on right to left language scripts.
+ * - $base_url: URL to home page.
+ * - $contents: Nodes within the current outline rendered through
+ *   book-node-export-html.tpl.php.
+ *
+ * @see template_preprocess_book_export_html()
+ *
+ * @ingroup themeable
+ */
+?>
+<!DOCTYPE html >
+<html<?php print $html_attributes; ?>>
+  <head>
+    <title><?php print $title; ?></title>
+    <?php print $head; ?>
+    <base href="<?php print $base_url; ?>" />
+    <link type="text/css" rel="stylesheet" href="misc/print.css" />
+    <?php if ($language_rtl): ?>
+      <link type="text/css" rel="stylesheet" href="misc/print-rtl.css" />
+    <?php endif; ?>
+  </head>
+  <body>
+    <?php
+    /**
+     * The given node is /embedded to its absolute depth in a top level
+     * section/. For example, a child node with depth 2 in the hierarchy is
+     * contained in (otherwise empty) &lt;div&gt; elements corresponding to
+     * depth 0 and depth 1. This is intended to support WYSIWYG output - e.g.,
+     * level 3 sections always look like level 3 sections, no matter their
+     * depth relative to the node selected to be exported as printer-friendly
+     * HTML.
+     */
+    $div_close = '';
+    ?>
+    <?php for ($i = 1; $i < $depth; $i++): ?>
+      <div class="section-<?php print $i; ?>">
+      <?php $div_close .= '</div>'; ?>
+    <?php endfor; ?>
+    <?php print $contents; ?>
+    <?php print $div_close; ?>
+  </body>
+</html>
diff --git a/core/modules/book/templates/book-navigation.html.twig b/core/modules/book/templates/book-navigation.html.twig
deleted file mode 100644
index 82e02fd..0000000
--- a/core/modules/book/templates/book-navigation.html.twig
+++ /dev/null
@@ -1,59 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to navigate books.
- *
- * Presented under nodes that are a part of book outlines.
- *
- * Available variables:
- * - tree: The immediate children of the current node rendered as an unordered
- *   list.
- * - current_depth: Depth of the current node within the book outline. Provided
- *   for context.
- * - prev_url: URL to the previous node.
- * - prev_title: Title of the previous node.
- * - parent_url: URL to the parent node.
- * - parent_title: Title of the parent node. Not printed by default. Provided
- *   as an option.
- * - next_url: URL to the next node.
- * - next_title: Title of the next node.
- * - has_links: Flags TRUE whenever the previous, parent or next data has a
- *   value.
- * - book_id: The book ID of the current outline being viewed. Same as the node
- *   ID containing the entire outline. Provided for context.
- * - book_url: The book/node URL of the current outline being viewed. Provided
- *   as an option. Not used by default.
- * - book_title: The book/node title of the current outline being viewed.
- *   Provided as an option. Not used by default.
- *
- * @see template_preprocess()
- * @see template_preprocess_book_navigation()
- *
- * @ingroup themeable
- */
-#}
-{% if tree or has_links %}
-  <nav id="book-navigation-{{ book_id }}" class="book-navigation">
-    {{ tree }}
-    {% if has_links %}
-      <h2 class="element-invisible">{{ 'Book Navigation'|t }}</h2>
-      <ul class="book-pager">
-      {% if prev_url %}
-        <li class="previous">
-          <a href="{{ prev_url }}" rel="prev" title="{{ 'Go to previous page'|t }}"><b>{{ '‹'|t }}</b> {{ prev_title }}</a>
-        </li>
-      {% endif %}
-      {% if parent_url %}
-        <li class="up">
-          <a href="{{ parent_url }}" title="{{ 'Go to parent page'|t }}">{{ 'Up'|t }}</a>
-        </li>
-      {% endif %}
-      {% if next_url %}
-        <li class="next">
-          <a href="{{ next_url }}" rel="next" title="{{ 'Go to next page'|t }}">{{ next_title }} <b>{{ '›'|t }}</b></a>
-        </li>
-      {% endif %}
-    </ul>
-    {% endif %}
-  </nav>
-{% endif %}
diff --git a/core/modules/book/templates/book-navigation.tpl.php b/core/modules/book/templates/book-navigation.tpl.php
new file mode 100644
index 0000000..cdc1278
--- /dev/null
+++ b/core/modules/book/templates/book-navigation.tpl.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * @file
+ * Default theme implementation to navigate books.
+ *
+ * Presented under nodes that are a part of book outlines.
+ *
+ * Available variables:
+ * - $tree: The immediate children of the current node rendered as an unordered
+ *   list.
+ * - $current_depth: Depth of the current node within the book outline. Provided
+ *   for context.
+ * - $prev_url: URL to the previous node.
+ * - $prev_title: Title of the previous node.
+ * - $parent_url: URL to the parent node.
+ * - $parent_title: Title of the parent node. Not printed by default. Provided
+ *   as an option.
+ * - $next_url: URL to the next node.
+ * - $next_title: Title of the next node.
+ * - $has_links: Flags TRUE whenever the previous, parent or next data has a
+ *   value.
+ * - $book_id: The book ID of the current outline being viewed. Same as the node
+ *   ID containing the entire outline. Provided for context.
+ * - $book_url: The book/node URL of the current outline being viewed. Provided
+ *   as an option. Not used by default.
+ * - $book_title: The book/node title of the current outline being viewed.
+ *   Provided as an option. Not used by default.
+ *
+ * @see template_preprocess_book_navigation()
+ *
+ * @ingroup themeable
+ */
+?>
+<?php if ($tree || $has_links): ?>
+  <nav id="book-navigation-<?php print $book_id; ?>" class="book-navigation">
+    <?php print $tree; ?>
+    <?php if ($has_links): ?>
+      <h2 class="element-invisible"><?php print t('Book Navigation'); ?></h2>
+      <ul class="book-pager">
+      <?php if ($prev_url): ?>
+        <li class="previous">
+          <a href="<?php print $prev_url; ?>" rel="prev" title="<?php print t('Go to previous page'); ?>"><b><?php print t('‹'); ?></b> <?php print $prev_title; ?></a>
+        </li>
+      <?php endif; ?>
+      <?php if ($parent_url): ?>
+        <li class="up">
+          <a href="<?php print $parent_url; ?>" title="<?php print t('Go to parent page'); ?>"><?php print t('Up'); ?></a>
+        </li>
+      <?php endif; ?>
+      <?php if ($next_url): ?>
+        <li class="next">
+          <a href="<?php print $next_url; ?>" rel="next" title="<?php print t('Go to next page'); ?>"><?php print $next_title;?> <b><?php print t('›'); ?></b></a>
+        </li>
+      <?php endif; ?>
+    </ul>
+    <?php endif; ?>
+  </nav>
+<?php endif; ?>
diff --git a/core/modules/book/templates/book-node-export-html.html.twig b/core/modules/book/templates/book-node-export-html.html.twig
deleted file mode 100644
index 7168de6..0000000
--- a/core/modules/book/templates/book-node-export-html.html.twig
+++ /dev/null
@@ -1,23 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a single node in a printer-friendly outline.
- *
- * Available variables:
- * - node: Fully loaded node.
- * - depth: Depth of the current node inside the outline.
- * - title: Node title.
- * - content: Node content.
- * - children: All the child nodes recursively rendered through this file.
- *
- * @see template_preprocess()
- * @see template_preprocess_book_node_export_html()
- *
- * @ingroup themeable
- */
-#}
-<article id="node-{{ node.nid }}" class="section-{{ depth }}">
-  <h1 class="book-heading">{{ title }}</h1>
-  {{ content }}
-  {{ children }}
-</article>
diff --git a/core/modules/book/templates/book-node-export-html.tpl.php b/core/modules/book/templates/book-node-export-html.tpl.php
new file mode 100644
index 0000000..50c878f
--- /dev/null
+++ b/core/modules/book/templates/book-node-export-html.tpl.php
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation for a single node in a printer-friendly outline.
+ *
+ * @see book-node-export-html.tpl.php
+ * Where it is collected and printed out.
+ *
+ * Available variables:
+ * - $depth: Depth of the current node inside the outline.
+ * - $title: Node title.
+ * - $content: Node content.
+ * - $children: All the child nodes recursively rendered through this file.
+ *
+ * @see template_preprocess_book_node_export_html()
+ *
+ * @ingroup themeable
+ */
+?>
+<article id="node-<?php print $node->nid; ?>" class="section-<?php print $depth; ?>">
+  <h1 class="book-heading"><?php print $title; ?></h1>
+  <?php print $content; ?>
+  <?php print $children; ?>
+</article>
diff --git a/core/modules/ckeditor/js/ckeditor.admin.js b/core/modules/ckeditor/js/ckeditor.admin.js
index 5ccc7ec..7abf327 100644
--- a/core/modules/ckeditor/js/ckeditor.admin.js
+++ b/core/modules/ckeditor/js/ckeditor.admin.js
@@ -17,6 +17,7 @@ Drupal.behaviors.ckeditorAdmin = {
      */
     function adminToolbarMoveButton (event) {
       var $target = $(event.currentTarget);
+      var label = Drupal.t('@label button', { '@label': $target.attr('aria-label') });
       var $button = $target.parent();
       var $currentRow = $button.closest('.ckeditor-buttons');
       var $destinationRow = null;
diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php
index 6f71077..846b93a 100644
--- a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php
+++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorTest.php
@@ -107,7 +107,7 @@ function testGetJSSettings() {
     // Change the allowed HTML tags; the "format_tags" setting for CKEditor
     // should automatically be updated as well.
     $format = entity_load('filter_format', 'filtered_html');
-    $format->filters('filter_html')->settings['allowed_html'] .= '<pre> <h3>';
+    $format->filters['filter_html']['settings']['allowed_html'] .= '<pre> <h3>';
     $format->save();
     $expected_config['format_tags'] = 'p;h3;h4;h5;h6;pre';
     $this->assertEqual($expected_config, $this->ckeditor->getJSSettings($editor), 'Generated JS settings are correct for customized configuration.');
diff --git a/core/modules/color/color.js b/core/modules/color/color.js
index ca74657..cf9f404 100644
--- a/core/modules/color/color.js
+++ b/core/modules/color/color.js
@@ -189,7 +189,7 @@ Drupal.behaviors.color = {
           .parent().removeClass('item-selected');
       }
 
-      // Add new bindings.
+      // Add bindings.
       focused = input;
       farb.linkTo(function (color) { callback(input, color, true, false); });
       farb.setColor(input.value);
diff --git a/core/modules/comment/comment.api.php b/core/modules/comment/comment.api.php
index a27899e..793d9ad 100644
--- a/core/modules/comment/comment.api.php
+++ b/core/modules/comment/comment.api.php
@@ -113,7 +113,8 @@ function hook_comment_view(\Drupal\comment\Plugin\Core\Entity\Comment $comment,
  * If the module wishes to act on the rendered HTML of the comment rather than
  * the structured content array, it may use this hook to add a #post_render
  * callback. Alternatively, it could also implement hook_preprocess_HOOK() for
- * comment.html.twig. See drupal_render() documentation for details.
+ * comment.tpl.php. See drupal_render() and theme() documentation respectively
+ * for details.
  *
  * @param $build
  *   A renderable array representing the comment.
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index b2d0190..4ce9727 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -257,7 +257,7 @@ function comment_menu() {
     'weight' => 20,
   );
   $items['comment/reply/%node'] = array(
-    'title' => 'Add new comment',
+    'title' => 'Add comment',
     'page callback' => 'comment_reply',
     'page arguments' => array(2),
     'access callback' => 'node_access',
@@ -574,7 +574,7 @@ function comment_node_view(EntityInterface $node, EntityDisplay $display, $view_
     }
     elseif ($view_mode == 'teaser') {
       // Teaser view: display the number of comments that have been posted,
-      // or a link to add new comments if the user has permission, the node
+      // or a link to add comments if the user has permission, the node
       // is open to new comments, and there currently are none.
       if (user_access('access comments')) {
         if (!empty($node->comment_count)) {
@@ -602,9 +602,9 @@ function comment_node_view(EntityInterface $node, EntityDisplay $display, $view_
         $comment_form_location = variable_get('comment_form_location_' . $node->type, COMMENT_FORM_BELOW);
         if (user_access('post comments')) {
           $links['comment-add'] = array(
-            'title' => t('Add new comment'),
+            'title' => t('Add comment'),
             'href' => "node/$node->nid",
-            'attributes' => array('title' => t('Add a new comment to this page.')),
+            'attributes' => array('title' => t('Add a comment to this page.')),
             'fragment' => 'comment-form',
           );
           if ($comment_form_location == COMMENT_FORM_SEPARATE_PAGE) {
@@ -631,7 +631,7 @@ function comment_node_view(EntityInterface $node, EntityDisplay $display, $view_
           // if there are existing comments that the link will skip past.
           if ($comment_form_location == COMMENT_FORM_SEPARATE_PAGE || (!empty($node->comment_count) && user_access('access comments'))) {
             $links['comment-add'] = array(
-              'title' => t('Add new comment'),
+              'title' => t('Add comment'),
               'attributes' => array('title' => t('Share your thoughts and opinions related to this posting.')),
               'href' => "node/$node->nid",
               'fragment' => 'comment-form',
@@ -1526,7 +1526,7 @@ function comment_preview(Comment $comment) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function comment_preprocess_block(&$variables) {
   if ($variables['configuration']['module'] == 'comment') {
@@ -1553,14 +1553,9 @@ function comment_prepare_author(Comment $comment) {
 }
 
 /**
- * Prepares variables for comment templates.
+ * Preprocesses variables for comment.tpl.php.
  *
- * Default template: comment.html.twig.
- *
- * @param array $variables
- *   An associative array containing:
- *   - elements: An associative array containing the comment and node objects.
- *     Array keys: #comment, #node.
+ * @see comment.tpl.php
  */
 function template_preprocess_comment(&$variables) {
   $comment = $variables['elements']['#comment'];
@@ -1569,7 +1564,6 @@ function template_preprocess_comment(&$variables) {
   $variables['node'] = $node;
 
   $account = comment_prepare_author($comment);
-  // @todo Do not call theme() here. We do this for purposes of t().
   $variables['author'] = theme('username', array('account' => $account));
   $variables['new'] = $comment->new->value ? t('new') : '';
   $variables['created'] = format_date($comment->created->value);
@@ -1589,7 +1583,6 @@ function template_preprocess_comment(&$variables) {
   else {
     $variables['user_picture'] = array();
   }
-
   if (config('user.settings')->get('signatures') && !empty($account->signature)) {
     $variables['signature'] = check_markup($account->signature, $account->signature_format, '', TRUE) ;
   }
@@ -1609,7 +1602,6 @@ function template_preprocess_comment(&$variables) {
     $comment_parent = $comment->pid->entity;
     $account_parent = comment_prepare_author($comment_parent);
     $variables['parent_comment'] = $comment_parent;
-    // @todo Do not call theme() here. We do this for purposes of t().
     $variables['parent_author'] = theme('username', array('account' => $account_parent));
     $variables['parent_created'] = format_date($comment_parent->created->value);
     // Avoid calling format_date() twice on the same timestamp.
@@ -1672,10 +1664,6 @@ function template_preprocess_comment(&$variables) {
       $variables['attributes']['class'][] = 'by-viewer';
     }
   }
-  // Add clearfix class.
-  $variables['attributes']['class'][] = 'clearfix';
-
-  $variables['content_attributes']['class'][] = 'content';
 }
 
 /**
@@ -1718,7 +1706,7 @@ function theme_comment_post_forbidden($variables) {
         return t('<a href="@login">Log in</a> or <a href="@register">register</a> to post comments', array('@login' => url('user/login', array('query' => $destination)), '@register' => url('user/register', array('query' => $destination))));
       }
       else {
-        // Only admins can add new users, no public registration.
+        // Only admins can add users, no public registration.
         return t('<a href="@login">Log in</a> to post comments', array('@login' => url('user/login', array('query' => $destination))));
       }
     }
@@ -1726,31 +1714,19 @@ function theme_comment_post_forbidden($variables) {
 }
 
 /**
- * Prepares variables for comment wrapper templates.
- *
- * Default template: comment-wrapper.html.twig.
+ * Preprocesses variables for comment-wrapper.tpl.php.
  *
- * @param array $variables
- *   An associative array containing:
- *   - content: An associative array containing render arrays for the list of
- *     comments, and the comment form. Array keys: comments, comment_form.
+ * @see comment-wrapper.tpl.php
  */
 function template_preprocess_comment_wrapper(&$variables) {
   // Provide contextual information.
   $variables['node'] = $variables['content']['#node'];
   $variables['display_mode'] = variable_get('comment_default_mode_' . $variables['node']->type, COMMENT_MODE_THREADED);
-
   // The comment form is optional and may not exist.
   $variables['content'] += array('comment_form' => array());
 
-  $variables['attributes']['id'] = 'comments';
-
   // Add a comment wrapper class.
   $variables['attributes']['class'][] = 'comment-wrapper';
-
-  // Create separate variables for the comments and comment form.
-  $variables['comments'] = $variables['content']['comments'];
-  $variables['form'] = $variables['content']['comment_form'];
 }
 
 /**
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php
index 86f778a..0dea98d 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php
@@ -133,7 +133,7 @@ function testAnonymous() {
     // "Login or register to post comments" type link may be shown.
     $this->drupalGet('node/' . $this->node->nid);
     $this->assertNoPattern('@<h2[^>]*>Comments</h2>@', 'Comments were not displayed.');
-    $this->assertNoLink('Add new comment', 'Link to add comment was found.');
+    $this->assertNoLink('Add comment', 'Link to add comment was found.');
 
     // Attempt to view node-comment form while disallowed.
     $this->drupalGet('comment/reply/' . $this->node->nid);
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentLinksTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentLinksTest.php
index 5585650..c193941 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentLinksTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentLinksTest.php
@@ -256,7 +256,7 @@ function assertCommentLinks(array $info) {
 
       // User is not allowed to post comments.
       if (!$info['post comments']) {
-        $this->assertNoLink('Add new comment');
+        $this->assertNoLink('Add comment');
 
         // Anonymous users should see a note to log in or register in case
         // authenticated users are allowed to post comments.
@@ -281,15 +281,15 @@ function assertCommentLinks(array $info) {
       else {
         $this->assertNoText('Log in or register to post comments');
 
-        // "Add new comment" is always expected, except when there are no
+        // "Add comment" is always expected, except when there are no
         // comments or if the user cannot see them.
         if ($path == "node/$nid" && $info['form'] == COMMENT_FORM_BELOW && (!$info['comment count'] || !$info['access comments'])) {
-          $this->assertNoLink('Add new comment');
+          $this->assertNoLink('Add comment');
         }
         else {
-          $this->assertLink('Add new comment');
+          $this->assertLink('Add comment');
 
-          // Verify that the "Add new comment" link points to the correct URL
+          // Verify that the "Add comment" link points to the correct URL
           // based on the comment form location configuration.
           if ($info['form'] == COMMENT_FORM_SEPARATE_PAGE) {
             $this->assertLinkByHref("comment/reply/$nid#comment-form", 0, 'Comment form link destination is on a separate page.');
diff --git a/core/modules/comment/templates/comment-wrapper.html.twig b/core/modules/comment/templates/comment-wrapper.html.twig
deleted file mode 100644
index dbf37cd..0000000
--- a/core/modules/comment/templates/comment-wrapper.html.twig
+++ /dev/null
@@ -1,53 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a comments container.
- *
- * Available variables:
- * - comments: List of comments rendered through comment.html.twig.
- * - form: The 'Add new comment' form.
- * - content: The content-related elements for the comment display. Use
- *   'content' to print them all, or print a subset such as
- *   'content.comment_form'.
- * - attributes: Remaining HTML attributes for the containing element.
- *   It includes the 'class' information, which includes:
- *   - comment-wrapper: The current template type, i.e., "theming hook".
- *   - title_prefix: Additional output populated by modules, intended to be
- *     displayed in front of the main title tag that appears in the template.
- *   - title_suffix: Additional title output populated by modules, intended to
- *     be displayed after the main title tag that appears in the template.
- *
- * The following variables are provided for contextual information.
- * - node: The node entity to which the comments belong.
- * - display_mode: The display mode for the comment listing, flat or threaded.
- *   The constants below show the possible values and should be used for
- *   comparison, as in the following example:
- *   @code
- *   {% if display_mode is constant('COMMENT_MODE_THREADED') %}
- *     <h3>{{ 'These comments are displayed in a threaded list.'|t }}</h3>
- *   {% endif %}
- *   @endcode
- *   - COMMENT_MODE_FLAT
- *   - COMMENT_MODE_THREADED
- *
- * @see template_preprocess()
- * @see template_preprocess_comment_wrapper()
- *
- * @ingroup themeable
- */
-#}
-<section{{ attributes }}>
-  {% if comments and node.type != 'forum' %}
-    {{ title_prefix }}
-    <h2 class="title">{{ 'Comments'|t }}</h2>
-    {{ title_suffix }}
-  {% endif %}
-
-  {{ comments }}
-
-  {% if form %}
-    <h2 class="title comment-form">{{ 'Add new comment'|t }}</h2>
-    {{ form }}
-  {% endif %}
-
-</section>
diff --git a/core/modules/comment/templates/comment-wrapper.tpl.php b/core/modules/comment/templates/comment-wrapper.tpl.php
new file mode 100644
index 0000000..91f2016
--- /dev/null
+++ b/core/modules/comment/templates/comment-wrapper.tpl.php
@@ -0,0 +1,48 @@
+<?php
+
+/**
+ * @file
+ * Provides an HTML container for comments.
+ *
+ * Available variables:
+ * - $content: The array of content-related elements for the node. Use
+ *   render($content) to print them all, or
+ *   print a subset such as render($content['comment_form']).
+ * - $attributes: An instance of Attributes class that can be manipulated as an
+ *    array and printed as a string.
+ *    It includes the 'class' information, which includes:
+ *   - comment-wrapper: The current template type, i.e., "theming hook".
+ * - $title_prefix (array): An array containing additional output populated by
+ *   modules, intended to be displayed in front of the main title tag that
+ *   appears in the template.
+ * - $title_suffix (array): An array containing additional output populated by
+ *   modules, intended to be displayed after the main title tag that appears in
+ *   the template.
+ *
+ * The following variables are provided for contextual information.
+ * - $node: Node entity the comments are attached to.
+ * The constants below the variables show the possible values and should be
+ * used for comparison.
+ * - $display_mode
+ *   - COMMENT_MODE_FLAT
+ *   - COMMENT_MODE_THREADED
+ *
+ * @see template_preprocess_comment_wrapper()
+ *
+ * @ingroup themeable
+ */
+?>
+<section id="comments" <?php print $attributes; ?>>
+  <?php if ($content['comments'] && $node->type != 'forum'): ?>
+    <?php print render($title_prefix); ?>
+    <h2 class="title"><?php print t('Comments'); ?></h2>
+    <?php print render($title_suffix); ?>
+  <?php endif; ?>
+
+  <?php print render($content['comments']); ?>
+
+  <?php if ($content['comment_form']): ?>
+    <h2 class="title comment-form"><?php print t('Add comment'); ?></h2>
+    <?php print render($content['comment_form']); ?>
+  <?php endif; ?>
+</section>
diff --git a/core/modules/comment/templates/comment.html.twig b/core/modules/comment/templates/comment.html.twig
deleted file mode 100644
index 4b441dd..0000000
--- a/core/modules/comment/templates/comment.html.twig
+++ /dev/null
@@ -1,106 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for comments.
- *
- * Available variables:
- * - author: Comment author. Can be a link or plain text.
- * - content: The content-related items for the comment display. Use
- *   {{ content }} to print them all, or print a subset such as
- *   {{ content.field_example }}. Use hide(content.field_example) to temporarily
- *   suppress the printing of a given element.
- * - created: Formatted date and time for when the comment was created.
- *   Preprocess functions can reformat it by calling format_date() with the
- *   desired parameters on the 'comment.created' variable.
- * - changed: Formatted date and time for when the comment was last changed.
- *   Preprocess functions can reformat it by calling format_date() with the
- *   desired parameters on the 'comment.changed' variable.
- * - new: New comment marker.
- * - permalink: Comment permalink.
- * - submitted: Submission information created from author and created
- *   during template_preprocess_comment().
- * - user_picture: The comment author's profile picture.
- * - signature: The comment author's signature.
- * - status: Comment status. Possible values are:
- *   unpublished, published, or preview.
- * - title: Comment title, linked to the comment.
- * - attributes.class: List of classes that can be used to style contextually
- *   through CSS. The default values can be one or more of the following:
- *   - comment: The current template type; e.g., 'theming hook'.
- *   - by-anonymous: Comment by an unregistered user.
- *   - by-node-author: Comment by the author of the parent node.
- *   - preview: When previewing a new or edited comment.
- *   The following applies only to viewers who are registered users:
- *   - unpublished: An unpublished comment visible only to administrators.
- *   - by-viewer: Comment by the user currently viewing the page.
- *   - new: New comment since the last visit.
- * - title_prefix: Additional output populated by modules, intended to be
- *   displayed in front of the main title tag that appears in the template.
- * - title_suffix: Additional output populated by modules, intended to be
- *   displayed after the main title tag that appears in the template.
- * - content_attributes: List of classes for the styling of the comment content.
- *
- * These variables are provided to give context about the parent comment (if
- * any):
- * - comment_parent: Full parent comment entity (if any).
- * - parent_author: Equivalent to author for the parent comment.
- * - parent_created: Equivalent to created for the parent comment.
- * - parent_changed: Equivalent to changed for the parent comment.
- * - parent_title: Equivalent to title for the parent comment.
- * - parent_permalink: Equivalent to permalink for the parent comment.
- * - parent: A text string of parent comment submission information created from
- *   'parent_author' and 'parent_created' during template_preprocess_comment().
- *   This information is presented to help screen readers follow lengthy
- *   discussion threads. You can hide this from sighted users using the class
- *   element-invisible.
- *
- * These two variables are provided for context:
- * - comment: Full comment object.
- * - node: Node entity the comments are attached to.
- *
- * @see template_preprocess()
- * @see template_preprocess_comment()
- *
- * @ingroup themeable
- */
-#}
-<article{{ attributes }}>
-  {{ title_prefix }}
-
-  {% if new %}
-    <mark class="new">{{ new }}</mark>
-  {% endif %}
-
-  <h3{{ title_attributes }}>{{ title }}</h3>
-
-  {{ title_suffix }}
-
-  <footer>
-    {{ user_picture }}
-    <p class="submitted">{{ submitted }}</p>
-
-    {#
-      Indicate the semantic relationship between parent and child comments
-      for accessibility. The list is difficult to navigate in a screen
-      reader without this information.
-    #}
-    {% if parent %}
-      <p class="parent element-invisible">{{ parent }}</p>
-    {% endif %}
-
-    {{ permalink }}
-  </footer>
-
-  <div{{ content_attributes }}>
-    {# We hide the links now so that we can render them later. #}
-    {% hide(content.links) %}
-    {{ content }}
-
-    {% if signature %}
-      <div class="user-signature">
-        {{ signature }}
-      </div>
-    {% endif %}
-  </div>
-  {{ content.links }}
-</article>
diff --git a/core/modules/comment/templates/comment.tpl.php b/core/modules/comment/templates/comment.tpl.php
new file mode 100644
index 0000000..5a8a37e
--- /dev/null
+++ b/core/modules/comment/templates/comment.tpl.php
@@ -0,0 +1,110 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation for comments.
+ *
+ * Available variables:
+ * - $author: Comment author. Can be link or plain text.
+ * - $content: An array of comment items. Use render($content) to print them
+ *   all, or print a subset such as render($content['field_example']). Use
+ *   hide($content['field_example']) to temporarily suppress the printing of a
+ *   given element.
+ * - $created: Formatted date and time for when the comment was created.
+ *   Preprocess functions can reformat it by calling format_date() with the
+ *   desired parameters on the $comment->created variable.
+ * - $changed: Formatted date and time for when the comment was last changed.
+ *   Preprocess functions can reformat it by calling format_date() with the
+ *   desired parameters on the $comment->changed variable.
+ * - $new: New comment marker.
+ * - $permalink: Comment permalink.
+ * - $submitted: Submission information created from $author and $created during
+ *   template_preprocess_comment().
+ * - $user_picture: The comment author's picture. Use render($user_picture) to
+ *   print it.
+ * - $signature: Authors signature.
+ * - $status: Comment status. Possible values are:
+ *   unpublished, published, or preview.
+ * - $title: Linked title.
+ * - $attributes: An instance of Attributes class that can be manipulated as an
+ *    array and printed as a string.
+ *    It includes the 'class' information, which includes:
+ *   - comment: The current template type; e.g., 'theming hook'.
+ *   - by-anonymous: Comment by an unregistered user.
+ *   - by-node-author: Comment by the author of the parent node.
+ *   - preview: When previewing a new or edited comment.
+ *   The following applies only to viewers who are registered users:
+ *   - unpublished: An unpublished comment visible only to administrators.
+ *   - by-viewer: Comment by the user currently viewing the page.
+ *   - new: New comment since the last visit.
+ * - $title_prefix (array): An array containing additional output populated by
+ *   modules, intended to be displayed in front of the main title tag that
+ *   appears in the template.
+ * - $title_suffix (array): An array containing additional output populated by
+ *   modules, intended to be displayed after the main title tag that appears in
+ *   the template.
+ *
+ * These variables are provided to give context about the parent comment (if
+ * any):
+ * - $comment_parent: Full parent comment object (if any).
+ * - $parent_author: Equivalent to $author for the parent comment.
+ * - $parent_created: Equivalent to $created for the parent comment.
+ * - $parent_changed: Equivalent to $changed for the parent comment.
+ * - $parent_title: Equivalent to $title for the parent comment.
+ * - $parent_permalink: Equivalent to $permalink for the parent comment.
+ * - $parent: A text string of parent comment submission information created
+ *   from $parent_author and $parent_created during
+ *   template_preprocess_comment(). This information is presented to help
+ *   screen readers follow lengthy discussion threads. You can hide this from
+ *   sighted users using the class element-invisible.
+ *
+ * These two variables are provided for context:
+ * - $comment: Full comment object.
+ * - $node: Node entity the comments are attached to.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_comment()
+ * @see template_process()
+ * @see theme_comment()
+ *
+ * @ingroup themeable
+ */
+?>
+<article class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?>>
+
+  <?php print render($title_prefix); ?>
+  <?php if ($new): ?>
+    <mark class="new"><?php print $new; ?></mark>
+  <?php endif; ?>
+  <h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
+  <?php print render($title_suffix); ?>
+
+  <footer>
+    <?php print render($user_picture); ?>
+    <p class="submitted"><?php print $submitted; ?></p>
+    <?php
+      // Indicate the semantic relationship between parent and child comments
+      // for accessibility. The list is difficult to navigate in a screen
+      // reader without this information.
+      if ($parent):
+    ?>
+      <p class="parent element-invisible"><?php print $parent; ?></p>
+    <?php endif; ?>
+    <?php print $permalink; ?>
+  </footer>
+
+  <div class="content"<?php print $content_attributes; ?>>
+    <?php
+      // We hide the links now so that we can render them later.
+      hide($content['links']);
+      print render($content);
+    ?>
+    <?php if ($signature): ?>
+    <div class="user-signature">
+      <?php print $signature; ?>
+    </div>
+    <?php endif; ?>
+  </div>
+
+  <?php print render($content['links']) ?>
+</article>
diff --git a/core/modules/contextual/contextual.js b/core/modules/contextual/contextual.js
index 18a5be1..2ccb2f7 100644
--- a/core/modules/contextual/contextual.js
+++ b/core/modules/contextual/contextual.js
@@ -30,7 +30,7 @@ function initContextual ($contextual) {
     // positioning and behavior attachment context.
     .addClass('contextual')
     // Ensure a trigger element exists before the actual contextual links.
-    .prepend(Drupal.theme('contextualTrigger'));
+    .prepend(Drupal.theme('contextualTrigger'))
 
   // Create a model and the appropriate views.
   var model = new contextual.Model({
diff --git a/core/modules/edit/edit.module b/core/modules/edit/edit.module
index 5b11560..6a73d89 100644
--- a/core/modules/edit/edit.module
+++ b/core/modules/edit/edit.module
@@ -137,7 +137,7 @@ function edit_preprocess_field(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for node.html.twig.
+ * Implements hook_preprocess_HOOK() for node.tpl.php.
  *
  * @todo Remove this, handle in generic way: http://drupal.org/node/1972514.
  */
@@ -157,7 +157,7 @@ function edit_preprocess_taxonomy_term(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  *
  * @todo Remove this, handle in generic way: http://drupal.org/node/1972514.
  */
diff --git a/core/modules/field/field.api.php b/core/modules/field/field.api.php
index 75a99df..b159f59 100644
--- a/core/modules/field/field.api.php
+++ b/core/modules/field/field.api.php
@@ -970,7 +970,7 @@ function hook_field_attach_update(\Drupal\Core\Entity\EntityInterface $entity) {
 /**
  * Alter field_attach_preprocess() variables.
  *
- * This hook is invoked while preprocessing field templates in
+ * This hook is invoked while preprocessing the field.tpl.php template file in
  * field_attach_preprocess().
  *
  * @param $variables
diff --git a/core/modules/field/field.module b/core/modules/field/field.module
index a429eea..bf0ac56 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module
@@ -985,17 +985,10 @@ function field_page_build(&$page) {
 }
 
 /**
- * Prepares variables for field templates.
+ * Theme preprocess function for theme_field() and field.tpl.php.
  *
- * Default template: field.html.twig.
- *
- * @param array $variables
- *   An associative array containing:
- *   - element: A render element representing the field.
- *   - attributes: A string containing the attributes for the wrapping div.
- *   - title_attributes: A string containing the attributes for the title.
- *   - content_attributes: A string containing the attributes for the content's
- *     div.
+ * @see theme_field()
+ * @see field.tpl.php
  */
 function template_preprocess_field(&$variables, $hook) {
   $element = $variables['element'];
@@ -1048,10 +1041,10 @@ function template_preprocess_field(&$variables, $hook) {
 }
 
 /**
- * Theme process function for theme_field() and field.html.twig.
+ * Theme process function for theme_field() and field.tpl.php.
  *
  * @see theme_field()
- * @see field.html.twig
+ * @see field.tpl.php
  */
 function template_process_field(&$variables, $hook) {
   static $default_attributes;
@@ -1091,23 +1084,23 @@ function template_process_field(&$variables, $hook) {
  * - THEMENAME_field()
  *
  * Theme developers who prefer to customize templates instead of overriding
- * functions may copy the "field.html.twig" from the "modules/field/theme"
- * folder of the Drupal installation to somewhere within the theme's folder and
+ * functions may copy the "field.tpl.php" from the "modules/field/theme" folder
+ * of the Drupal installation to somewhere within the theme's folder and
  * customize it, just like customizing other Drupal templates such as
- * page.html.twig or node.html.twig. However, it takes longer for the server to
+ * page.tpl.php or node.tpl.php. However, it takes longer for the server to
  * process templates than to call a function, so for websites with many fields
  * displayed on a page, this can result in a noticeable slowdown of the website.
- * For these websites, developers are discouraged from placing a field.html.twig
+ * For these websites, developers are discouraged from placing a field.tpl.php
  * file into the theme's folder, but may customize templates for specific
  * fields. For example, for a field named 'body' displayed on the 'article'
  * content type, any of the following templates will override this default
  * implementation. The first of these templates that exists is used:
- * - field--body--article.html.twig
- * - field--article.html.twig
- * - field--body.html.twig
- * - field.html.twig
+ * - field--body--article.tpl.php
+ * - field--article.tpl.php
+ * - field--body.tpl.php
+ * - field.tpl.php
  * So, if the body field on the article content type needs customization, a
- * field--body--article.html.twig file can be added within the theme's folder.
+ * field--body--article.tpl.php file can be added within the theme's folder.
  * Because it's a template, it will result in slightly more time needed to
  * display that field, but it will not impact other fields, and therefore, is
  * unlikely to cause a noticeable change in website performance. A very rough
@@ -1132,7 +1125,7 @@ function template_process_field(&$variables, $hook) {
  *
  * @see template_preprocess_field()
  * @see template_process_field()
- * @see field.html.twig
+ * @see field.tpl.php
  *
  * @ingroup themeable
  */
diff --git a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
index 19fe3e1..7e7de46 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
@@ -371,7 +371,7 @@ public function buildOptionsForm(&$form, &$form_state) {
       '#title' => t('Use field template'),
       '#type' => 'checkbox',
       '#default_value' => $this->options['field_api_classes'],
-      '#description' => t('If checked, field api classes will be added by field templates. This is not recommended unless your CSS depends upon these classes. If not checked, template will not be used.'),
+      '#description' => t('If checked, field api classes will be added using field.tpl.php (or equivalent). This is not recommended unless your CSS depends upon these classes. If not checked, template will not be used.'),
       '#fieldset' => 'style_settings',
       '#weight' => 20,
     );
diff --git a/core/modules/field/templates/field.html.twig b/core/modules/field/templates/field.html.twig
deleted file mode 100644
index 4b13366..0000000
--- a/core/modules/field/templates/field.html.twig
+++ /dev/null
@@ -1,48 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a field.
- *
- * To override output, copy the "field.html.twig" from the templates directory
- * to your theme's directory and customize it, just like customizing other
- * Drupal templates such as page.html.twig or node.html.twig.
- *
- * For example, for a field named 'body' displayed on the 'article' content
- * type, any of the following templates will override this default
- * implementation. The first of these templates that exists is used:
- * - field--body--article.html.twig
- * - field--article.html.twig
- * - field--body.html.twig
- * - field.html.twig
- *
- * Available variables:
- * - attributes: HTML attributes for the containing element.
- * - label_hidden: Whether to show the field label or not.
- * - title_attributes: HTML attributes for the title.
- * - label: The label for the field.
- * - content_attributes: HTML attributes for the content.
- * - items: List of all the field items.
- * - item_attributes: List of HTML attributes for each item.
- *
- * @see template_preprocess_field()
- * @see theme_field()
- *
- * @ingroup themeable
- */
-#}
-<!--
-THIS FILE IS NOT USED AND IS HERE AS A STARTING POINT FOR CUSTOMIZATION ONLY.
-See http://api.drupal.org/api/function/theme_field/8 for details.
-After copying this file to your theme's folder and customizing it, remove this
-HTML comment.
--->
-<div{{ attributes }}>
-  {% if not label_hidden %}
-    <div class="field-label"{{ title_attributes }}>{{ label }}:&nbsp;</div>
-  {% endif %}
-  <div class="field-items"{{ content_attributes }}>
-    {% for delta, item in items %}
-      <div class="field-item {{ cycle(["even", "odd"], delta) }}"{{ item_attributes[delta] }}>{{ item }}</div>
-    {% endfor %}
-  </div>
-</div>
diff --git a/core/modules/field/templates/field.tpl.php b/core/modules/field/templates/field.tpl.php
new file mode 100644
index 0000000..a8ffe32
--- /dev/null
+++ b/core/modules/field/templates/field.tpl.php
@@ -0,0 +1,59 @@
+<?php
+
+/**
+ * @file field.tpl.php
+ * Default template implementation to display the value of a field.
+ *
+ * This file is not used and is here as a starting point for customization only.
+ * @see theme_field()
+ *
+ * Available variables:
+ * - $items: An array of field values. Use render() to output them.
+ * - $label: The item label.
+ * - $label_hidden: Whether the label display is set to 'hidden'.
+ * - $attributes: An instance of Attributes class that can be manipulated as an
+ *    array and printed as a string.
+ *    It includes the 'class' information, which includes:
+ *   - field: The current template type, i.e., "theming hook".
+ *   - field-name-[field_name]: The current field name. For example, if the
+ *     field name is "field_description" it would result in
+ *     "field-name-field-description".
+ *   - field-type-[field_type]: The current field type. For example, if the
+ *     field type is "text" it would result in "field-type-text".
+ *   - field-label-[label_display]: The current label position. For example, if
+ *     the label position is "above" it would result in "field-label-above".
+ *
+ * Other variables:
+ * - $element['#object']: The entity to which the field is attached.
+ * - $element['#view_mode']: View mode, e.g. 'full', 'teaser'...
+ * - $element['#field_name']: The field name.
+ * - $element['#field_type']: The field type.
+ * - $element['#field_language']: The field language.
+ * - $element['#field_translatable']: Whether the field is translatable or not.
+ * - $element['#label_display']: Position of label display, inline, above, or
+ *   hidden.
+ * - $field_name_css: The css-compatible field name.
+ * - $field_type_css: The css-compatible field type.
+ *
+ * @see template_preprocess_field()
+ * @see theme_field()
+ *
+ * @ingroup themeable
+ */
+?>
+<!--
+THIS FILE IS NOT USED AND IS HERE AS A STARTING POINT FOR CUSTOMIZATION ONLY.
+See http://api.drupal.org/api/function/theme_field/8 for details.
+After copying this file to your theme's folder and customizing it, remove this
+HTML comment.
+-->
+<div class="<?php print $attributes['class']; ?>"<?php print $attributes; ?>>
+  <?php if (!$label_hidden): ?>
+    <div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>:&nbsp;</div>
+  <?php endif; ?>
+  <div class="field-items"<?php print $content_attributes; ?>>
+    <?php foreach ($items as $delta => $item): ?>
+      <div class="field-item <?php print $delta % 2 ? 'odd' : 'even'; ?>"<?php print $item_attributes[$delta]; ?>><?php print render($item); ?></div>
+    <?php endforeach; ?>
+  </div>
+</div>
diff --git a/core/modules/field/tests/modules/field_test/field_test.entity.inc b/core/modules/field/tests/modules/field_test/field_test.entity.inc
index 817986f..9c32a52 100644
--- a/core/modules/field/tests/modules/field_test/field_test.entity.inc
+++ b/core/modules/field/tests/modules/field_test/field_test.entity.inc
@@ -199,7 +199,7 @@ function field_test_entity_save(EntityInterface $entity) {
 }
 
 /**
- * Menu callback: displays the 'Add new test_entity' form.
+ * Menu callback: displays the 'Add test_entity' form.
  */
 function field_test_entity_add($fttype) {
   $fttype = str_replace('-', '_', $fttype);
diff --git a/core/modules/field_ui/field_ui.admin.inc b/core/modules/field_ui/field_ui.admin.inc
index 3ee1eaa..3c99e67 100644
--- a/core/modules/field_ui/field_ui.admin.inc
+++ b/core/modules/field_ui/field_ui.admin.inc
@@ -109,7 +109,7 @@ function field_ui_field_overview_row_region($row) {
       return 'content';
     case 'add_new_field':
       // If no input in 'label', assume the row has not been dragged out of the
-      // 'add new' section.
+      // 'add' section.
       return (!empty($row['label']['#value']) ? 'content' : 'hidden');
   }
 }
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
index e6caf4e..b283308 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
@@ -64,7 +64,7 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL,
     );
 
     if (empty($instances) && empty($extra_fields)) {
-      drupal_set_message(t('There are no fields yet added. You can add new fields on the <a href="@link">Manage fields</a> page.', array('@link' => url($this->adminPath . '/fields'))), 'warning');
+      drupal_set_message(t('There are no fields yet added. You can add fields on the <a href="@link">Manage fields</a> page.', array('@link' => url($this->adminPath . '/fields'))), 'warning');
       return $form;
     }
 
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php
index 44e4be7..55b25dd 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php
@@ -206,7 +206,7 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL,
       );
     }
 
-    // Additional row: add new field.
+    // Additional row: add field.
     $max_weight = $entity_form_display->getHighestWeight();
     $field_type_options = field_ui_field_type_options();
     $widget_type_options = field_ui_widget_type_options(NULL, TRUE);
@@ -222,7 +222,7 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL,
           '#title_display' => 'invisible',
           '#size' => 15,
           '#description' => t('Label'),
-          '#prefix' => '<div class="label-input"><div class="add-new-placeholder">' . t('Add new field') .'</div>',
+          '#prefix' => '<div class="label-input"><div class="add-new-placeholder">' . t('Add field') .'</div>',
           '#suffix' => '</div>',
         ),
         'weight' => array(
@@ -423,7 +423,7 @@ public function validateForm(array &$form, array &$form_state) {
   }
 
   /**
-   * Validates the 'add new field' row.
+   * Validates the 'add field' row.
    *
    * @param array $form
    *   An associative array containing the structure of the form.
@@ -435,16 +435,16 @@ public function validateForm(array &$form, array &$form_state) {
   protected function validateAddNew(array $form, array &$form_state) {
     $field = $form_state['values']['fields']['_add_new_field'];
 
-    // Validate if any information was provided in the 'add new field' row.
+    // Validate if any information was provided in the 'add field' row.
     if (array_filter(array($field['label'], $field['field_name'], $field['type'], $field['widget_type']))) {
       // Missing label.
       if (!$field['label']) {
-        form_set_error('fields][_add_new_field][label', t('Add new field: you need to provide a label.'));
+        form_set_error('fields][_add_new_field][label', t('Add field: you need to provide a label.'));
       }
 
       // Missing field name.
       if (!$field['field_name']) {
-        form_set_error('fields][_add_new_field][field_name', t('Add new field: you need to provide a field name.'));
+        form_set_error('fields][_add_new_field][field_name', t('Add field: you need to provide a field name.'));
       }
       // Field name validation.
       else {
@@ -457,18 +457,18 @@ protected function validateAddNew(array $form, array &$form_state) {
 
       // Missing field type.
       if (!$field['type']) {
-        form_set_error('fields][_add_new_field][type', t('Add new field: you need to select a field type.'));
+        form_set_error('fields][_add_new_field][type', t('Add field: you need to select a field type.'));
       }
 
       // Missing widget type.
       if (!$field['widget_type']) {
-        form_set_error('fields][_add_new_field][widget_type', t('Add new field: you need to select a widget.'));
+        form_set_error('fields][_add_new_field][widget_type', t('Add field: you need to select a widget.'));
       }
       // Wrong widget type.
       elseif ($field['type']) {
         $widget_types = field_ui_widget_type_options($field['type']);
         if (!isset($widget_types[$field['widget_type']])) {
-          form_set_error('fields][_add_new_field][widget_type', t('Add new field: invalid widget.'));
+          form_set_error('fields][_add_new_field][widget_type', t('Add field: invalid widget.'));
         }
       }
     }
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Tests/FieldUiTestBase.php b/core/modules/field_ui/lib/Drupal/field_ui/Tests/FieldUiTestBase.php
index 2d3fb98..2540424 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Tests/FieldUiTestBase.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Tests/FieldUiTestBase.php
@@ -71,7 +71,7 @@ function fieldUIAddNewField($bundle_path, $initial_edit, $field_edit = array(),
     $label = $initial_edit['fields[_add_new_field][label]'];
     $field_name = $initial_edit['fields[_add_new_field][field_name]'];
 
-    // First step : 'Add new field' on the 'Manage fields' page.
+    // First step : 'Add field' on the 'Manage fields' page.
     $this->drupalPost("$bundle_path/fields",  $initial_edit, t('Save'));
     $this->assertRaw(t('These settings apply to the %label field everywhere it is used.', array('%label' => $label)), 'Field settings page was displayed.');
 
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageDisplayTest.php b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageDisplayTest.php
index 51dc8b1..3eccf6d 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageDisplayTest.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageDisplayTest.php
@@ -210,7 +210,7 @@ function testNoFieldsDisplayOverview() {
     field_delete_instance(field_info_instance('node', 'body', 'no_fields'));
 
     $this->drupalGet('admin/structure/types/manage/no_fields/display');
-    $this->assertRaw(t('There are no fields yet added. You can add new fields on the <a href="@link">Manage fields</a> page.', array('@link' => url('admin/structure/types/manage/no_fields/fields'))));
+    $this->assertRaw(t('There are no fields yet added. You can add fields on the <a href="@link">Manage fields</a> page.', array('@link' => url('admin/structure/types/manage/no_fields/fields'))));
   }
 
   /**
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php
index 5b84d0e..691ac39 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageFieldsTest.php
@@ -94,9 +94,9 @@ function manageFieldsPage($type = '') {
       $this->assertRaw($table_header . '</th>', format_string('%table_header table header was found.', array('%table_header' => $table_header)));
     }
 
-    // "Add new field" and "Re-use existing field" aren't a table heading so just
+    // "Add field" and "Re-use existing field" aren't a table heading so just
     // test the text.
-    foreach (array('Add new field', 'Re-use existing field') as $element) {
+    foreach (array('Add field', 'Re-use existing field') as $element) {
       $this->assertText($element, format_string('"@element" was found.', array('@element' => $element)));
     }
   }
@@ -393,9 +393,9 @@ function testLockedField() {
   function testHiddenFields() {
     $bundle_path = 'admin/structure/types/manage/' . $this->type . '/fields/';
 
-    // Check that the field type is not available in the 'add new field' row.
+    // Check that the field type is not available in the 'add field' row.
     $this->drupalGet($bundle_path);
-    $this->assertFalse($this->xpath('//select[@id="edit-add-new-field-type"]//option[@value="hidden_test_field"]'), "The 'add new field' select respects field types 'no_ui' property.");
+    $this->assertFalse($this->xpath('//select[@id="edit-add-new-field-type"]//option[@value="hidden_test_field"]'), "The 'add field' select respects field types 'no_ui' property.");
 
     // Create a field and an instance programmatically.
     $field_name = 'hidden_test_field';
diff --git a/core/modules/file/file.field.inc b/core/modules/file/file.field.inc
index 59d068b..c8ba5cd 100644
--- a/core/modules/file/file.field.inc
+++ b/core/modules/file/file.field.inc
@@ -261,7 +261,7 @@ function file_field_update(EntityInterface $entity, $field, $instance, $langcode
     }
   }
 
-  // Add new usage entries for newly added files.
+  // Add usage entries for newly added files.
   foreach ($items as $item) {
     if (!in_array($item['fid'], $original_fids)) {
       file_usage()->add(file_load($item['fid']), 'file', $entity->entityType(), $entity->id());
diff --git a/core/modules/file/tests/file_test/file_test.module b/core/modules/file/tests/file_test/file_test.module
index 8cff297..ac5267d 100644
--- a/core/modules/file/tests/file_test/file_test.module
+++ b/core/modules/file/tests/file_test/file_test.module
@@ -412,7 +412,7 @@ function file_test_file_url_alter(&$uri) {
  * Implements hook_file_mimetype_mapping_alter().
  */
 function file_test_file_mimetype_mapping_alter(&$mapping) {
-  // Add new mappings.
+  // Add mappings.
   $mapping['mimetypes']['file_test_mimetype_1'] = 'madeup/file_test_1';
   $mapping['mimetypes']['file_test_mimetype_2'] = 'madeup/file_test_2';
   $mapping['mimetypes']['file_test_mimetype_3'] = 'madeup/doc';
diff --git a/core/modules/filter/config/filter.format.plain_text.yml b/core/modules/filter/config/filter.format.plain_text.yml
index 8ce9548..a7f72cd 100644
--- a/core/modules/filter/config/filter.format.plain_text.yml
+++ b/core/modules/filter/config/filter.format.plain_text.yml
@@ -15,19 +15,12 @@ filters:
   filter_html_escape:
     module: filter
     status: '1'
-    weight: '-10'
-    settings: {  }
   # Convert URLs into links.
   filter_url:
     module: filter
     status: '1'
-    weight: '0'
-    settings:
-      filter_url_length: '72'
   # Convert linebreaks into paragraphs.
   filter_autop:
     module: filter
     status: '1'
-    weight: '0'
-    settings: {  }
 langcode: und
diff --git a/core/modules/filter/filter.admin.inc b/core/modules/filter/filter.admin.inc
index a4493a9..aa3018c 100644
--- a/core/modules/filter/filter.admin.inc
+++ b/core/modules/filter/filter.admin.inc
@@ -197,9 +197,25 @@ function filter_admin_format_form($form, &$form_state, $format) {
     $form['roles']['#default_value'] = array($admin_role);
   }
 
-  // Create filter plugin instances for all available filters, including both
-  // enabled/configured ones as well as new and not yet unconfigured ones.
-  $filters = $format->filters()->sort();
+  // Retrieve available filters and load all configured filters for existing
+  // text formats.
+  $filter_info = filter_get_filters();
+  $filters = !empty($format->format) ? filter_list_format($format->format) : array();
+
+  // Prepare filters for form sections.
+  foreach ($filter_info as $name => $filter) {
+    // Create an empty filter object for new/unconfigured filters.
+    if (!isset($filters[$name])) {
+      $filters[$name] = new stdClass();
+      $filters[$name]->format = $format->format;
+      $filters[$name]->module = $filter['module'];
+      $filters[$name]->name = $name;
+      $filters[$name]->status = 0;
+      $filters[$name]->weight = $filter['weight'];
+      $filters[$name]->settings = array();
+    }
+  }
+  $form['#filters'] = $filters;
 
   // Filter status.
   $form['filters']['status'] = array(
@@ -212,6 +228,17 @@ function filter_admin_format_form($form, &$form_state, $format) {
     // @see http://drupal.org/node/1829202
     '#input' => FALSE,
   );
+  foreach ($filter_info as $name => $filter) {
+    $form['filters']['status'][$name] = array(
+      '#type' => 'checkbox',
+      '#title' => $filter['title'],
+      '#default_value' => $filters[$name]->status,
+      '#parents' => array('filters', $name, 'status'),
+      '#description' => $filter['description'],
+      '#weight' => $filter['weight'],
+    );
+  }
+
   // Filter order (tabledrag).
   $form['filters']['order'] = array(
     '#type' => 'table',
@@ -225,54 +252,48 @@ function filter_admin_format_form($form, &$form_state, $format) {
     '#input' => FALSE,
     '#theme_wrappers' => array('form_element'),
   );
-  // Filter settings.
-  $form['filter_settings'] = array(
-    '#type' => 'vertical_tabs',
-    '#title' => t('Filter settings'),
-  );
-
-  foreach ($filters as $name => $filter) {
-    $form['filters']['status'][$name] = array(
-      '#type' => 'checkbox',
-      '#title' => $filter->getLabel(),
-      '#default_value' => $filter->status,
-      '#parents' => array('filters', $name, 'status'),
-      '#description' => $filter->getDescription(),
-      '#weight' => $filter->weight,
-    );
-
+  foreach ($filter_info as $name => $filter) {
     $form['filters']['order'][$name]['#attributes']['class'][] = 'draggable';
-    $form['filters']['order'][$name]['#weight'] = $filter->weight;
+    $form['filters']['order'][$name]['#weight'] = $filters[$name]->weight;
     $form['filters']['order'][$name]['filter'] = array(
-      '#markup' => $filter->getLabel(),
+      '#markup' => $filter['title'],
     );
     $form['filters']['order'][$name]['weight'] = array(
       '#type' => 'weight',
-      '#title' => t('Weight for @title', array('@title' => $filter->getLabel())),
+      '#title' => t('Weight for @title', array('@title' => $filter['title'])),
       '#title_display' => 'invisible',
       '#delta' => 50,
-      '#default_value' => $filter->weight,
+      '#default_value' => $filters[$name]->weight,
       '#parents' => array('filters', $name, 'weight'),
       '#attributes' => array('class' => array('filter-order-weight')),
     );
+  }
+  // Make sure filters are in the correct order, since filter_get_filters()
+  // doesn't return sorted filters.
+  uasort($form['filters']['order'], 'element_sort');
 
-    // Retrieve the settings form of the filter plugin. The plugin should not be
-    // aware of the text format. Therefore, it only receives a set of minimal
-    // base properties to allow advanced implementations to work.
-    $settings_form = array(
-      '#parents' => array('filters', $name, 'settings'),
-      '#tree' => TRUE,
-    );
-    $settings_form = $filter->settingsForm($settings_form, $form_state);
-    if (!empty($settings_form)) {
-      $form['filters']['settings'][$name] = array(
-        '#type' => 'details',
-        '#title' => $filter->getLabel(),
-        '#weight' => $filter->weight,
-        '#parents' => array('filters', $name, 'settings'),
-        '#group' => 'filter_settings',
-      );
-      $form['filters']['settings'][$name] += $settings_form;
+  // Filter settings.
+  $form['filter_settings'] = array(
+    '#type' => 'vertical_tabs',
+    '#title' => t('Filter settings'),
+  );
+
+  foreach ($filter_info as $name => $filter) {
+    if (isset($filter['settings callback'])) {
+      $function = $filter['settings callback'];
+      // Pass along stored filter settings and default settings, but also the
+      // format object and all filters to allow for complex implementations.
+      $settings_form = $function($form, $form_state, $filters[$name], $format, $filter['default settings'], $filters);
+      if (!empty($settings_form)) {
+        $form['filters']['settings'][$name] = array(
+          '#type' => 'details',
+          '#title' => $filter['title'],
+          '#parents' => array('filters', $name, 'settings'),
+          '#weight' => $filter['weight'],
+          '#group' => 'filter_settings',
+        );
+        $form['filters']['settings'][$name] += $settings_form;
+      }
     }
   }
 
@@ -316,14 +337,7 @@ function filter_admin_format_form_submit($form, &$form_state) {
   // Add the submitted form values to the text format, and save it.
   $format = $form['#format'];
   foreach ($form_state['values'] as $key => $value) {
-    if ($key != 'filters') {
-      $format->set($key, $value);
-    }
-    else {
-      foreach ($value as $instance_id => $config) {
-        $format->setFilterConfig($instance_id, $config);
-      }
-    }
+    $format->set($key, $value);
   }
   $status = $format->save();
 
diff --git a/core/modules/filter/filter.api.php b/core/modules/filter/filter.api.php
index 8d6aa01..49311c8 100644
--- a/core/modules/filter/filter.api.php
+++ b/core/modules/filter/filter.api.php
@@ -11,19 +11,283 @@
  */
 
 /**
+ * Define content filters.
+ *
+ * User submitted content is passed through a group of filters before it is
+ * output in HTML, in order to remove insecure or unwanted parts, correct or
+ * enhance the formatting, transform special keywords, etc. A group of filters
+ * is referred to as a "text format". Administrators can create as many text
+ * formats as needed. Individual filters can be enabled and configured
+ * differently for each text format.
+ *
+ * This hook is invoked by filter_get_filters() and allows modules to register
+ * input filters they provide.
+ *
+ * Filtering is a two-step process. First, the content is 'prepared' by calling
+ * the 'prepare callback' function for every filter. The purpose of the
+ * 'prepare callback' is to escape HTML-like structures. For example, imagine a
+ * filter which allows the user to paste entire chunks of programming code
+ * without requiring manual escaping of special HTML characters like < or &. If
+ * the programming code were left untouched, then other filters could think it
+ * was HTML and change it. For many filters, the prepare step is not necessary.
+ *
+ * The second step is the actual processing step. The result from passing the
+ * text through all the filters' prepare steps gets passed to all the filters
+ * again, this time with the 'process callback' function. The process callbacks
+ * should then actually change the content: transform URLs into hyperlinks,
+ * convert smileys into images, etc.
+ *
+ * For performance reasons content is only filtered once; the result is stored
+ * in the cache table and retrieved from the cache the next time the same piece
+ * of content is displayed. If a filter's output is dynamic, it can override
+ * the cache mechanism, but obviously this should be used with caution: having
+ * one filter that does not support caching in a particular text format
+ * disables caching for the entire format, not just for one filter.
+ *
+ * Beware of the filter cache when developing your module: it is advised to set
+ * your filter to 'cache' => FALSE while developing, but be sure to remove that
+ * setting if it's not needed, when you are no longer in development mode.
+ *
+ * @return
+ *   An associative array of filters, whose keys are internal filter names,
+ *   which should be unique and therefore prefixed with the name of the module.
+ *   Each value is an associative array describing the filter, with the
+ *   following elements (all are optional except as noted):
+ *   - title: (required) An administrative summary of what the filter does.
+ *   - type: (required) A classification of the filter's purpose. This is one
+ *     of the following:
+ *     - FILTER_TYPE_HTML_RESTRICTOR: HTML tag and attribute restricting
+ *       filters.
+ *     - FILTER_TYPE_MARKUP_LANGUAGE: Non-HTML markup language filters that
+ *       generate HTML.
+ *     - FILTER_TYPE_TRANSFORM_IRREVERSIBLE: Irreversible transformation
+ *       filters.
+ *     - FILTER_TYPE_TRANSFORM_REVERSIBLE: Reversible transformation filters.
+ *   - description: Additional administrative information about the filter's
+ *     behavior, if needed for clarification.
+ *   - settings callback: The name of a function that returns configuration
+ *     form elements for the filter. See hook_filter_FILTER_settings() for
+ *     details.
+ *   - default settings: An associative array containing default settings for
+ *     the filter, to be applied when the filter has not been configured yet.
+ *   - prepare callback: The name of a function that escapes the content before
+ *     the actual filtering happens. See hook_filter_FILTER_prepare() for
+ *     details.
+ *   - process callback: (required) The name the function that performs the
+ *     actual filtering. See hook_filter_FILTER_process() for details.
+ *   - cache (default TRUE): Specifies whether the filtered text can be cached.
+ *     Note that setting this to FALSE makes the entire text format not
+ *     cacheable, which may have an impact on the site's overall performance.
+ *     See filter_format_allowcache() for details.
+ *   - tips callback: The name of a function that returns end-user-facing
+ *     filter usage guidelines for the filter. See hook_filter_FILTER_tips()
+ *     for details.
+ *   - weight: A default weight for the filter in new text formats.
+ *
+ * @see filter_example.module
+ * @see hook_filter_info_alter()
+ */
+function hook_filter_info() {
+  $filters['filter_html'] = array(
+    'title' => t('Limit allowed HTML tags'),
+    'type' => FILTER_TYPE_HTML_RESTRICTOR,
+    'description' => t('Allows you to restrict the HTML tags the user can use. It will also remove harmful content such as JavaScript events, JavaScript URLs and CSS styles from those tags that are not removed.'),
+    'process callback' => '_filter_html',
+    'settings callback' => '_filter_html_settings',
+    'default settings' => array(
+      'allowed_html' => '<a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>',
+      'filter_html_help' => 1,
+      'filter_html_nofollow' => 0,
+    ),
+    'tips callback' => '_filter_html_tips',
+  );
+  $filters['filter_autop'] = array(
+    'title' => t('Convert line breaks'),
+    'type' => FILTER_TYPE_MARKUP_LANGUAGE,
+    'description' => t('Converts line breaks into HTML (i.e. &lt;br&gt; and &lt;p&gt;) tags.'),
+    'process callback' => '_filter_autop',
+    'tips callback' => '_filter_autop_tips',
+  );
+  return $filters;
+}
+
+/**
  * Perform alterations on filter definitions.
  *
  * @param $info
- *   Array of information on filters exposed by filter plugins.
+ *   Array of information on filters exposed by hook_filter_info()
+ *   implementations.
  */
 function hook_filter_info_alter(&$info) {
+  // Replace the PHP evaluator process callback with an improved
+  // PHP evaluator provided by a module.
+  $info['php_code']['process callback'] = 'my_module_php_evaluator';
+
   // Alter the default settings of the URL filter provided by core.
-  $info['filter_url']['default_settings'] = array(
+  $info['filter_url']['default settings'] = array(
     'filter_url_length' => 100,
   );
 }
 
 /**
+ * @} End of "addtogroup hooks".
+ */
+
+/**
+ * Settings callback for hook_filter_info().
+ *
+ * Note: This is not really a hook. The function name is manually specified via
+ * 'settings callback' in hook_filter_info(), with this recommended callback
+ * name pattern. It is called from filter_admin_format_form().
+ *
+ * This callback function is used to provide a settings form for filter
+ * settings, for filters that need settings on a per-text-format basis. This
+ * function should return the form elements for the settings; the filter
+ * module will take care of saving the settings in the database.
+ *
+ * If the filter's behavior depends on an extensive list and/or external data
+ * (e.g. a list of smileys, a list of glossary terms), then the filter module
+ * can choose to provide a separate, global configuration page rather than
+ * per-text-format settings. In that case, the settings callback function
+ * should provide a link to the separate settings page.
+ *
+ * @param $form
+ *   The prepopulated form array of the filter administration form.
+ * @param $form_state
+ *   The state of the (entire) configuration form.
+ * @param $filter
+ *   The filter object containing the current settings for the given format,
+ *   in $filter->settings.
+ * @param $format
+ *   The format object being configured.
+ * @param $defaults
+ *   The default settings for the filter, as defined in 'default settings' in
+ *   hook_filter_info(). These should be combined with $filter->settings to
+ *   define the form element defaults.
+ * @param $filters
+ *   The complete list of filter objects that are enabled for the given format.
+ *
+ * @return
+ *   An array of form elements defining settings for the filter. Array keys
+ *   should match the array keys in $filter->settings and $defaults.
+ */
+function hook_filter_FILTER_settings($form, &$form_state, $filter, $format, $defaults, $filters) {
+  $filter->settings += $defaults;
+
+  $elements = array();
+  $elements['nofollow'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Add rel="nofollow" to all links'),
+    '#default_value' => $filter->settings['nofollow'],
+  );
+  return $elements;
+}
+
+/**
+ * Prepare callback for hook_filter_info().
+ *
+ * Note: This is not really a hook. The function name is manually specified via
+ * 'prepare callback' in hook_filter_info(), with this recommended callback
+ * name pattern. It is called from check_markup().
+ *
+ * See hook_filter_info() for a description of the filtering process. Filters
+ * should not use the 'prepare callback' step for anything other than escaping,
+ * because that would short-circuit the control the user has over the order in
+ * which filters are applied.
+ *
+ * @param $text
+ *   The text string to be filtered.
+ * @param $filter
+ *   The filter object containing settings for the given format.
+ * @param $format
+ *   The text format object assigned to the text to be filtered.
+ * @param $langcode
+ *   The language code of the text to be filtered.
+ * @param $cache
+ *   A Boolean indicating whether the filtered text is going to be cached in
+ *   {cache_filter}.
+ * @param $cache_id
+ *   The ID of the filtered text in {cache_filter}, if $cache is TRUE.
+ *
+ * @return
+ *   The prepared, escaped text.
+ */
+function hook_filter_FILTER_prepare($text, $filter, $format, $langcode, $cache, $cache_id) {
+  // Escape <code> and </code> tags.
+  $text = preg_replace('|<code>(.+?)</code>|se', "[codefilter_code]$1[/codefilter_code]", $text);
+  return $text;
+}
+
+/**
+ * Process callback for hook_filter_info().
+ *
+ * Note: This is not really a hook. The function name is manually specified via
+ * 'process callback' in hook_filter_info(), with this recommended callback
+ * name pattern. It is called from check_markup().
+ *
+ * See hook_filter_info() for a description of the filtering process. This step
+ * is where the filter actually transforms the text.
+ *
+ * @param $text
+ *   The text string to be filtered.
+ * @param $filter
+ *   The filter object containing settings for the given format.
+ * @param $format
+ *   The text format object assigned to the text to be filtered.
+ * @param $langcode
+ *   The language code of the text to be filtered.
+ * @param $cache
+ *   A Boolean indicating whether the filtered text is going to be cached in
+ *   {cache_filter}.
+ * @param $cache_id
+ *   The ID of the filtered text in {cache_filter}, if $cache is TRUE.
+ *
+ * @return
+ *   The filtered text.
+ */
+function hook_filter_FILTER_process($text, $filter, $format, $langcode, $cache, $cache_id) {
+  $text = preg_replace('|\[codefilter_code\](.+?)\[/codefilter_code\]|se', "<pre>$1</pre>", $text);
+
+  return $text;
+}
+
+/**
+ * Tips callback for hook_filter_info().
+ *
+ * Note: This is not really a hook. The function name is manually specified via
+ * 'tips callback' in hook_filter_info(), with this recommended callback
+ * name pattern. It is called from _filter_tips().
+ *
+ * A filter's tips should be informative and to the point. Short tips are
+ * preferably one-liners.
+ *
+ * @param $filter
+ *   An object representing the filter.
+ * @param $format
+ *   An object representing the text format the filter is contained in.
+ * @param $long
+ *   Whether this callback should return a short tip to display in a form
+ *   (FALSE), or whether a more elaborate filter tips should be returned for
+ *   theme_filter_tips() (TRUE).
+ *
+ * @return
+ *   Translated text to display as a tip.
+ */
+function hook_filter_FILTER_tips($filter, $format, $long) {
+ if ($long) {
+    return t('Lines and paragraphs are automatically recognized. The &lt;br /&gt; line break, &lt;p&gt; paragraph and &lt;/p&gt; close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple blank lines.');
+  }
+  else {
+    return t('Lines and paragraphs break automatically.');
+  }
+}
+
+/**
+ * @addtogroup hooks
+ * @{
+ */
+
+/**
  * Perform actions when a text format has been disabled.
  *
  * @param $format
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index 06d3fff..57ff8c2 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -11,29 +11,21 @@
 
 /**
  * Non-HTML markup language filters that generate HTML.
- *
- * @todo Move into \Drupal\filter\Plugin\Filter\FilterInterface
  */
 const FILTER_TYPE_MARKUP_LANGUAGE = 0;
 
 /**
  * HTML tag and attribute restricting filters.
- *
- * @todo Move into \Drupal\filter\Plugin\Filter\FilterInterface
  */
 const FILTER_TYPE_HTML_RESTRICTOR = 1;
 
 /**
  * Reversible transformation filters.
- *
- * @todo Move into \Drupal\filter\Plugin\Filter\FilterInterface
  */
 const FILTER_TYPE_TRANSFORM_REVERSIBLE = 2;
 
 /**
  * Irreversible transformation filters.
- *
- * @todo Move into \Drupal\filter\Plugin\Filter\FilterInterface
  */
 const FILTER_TYPE_TRANSFORM_IRREVERSIBLE = 3;
 
@@ -174,8 +166,6 @@ function filter_menu() {
  *   has been marked as disabled, FALSE is returned.
  *
  * @see filter_format_exists()
- *
- * @todo Use entity_load().
  */
 function filter_format_load($format_id) {
   $formats = filter_formats();
@@ -261,6 +251,24 @@ function filter_permission_name($format) {
 }
 
 /**
+ * Implements hook_modules_enabled().
+ */
+function filter_modules_enabled($modules) {
+  // Reset the static cache of module-provided filters, in case any of the
+  // newly enabled modules defines a new filter or alters existing ones.
+  drupal_static_reset('filter_get_filters');
+}
+
+/**
+ * Implements hook_modules_disabled().
+ */
+function filter_modules_disabled($modules) {
+  // Reset the static cache of module-provided filters, in case any of the
+  // newly disabled modules defined or altered any filters.
+  drupal_static_reset('filter_get_filters');
+}
+
+/**
  * Retrieves a list of text formats, ordered by weight.
  *
  * @param $account
@@ -414,10 +422,19 @@ function filter_get_filter_types_by_format($format_id) {
   $filter_types = array();
 
   $filters = filter_list_format($format_id);
+
+  // Ignore filters that are disabled.
+  $filters = array_filter($filters, function($filter) {
+    return $filter->status;
+  });
+
+  $filters_info = filter_get_filters();
   foreach ($filters as $filter) {
-    if ($filter->status) {
-      $filter_types[] = $filter->getType();
+    if (!isset($filters_info[$filter->name]['type'])) {
+      throw new Exception(t('Filter %filter has no type specified.', array ('%filter' => $filter->name)));
     }
+
+    $filter_types[] = $filters_info[$filter->name]['type'];
   }
 
   return array_unique($filter_types);
@@ -474,6 +491,50 @@ function filter_fallback_format_title() {
 }
 
 /**
+ * Returns a list of all filters provided by modules.
+ *
+ * @return array
+ *   An array of filter formats.
+ */
+function filter_get_filters() {
+  $filters = &drupal_static(__FUNCTION__, array());
+
+  if (empty($filters)) {
+    foreach (module_implements('filter_info') as $module) {
+      $info = module_invoke($module, 'filter_info');
+      if (isset($info) && is_array($info)) {
+        // Assign the name of the module implementing the filters and ensure
+        // default values.
+        foreach (array_keys($info) as $name) {
+          $info[$name]['module'] = $module;
+          $info[$name] += array(
+            'description' => '',
+            'weight' => 0,
+            'default settings' => array(),
+          );
+        }
+        $filters = array_merge($filters, $info);
+      }
+    }
+    // Allow modules to alter filter definitions.
+    drupal_alter('filter_info', $filters);
+
+    uasort($filters, '_filter_list_cmp');
+  }
+
+  return $filters;
+}
+
+/**
+ * Sorts an array of filters by filter name.
+ *
+ * Callback for uasort() within filter_get_filters().
+ */
+function _filter_list_cmp($a, $b) {
+  return strcmp($a['title'], $b['title']);
+}
+
+/**
  * Checks if the text in a certain text format is allowed to be cached.
  *
  * This function can be used to check whether the result of the filtering
@@ -492,6 +553,35 @@ function filter_format_allowcache($format_id) {
 }
 
 /**
+ * Determines whether the output of a given text format can be cached.
+ *
+ * The output of a given text format can be cached when all enabled filters in
+ * the text format allow caching.
+ *
+ * @param $format
+ *   The text format object to check.
+ *
+ * @return
+ *   TRUE if all the filters enabled in the given text format allow caching,
+ *   FALSE otherwise.
+ *
+ * @see Drupal\filter\Plugin\Core\Entity\FilterFormat::save()
+ */
+function _filter_format_is_cacheable($format) {
+  if (empty($format->filters)) {
+    return TRUE;
+  }
+  $filter_info = filter_get_filters();
+  foreach ($format->filters as $name => $filter) {
+    // By default, 'cache' is TRUE for all filters unless specified otherwise.
+    if (!empty($filter['status']) && isset($filter_info[$name]['cache']) && !$filter_info[$name]['cache']) {
+      return FALSE;
+    }
+  }
+  return TRUE;
+}
+
+/**
  * Retrieves a list of filters for a given text format.
  *
  * Note that this function returns all associated filters regardless of whether
@@ -505,33 +595,48 @@ function filter_format_allowcache($format_id) {
  * @return
  *   An array of filter objects associated to the given text format, keyed by
  *   filter name.
- *
- * @todo Change this function to only return enabled filters. Code that needs to
- *   access disabled filters is not regular runtime code and thus can work with
- *   the FilterFormat::filters().
  */
 function filter_list_format($format_id) {
   $filters = &drupal_static(__FUNCTION__, array());
+  $filter_info = filter_get_filters();
 
   if (!isset($filters['all'])) {
     if ($cache = cache()->get('filter_list_format')) {
       $filters['all'] = $cache->data;
     }
     else {
-      $filters['all'] = array();
       $filter_formats = filter_formats();
       foreach ($filter_formats as $filter_format) {
-        // This loop must not instantiate the actual filter plugins, since the
-        // filter bag would be duplicated for each filter plugin instance upon
-        // unserialization of the cache item.
-        $filters['all'][$filter_format->id()] = $filter_format->filters();
+        foreach ($filter_format->filters as $filter_name => $filter) {
+          $filter['name'] = $filter_name;
+          $filters['all'][$filter_format->format][$filter_name] = $filter;
+        }
+        uasort($filters['all'][$filter_format->format], 'Drupal\filter\Plugin\Core\Entity\FilterFormat::sortFilters');
+        // Convert filters into objects.
+        // @todo Retain filters as arrays or convert to plugins.
+        foreach ($filters['all'][$filter_format->format] as $filter_name => $filter) {
+          $filters['all'][$filter_format->format][$filter_name] = (object) $filter;
+        }
       }
       cache()->set('filter_list_format', $filters['all']);
     }
   }
 
-  if (!isset($filters[$format_id]) && isset($filters['all'][$format_id])) {
-    $filters[$format_id] = $filters['all'][$format_id];
+  if (!isset($filters[$format_id])) {
+    $format_filters = array();
+    $filter_map = isset($filters['all'][$format_id]) ? $filters['all'][$format_id] : array();
+    foreach ($filter_map as $name => $filter) {
+      if (isset($filter_info[$name])) {
+        $filter->title = $filter_info[$name]['title'];
+
+        $filter->settings = isset($filter->settings) ? $filter->settings : array();
+        // Merge in default settings.
+        $filter->settings += $filter_info[$name]['default settings'];
+
+        $format_filters[$name] = $filter;
+      }
+    }
+    $filters[$format_id] = $format_filters;
   }
 
   return isset($filters[$format_id]) ? $filters[$format_id] : array();
@@ -607,33 +712,36 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE,
 
   // Get a complete list of filters, ordered properly.
   $filters = filter_list_format($format->format);
+  $filter_info = filter_get_filters();
 
   // Give filters the chance to escape HTML-like data such as code or formulas.
-  foreach ($filters as $filter) {
+  foreach ($filters as $name => $filter) {
     // If necessary, skip filters of a certain type.
-    if (in_array($filter->getType(), $filter_types_to_skip)) {
+    if (in_array($filter_info[$name]['type'], $filter_types_to_skip)) {
       continue;
     }
-    if ($filter->status) {
-      $text = $filter->prepare($text, $langcode, $cache, $cache_id);
+    if (!empty($filter->status) && isset($filter_info[$name]['prepare callback'])) {
+      $function = $filter_info[$name]['prepare callback'];
+      $text = $function($text, $filter, $format, $langcode, $cache, $cache_id);
     }
   }
 
   // Perform filtering.
-  foreach ($filters as $filter) {
+  foreach ($filters as $name => $filter) {
     // If necessary, skip filters of a certain type.
-    if (in_array($filter->getType(), $filter_types_to_skip)) {
+    if (in_array($filter_info[$name]['type'], $filter_types_to_skip)) {
       continue;
     }
-    if ($filter->status) {
-      $text = $filter->process($text, $langcode, $cache, $cache_id);
+    if (!empty($filter->status) && isset($filter_info[$name]['process callback'])) {
+      $function = $filter_info[$name]['process callback'];
+      $text = $function($text, $filter, $format, $langcode, $cache, $cache_id);
     }
   }
 
   // Cache the filtered text. This cache is infinitely valid. It becomes
   // obsolete when $text changes (which leads to a new $cache_id). It is
   // automatically flushed when the text format is updated.
-  // @see \Drupal\filter\Plugin\Core\Entity\FilterFormat::save()
+  // @see Drupal\filter\Plugin\Core\Entity\FilterFormat::save()
   if ($cache) {
     cache('filter')->set($cache_id, $text, CacheBackendInterface::CACHE_PERMANENT, array('filter_format' => $format->format));
   }
@@ -895,6 +1003,7 @@ function _filter_tips($format_id, $long = FALSE) {
   global $user;
 
   $formats = filter_formats($user);
+  $filter_info = filter_get_filters();
 
   $tips = array();
 
@@ -905,9 +1014,10 @@ function _filter_tips($format_id, $long = FALSE) {
 
   foreach ($formats as $format) {
     $filters = filter_list_format($format->format);
+    $tips[$format->name] = array();
     foreach ($filters as $name => $filter) {
-      if ($filter->status) {
-        $tip = $filter->tips($long);
+      if (!empty($filter->status) && isset($filter_info[$name]['tips callback'])) {
+        $tip = $filter_info[$name]['tips callback']($filter, $format, $long);
         if (isset($tip)) {
           $tips[$format->name][$name] = array('tip' => $tip, 'id' => $name);
         }
@@ -1051,6 +1161,93 @@ function theme_filter_guidelines($variables) {
  */
 
 /**
+ * Implements hook_filter_info().
+ */
+function filter_filter_info() {
+  $filters['filter_html'] = array(
+    'title' => t('Limit allowed HTML tags'),
+    'type' => FILTER_TYPE_HTML_RESTRICTOR,
+    'process callback' => '_filter_html',
+    'settings callback' => '_filter_html_settings',
+    'default settings' => array(
+      'allowed_html' => '<a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <h4> <h5> <h6>',
+      'filter_html_help' => 1,
+      'filter_html_nofollow' => 0,
+    ),
+    'tips callback' => '_filter_html_tips',
+    'weight' => -10,
+  );
+  $filters['filter_autop'] = array(
+    'title' => t('Convert line breaks into HTML (i.e. <code>&lt;br&gt;</code> and <code>&lt;p&gt;</code>)'),
+    'type' => FILTER_TYPE_MARKUP_LANGUAGE,
+    'process callback' => '_filter_autop',
+    'tips callback' => '_filter_autop_tips',
+  );
+  $filters['filter_url'] = array(
+    'title' => t('Convert URLs into links'),
+    'type' => FILTER_TYPE_MARKUP_LANGUAGE,
+    'process callback' => '_filter_url',
+    'settings callback' => '_filter_url_settings',
+    'default settings' => array(
+      'filter_url_length' => 72,
+    ),
+    'tips callback' => '_filter_url_tips',
+  );
+  $filters['filter_html_image_secure'] = array(
+    'title' => t('Restrict images to this site'),
+    'type' => FILTER_TYPE_HTML_RESTRICTOR,
+    'description' => t('Disallows usage of &lt;img&gt; tag sources that are not hosted on this site by replacing them with a placeholder image.'),
+    'process callback' => '_filter_html_image_secure_process',
+    'tips callback' => '_filter_html_image_secure_tips',
+    // Supposed to run after other filters and before HTML corrector by default.
+    'weight' => 9,
+  );
+  $filters['filter_htmlcorrector'] = array(
+    'title' =>  t('Correct faulty and chopped off HTML'),
+    'type' => FILTER_TYPE_HTML_RESTRICTOR,
+    'process callback' => '_filter_htmlcorrector',
+    'weight' => 10,
+  );
+  $filters['filter_html_escape'] = array(
+    'title' => t('Display any HTML as plain text'),
+    'type' => FILTER_TYPE_HTML_RESTRICTOR,
+    'process callback' => '_filter_html_escape',
+    'tips callback' => '_filter_html_escape_tips',
+    'weight' => -10,
+  );
+  return $filters;
+}
+
+/**
+ * Filter settings callback for the HTML content filter.
+ *
+ * See hook_filter_FILTER_settings() for documentation of parameters and return
+ * value.
+ */
+function _filter_html_settings($form, &$form_state, $filter, $format, $defaults) {
+  $filter->settings += $defaults;
+
+  $settings['allowed_html'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Allowed HTML tags'),
+    '#default_value' => $filter->settings['allowed_html'],
+    '#maxlength' => 1024,
+    '#description' => t('A list of HTML tags that can be used. JavaScript event attributes, JavaScript URLs, and CSS are always stripped.'),
+  );
+  $settings['filter_html_help'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Display basic HTML help in long filter tips'),
+    '#default_value' => $filter->settings['filter_html_help'],
+  );
+  $settings['filter_html_nofollow'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Add rel="nofollow" to all links'),
+    '#default_value' => $filter->settings['filter_html_nofollow'],
+  );
+  return $settings;
+}
+
+/**
  * Provides filtering of input into accepted HTML.
  */
 function _filter_html($text, $filter) {
@@ -1070,6 +1267,125 @@ function _filter_html($text, $filter) {
 }
 
 /**
+ * Filter tips callback: Provides help for the HTML filter.
+ *
+ * @see filter_filter_info()
+ */
+function _filter_html_tips($filter, $format, $long = FALSE) {
+  global $base_url;
+
+  if (!($allowed_html = $filter->settings['allowed_html'])) {
+    return;
+  }
+  $output = t('Allowed HTML tags: @tags', array('@tags' => $allowed_html));
+  if (!$long) {
+    return $output;
+  }
+
+  $output = '<p>' . $output . '</p>';
+  if (!$filter->settings['filter_html_help']) {
+    return $output;
+  }
+
+  $output .= '<p>' . t('This site allows HTML content. While learning all of HTML may feel intimidating, learning how to use a very small number of the most basic HTML "tags" is very easy. This table provides examples for each tag that is enabled on this site.') . '</p>';
+  $output .= '<p>' . t('For more information see W3C\'s <a href="@html-specifications">HTML Specifications</a> or use your favorite search engine to find other sites that explain HTML.', array('@html-specifications' => 'http://www.w3.org/TR/html/')) . '</p>';
+  $tips = array(
+    'a' => array(t('Anchors are used to make links to other pages.'), '<a href="' . $base_url . '">' . check_plain(config('system.site')->get('name')) . '</a>'),
+    'br' => array(t('By default line break tags are automatically added, so use this tag to add additional ones. Use of this tag is different because it is not used with an open/close pair like all the others. Use the extra " /" inside the tag to maintain XHTML 1.0 compatibility'), t('Text with <br />line break')),
+    'p' => array(t('By default paragraph tags are automatically added, so use this tag to add additional ones.'), '<p>' . t('Paragraph one.') . '</p> <p>' . t('Paragraph two.') . '</p>'),
+    'strong' => array(t('Strong', array(), array('context' => 'Font weight')), '<strong>' . t('Strong', array(), array('context' => 'Font weight')) . '</strong>'),
+    'em' => array(t('Emphasized'), '<em>' . t('Emphasized') . '</em>'),
+    'cite' => array(t('Cited'), '<cite>' . t('Cited') . '</cite>'),
+    'code' => array(t('Coded text used to show programming source code'), '<code>' . t('Coded') . '</code>'),
+    'b' => array(t('Bolded'), '<b>' . t('Bolded') . '</b>'),
+    'u' => array(t('Underlined'), '<u>' . t('Underlined') . '</u>'),
+    'i' => array(t('Italicized'), '<i>' . t('Italicized') . '</i>'),
+    'sup' => array(t('Superscripted'), t('<sup>Super</sup>scripted')),
+    'sub' => array(t('Subscripted'), t('<sub>Sub</sub>scripted')),
+    'pre' => array(t('Preformatted'), '<pre>' . t('Preformatted') . '</pre>'),
+    'abbr' => array(t('Abbreviation'), t('<abbr title="Abbreviation">Abbrev.</abbr>')),
+    'acronym' => array(t('Acronym'), t('<acronym title="Three-Letter Acronym">TLA</acronym>')),
+    'blockquote' => array(t('Block quoted'), '<blockquote>' . t('Block quoted') . '</blockquote>'),
+    'q' => array(t('Quoted inline'), '<q>' . t('Quoted inline') . '</q>'),
+    // Assumes and describes tr, td, th.
+    'table' => array(t('Table'), '<table> <tr><th>' . t('Table header') . '</th></tr> <tr><td>' . t('Table cell') . '</td></tr> </table>'),
+    'tr' => NULL, 'td' => NULL, 'th' => NULL,
+    'del' => array(t('Deleted'), '<del>' . t('Deleted') . '</del>'),
+    'ins' => array(t('Inserted'), '<ins>' . t('Inserted') . '</ins>'),
+     // Assumes and describes li.
+    'ol' => array(t('Ordered list - use the &lt;li&gt; to begin each list item'), '<ol> <li>' . t('First item') . '</li> <li>' . t('Second item') . '</li> </ol>'),
+    'ul' => array(t('Unordered list - use the &lt;li&gt; to begin each list item'), '<ul> <li>' . t('First item') . '</li> <li>' . t('Second item') . '</li> </ul>'),
+    'li' => NULL,
+    // Assumes and describes dt and dd.
+    'dl' => array(t('Definition lists are similar to other HTML lists. &lt;dl&gt; begins the definition list, &lt;dt&gt; begins the definition term and &lt;dd&gt; begins the definition description.'), '<dl> <dt>' . t('First term') . '</dt> <dd>' . t('First definition') . '</dd> <dt>' . t('Second term') . '</dt> <dd>' . t('Second definition') . '</dd> </dl>'),
+    'dt' => NULL, 'dd' => NULL,
+    'h1' => array(t('Heading'), '<h1>' . t('Title') . '</h1>'),
+    'h2' => array(t('Heading'), '<h2>' . t('Subtitle') . '</h2>'),
+    'h3' => array(t('Heading'), '<h3>' . t('Subtitle three') . '</h3>'),
+    'h4' => array(t('Heading'), '<h4>' . t('Subtitle four') . '</h4>'),
+    'h5' => array(t('Heading'), '<h5>' . t('Subtitle five') . '</h5>'),
+    'h6' => array(t('Heading'), '<h6>' . t('Subtitle six') . '</h6>')
+  );
+  $header = array(t('Tag Description'), t('You Type'), t('You Get'));
+  preg_match_all('/<([a-z0-9]+)[^a-z0-9]/i', $allowed_html, $out);
+  foreach ($out[1] as $tag) {
+    if (!empty($tips[$tag])) {
+      $rows[] = array(
+        array('data' => $tips[$tag][0], 'class' => array('description')),
+        array('data' => '<code>' . check_plain($tips[$tag][1]) . '</code>', 'class' => array('type')),
+        array('data' => $tips[$tag][1], 'class' => array('get'))
+      );
+    }
+    else {
+      $rows[] = array(
+        array('data' => t('No help provided for tag %tag.', array('%tag' => $tag)), 'class' => array('description'), 'colspan' => 3),
+      );
+    }
+  }
+  $output .= theme('table', array('header' => $header, 'rows' => $rows));
+
+  $output .= '<p>' . t('Most unusual characters can be directly entered without any problems.') . '</p>';
+  $output .= '<p>' . t('If you do encounter problems, try using HTML character entities. A common example looks like &amp;amp; for an ampersand &amp; character. For a full list of entities see HTML\'s <a href="@html-entities">entities</a> page. Some of the available characters include:', array('@html-entities' => 'http://www.w3.org/TR/html4/sgml/entities.html')) . '</p>';
+
+  $entities = array(
+    array(t('Ampersand'), '&amp;'),
+    array(t('Greater than'), '&gt;'),
+    array(t('Less than'), '&lt;'),
+    array(t('Quotation mark'), '&quot;'),
+  );
+  $header = array(t('Character Description'), t('You Type'), t('You Get'));
+  unset($rows);
+  foreach ($entities as $entity) {
+    $rows[] = array(
+      array('data' => $entity[0], 'class' => array('description')),
+      array('data' => '<code>' . check_plain($entity[1]) . '</code>', 'class' => array('type')),
+      array('data' => $entity[1], 'class' => array('get'))
+    );
+  }
+  $output .= theme('table', array('header' => $header, 'rows' => $rows));
+  return $output;
+}
+
+/**
+ * Filter URL settings callback: Provides settings for the URL filter.
+ *
+ * @see filter_filter_info()
+ */
+function _filter_url_settings($form, &$form_state, $filter, $format, $defaults) {
+  $filter->settings += $defaults;
+
+  $settings['filter_url_length'] = array(
+    '#type' => 'number',
+    '#title' => t('Maximum link text length'),
+    '#default_value' => $filter->settings['filter_url_length'],
+    '#min' => 1,
+    '#field_suffix' => t('characters'),
+    '#description' => t('URLs longer than this number of characters will be truncated to prevent long strings that break formatting. The link itself will be retained; just the text portion of the link will be truncated.'),
+  );
+  return $settings;
+}
+
+/**
  * Converts text into hyperlinks automatically.
  *
  * This filter identifies and makes clickable three types of "links".
@@ -1296,6 +1612,15 @@ function _filter_url_trim($text, $length = NULL) {
 }
 
 /**
+ * Filter tips callback: Provides help for the URL filter.
+ *
+ * @see filter_filter_info()
+ */
+function _filter_url_tips($filter, $format, $long = FALSE) {
+  return t('Web page addresses and e-mail addresses turn into links automatically.');
+}
+
+/**
  * Scans the input and makes sure that HTML tags are properly closed.
  */
 function _filter_htmlcorrector($text) {
@@ -1370,6 +1695,20 @@ function _filter_autop($text) {
 }
 
 /**
+ * Filter tips callback: Provides help for the auto-paragraph filter.
+ *
+ * @see filter_filter_info()
+ */
+function _filter_autop_tips($filter, $format, $long = FALSE) {
+  if ($long) {
+    return t('Lines and paragraphs are automatically recognized. The &lt;br /&gt; line break, &lt;p&gt; paragraph and &lt;/p&gt; close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple blank lines.');
+  }
+  else {
+    return t('Lines and paragraphs break automatically.');
+  }
+}
+
+/**
  * Escapes all HTML tags, so they will be visible instead of being effective.
  */
 function _filter_html_escape($text) {
@@ -1377,6 +1716,15 @@ function _filter_html_escape($text) {
 }
 
 /**
+ * Filter tips callback: Provides help for the HTML escaping filter.
+ *
+ * @see filter_filter_info()
+ */
+function _filter_html_escape_tips($filter, $format, $long = FALSE) {
+  return t('No HTML tags allowed.');
+}
+
+/**
  * Process callback for local image filter.
  */
 function _filter_html_image_secure_process($text) {
@@ -1442,6 +1790,13 @@ function theme_filter_html_image_secure_image(&$variables) {
 }
 
 /**
+ * Filter tips callback for secure HTML image filter.
+ */
+function _filter_html_image_secure_tips($filter, $format, $long = FALSE) {
+  return t('Only images hosted on this site may be used in &lt;img&gt; tags.');
+}
+
+/**
  * @} End of "defgroup standard_filters".
  */
 
diff --git a/core/modules/filter/filter.services.yml b/core/modules/filter/filter.services.yml
index 98efef5..af11a10 100644
--- a/core/modules/filter/filter.services.yml
+++ b/core/modules/filter/filter.services.yml
@@ -10,6 +10,3 @@ services:
     class: Drupal\filter\Access\FormatDisableCheck
     tags:
       - { name: access_check }
-  plugin.manager.filter:
-    class: Drupal\filter\FilterPluginManager
-    arguments: ['@container.namespaces']
diff --git a/core/modules/filter/lib/Drupal/filter/Annotation/Filter.php b/core/modules/filter/lib/Drupal/filter/Annotation/Filter.php
deleted file mode 100644
index a14b72f..0000000
--- a/core/modules/filter/lib/Drupal/filter/Annotation/Filter.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\Annotation\Filter.
- */
-
-namespace Drupal\filter\Annotation;
-
-use Drupal\Component\Annotation\Plugin;
-
-/**
- * Defines an filter annotation object.
- *
- * @Annotation
- */
-class Filter extends Plugin {
-
-  /**
-   * The plugin ID.
-   *
-   * @var string
-   */
-  public $id;
-
-  /**
-   * The name of the module providing the type.
-   *
-   * @var string
-   */
-  public $module;
-
-  /**
-   * The human-readable name of the filter.
-   *
-   * This is used as an administrative summary of what the filter does.
-   *
-   * @ingroup plugin_translatable
-   *
-   * @var \Drupal\Core\Annotation\Translation
-   */
-  public $title;
-
-  /**
-   * Additional administrative information about the filter's behavior.
-   *
-   * @ingroup plugin_translatable
-   *
-   * @var \Drupal\Core\Annotation\Translation (optional)
-   */
-  public $description = '';
-
-  /**
-   * A default weight for the filter in new text formats.
-   *
-   * @var int (optional)
-   */
-  public $weight = 0;
-
-  /**
-   * Whether this filter is enabled or disabled by default.
-   *
-   * @var bool (optional)
-   */
-  public $status = FALSE;
-
-  /**
-   * Specifies whether the filtered text can be cached.
-   *
-   * Note that setting this to FALSE makes the entire text format not cacheable,
-   * which may have an impact on the site's overall performance.
-   *
-   * @var bool (optional)
-   */
-  public $cache = TRUE;
-
-  /**
-   * The default settings for the filter.
-   *
-   * @var array (optional)
-   */
-  public $settings = array();
-
-}
diff --git a/core/modules/filter/lib/Drupal/filter/FilterBag.php b/core/modules/filter/lib/Drupal/filter/FilterBag.php
deleted file mode 100644
index 781cfda..0000000
--- a/core/modules/filter/lib/Drupal/filter/FilterBag.php
+++ /dev/null
@@ -1,185 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\FilterBag.
- */
-
-namespace Drupal\filter;
-
-use Drupal\Component\Plugin\PluginBag;
-use Drupal\Component\Plugin\PluginManagerInterface;
-use Drupal\Component\Plugin\Exception\PluginException;
-use Drupal\Component\Utility\NestedArray;
-
-/**
- * A collection of filters.
- */
-class FilterBag extends PluginBag {
-
-  /**
-   * The initial configuration for each filter in the bag.
-   *
-   * @var array
-   *   An associative array containing the initial configuration for each filter
-   *   in the bag, keyed by plugin instance ID.
-   */
-  protected $configurations = array();
-
-  /**
-   * The manager used to instantiate the plugins.
-   *
-   * @var \Drupal\Component\Plugin\PluginManagerInterface
-   */
-  protected $manager;
-
-  /**
-   * All possible filter plugin IDs.
-   *
-   * @var array
-   */
-  protected $definitions;
-
-  /**
-   * Constructs a FilterBag object.
-   *
-   * @param \Drupal\Component\Plugin\PluginManagerInterface $manager
-   *   The manager to be used for instantiating plugins.
-   * @param array $configurations
-   *   (optional) An associative array containing the initial configuration for
-   *   each filter in the bag, keyed by plugin instance ID.
-   */
-  public function __construct(PluginManagerInterface $manager, array $configurations = array()) {
-    $this->manager = $manager;
-    $this->configurations = $configurations;
-
-    if (!empty($configurations)) {
-      $this->instanceIDs = array_combine(array_keys($configurations), array_keys($configurations));
-    }
-  }
-
-  /**
-   * Retrieves filter definitions and creates an instance for each filter.
-   *
-   * This is exclusively used for the text format administration page, on which
-   * all available filter plugins are exposed, regardless of whether the current
-   * text format has an active instance.
-   *
-   * @todo Refactor text format administration to actually construct/create and
-   *   destruct/remove actual filter plugin instances, using a library approach
-   *   à la blocks.
-   */
-  public function getAll() {
-    // Retrieve all available filter plugin definitions.
-    if (!$this->definitions) {
-      $this->definitions = $this->manager->getDefinitions();
-    }
-
-    // Ensure that there is an instance of all available filters.
-    // Note that getDefinitions() are keyed by $plugin_id. $instance_id is the
-    // $plugin_id for filters, since a single filter plugin can only exist once
-    // in a format.
-    foreach ($this->definitions as $plugin_id => $definition) {
-      $this->initializePlugin($plugin_id);
-    }
-    return $this->pluginInstances;
-  }
-
-  /**
-   * Updates the configuration for a filter plugin instance.
-   *
-   * If there is no plugin instance yet, a new will be instantiated. Otherwise,
-   * the existing instance is updated with the new configuration.
-   *
-   * @param string $instance_id
-   *   The ID of a filter plugin to set the configuration for.
-   * @param array $configuration
-   *   The filter plugin configuration to set.
-   */
-  public function setConfig($instance_id, array $configuration) {
-    $this->configurations[$instance_id] = $configuration;
-    $this->get($instance_id)->setPluginConfiguration($configuration);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function initializePlugin($instance_id) {
-    // If the filter was initialized before, just return.
-    if (isset($this->pluginInstances[$instance_id])) {
-      return;
-    }
-
-    // Filters have a 1:1 relationship to text formats and can be added and
-    // instantiated at any time.
-    $definition = $this->manager->getDefinition($instance_id);
-
-    if (isset($definition)) {
-      $this->addInstanceID($instance_id);
-      // $configuration is the whole filter plugin instance configuration, as
-      // contained in the text format configuration. The default configuration
-      // is the filter plugin definition.
-      // @todo Configuration should not be contained in definitions. Move into a
-      //   FilterBase::init() method.
-      $configuration = $definition;
-      // Merge the actual configuration into the default configuration.
-      if (isset($this->configurations[$instance_id])) {
-        $configuration = NestedArray::mergeDeep($configuration, $this->configurations[$instance_id]);
-      }
-      $this->pluginInstances[$instance_id] = $this->manager->createInstance($instance_id, $configuration, $this);
-    }
-    else {
-      throw new PluginException(format_string("Unknown filter plugin ID '@filter'.", array('@filter' => $instance_id)));
-    }
-  }
-
-  /**
-   * Sorts all filter plugin instances in this bag.
-   *
-   * @return \Drupal\filter\FilterBag
-   */
-  public function sort() {
-    $this->getAll();
-    uasort($this->instanceIDs, array($this, 'sortHelper'));
-    return $this;
-  }
-
-  /**
-   * uasort() callback to sort filters by status, weight, module, and name.
-   *
-   * @see \Drupal\filter\FilterFormatStorageController::preSave()
-   */
-  public function sortHelper($aID, $bID) {
-    $a = $this->get($aID);
-    $b = $this->get($bID);
-    if ($a->status != $b->status) {
-      return !empty($a->status) ? -1 : 1;
-    }
-    if ($a->weight != $b->weight) {
-      return $a->weight < $b->weight ? -1 : 1;
-    }
-    if ($a->module != $b->module) {
-      return strnatcasecmp($a->module, $b->module);
-    }
-    return strnatcasecmp($a->getPluginId(), $b->getPluginId());
-  }
-
-  /**
-   * Returns the current configuration of all filters in this bag.
-   *
-   * @return array
-   *   An associative array keyed by filter plugin instance ID, whose values
-   *   are filter configurations.
-   *
-   * @see \Drupal\filter\Plugin\Filter\FilterInterface::export()
-   */
-  public function export() {
-    $filters = array();
-    $this->rewind();
-    foreach ($this as $instance_id => $instance) {
-      $filters[$instance_id] = $instance->export();
-    }
-    return $filters;
-  }
-
-}
diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php b/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php
index beb83b3..001fa0a 100644
--- a/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php
+++ b/core/modules/filter/lib/Drupal/filter/FilterFormatInterface.php
@@ -15,28 +15,11 @@
 interface FilterFormatInterface extends ConfigEntityInterface {
 
   /**
-   * Returns the collection of filter pugin instances or an individual plugin instance.
+   * Helper callback for uasort() to sort filters by status, weight, module, and name.
    *
-   * @param string $instance_id
-   *   (optional) The ID of a filter plugin instance to return.
-   *
-   * @return \Drupal\filter\FilterBag|\Drupal\filter\Plugin\FilterInterface
-   *   Either the filter bag or a specific filter plugin instance.
-   */
-  public function filters($instance_id = NULL);
-
-  /**
-   * Sets the configuration for a filter plugin instance.
-   *
-   * Sets or replaces the configuration of a filter plugin in $this->filters,
-   * and if instantianted already, also ensures that the actual filter plugin on
-   * the FilterBag contains the identical configuration.
-   *
-   * @param string $instance_id
-   *   The ID of a filter plugin to set the configuration for.
-   * @param array $configuration
-   *   The filter plugin configuration to set.
+   * @see Drupal\filter\FilterFormatStorageController::preSave()
+   * @see filter_list_format()
    */
-  public function setFilterConfig($instance_id, array $configuration);
+  public static function sortFilters($a, $b);
 
 }
diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatStorageController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatStorageController.php
index 4c19d8b..1e8bdb2 100644
--- a/core/modules/filter/lib/Drupal/filter/FilterFormatStorageController.php
+++ b/core/modules/filter/lib/Drupal/filter/FilterFormatStorageController.php
@@ -22,17 +22,45 @@ protected function preSave(EntityInterface $entity) {
     parent::preSave($entity);
 
     $entity->name = trim($entity->label());
-
-    // @todo Do not save disabled filters whose properties are identical to
-    //   all default properties.
-
-    // Determine whether the format can be cached.
-    // @todo This is a derived/computed definition, not configuration.
-    $entity->cache = TRUE;
-    foreach ($entity->filters() as $filter) {
-      if ($filter->status && !$filter->cache) {
-        $entity->cache = FALSE;
+    $entity->cache = _filter_format_is_cacheable($entity);
+    $filter_info = filter_get_filters();
+    foreach ($filter_info as $name => $filter) {
+      // Merge the actual filter definition into the filter default definition.
+      $defaults = array(
+        'module' => $filter['module'],
+        // The filter ID has to be temporarily injected into the properties, in
+        // order to sort all filters below.
+        // @todo Rethink filter sorting to remove dependency on filter IDs.
+        'name' => $name,
+        // Unless explicitly enabled, all filters are disabled by default.
+        'status' => 0,
+        // If no explicit weight was defined for a filter, assign either the
+        // default weight defined in hook_filter_info() or the default of 0 by
+        // filter_get_filters().
+        'weight' => $filter['weight'],
+        'settings' => $filter['default settings'],
+      );
+      // All available filters are saved for each format, in order to retain all
+      // filter properties regardless of whether a filter is currently enabled
+      // or not, since some filters require extensive configuration.
+      // @todo Do not save disabled filters whose properties are identical to
+      //   all default properties.
+      if (isset($entity->filters[$name])) {
+        $entity->filters[$name] = array_merge($defaults, $entity->filters[$name]);
+      }
+      else {
+        $entity->filters[$name] = $defaults;
       }
+      // The module definition from hook_filter_info() always takes precedence
+      // and needs to be updated in case it changes.
+      $entity->filters[$name]['module'] = $filter['module'];
+    }
+
+    // Sort all filters.
+    uasort($entity->filters, 'Drupal\filter\Plugin\Core\Entity\FilterFormat::sortFilters');
+    // Remove the 'name' property from all filters that was added above.
+    foreach ($entity->filters as &$filter) {
+      unset($filter['name']);
     }
   }
 
diff --git a/core/modules/filter/lib/Drupal/filter/FilterPluginManager.php b/core/modules/filter/lib/Drupal/filter/FilterPluginManager.php
deleted file mode 100644
index be4be40..0000000
--- a/core/modules/filter/lib/Drupal/filter/FilterPluginManager.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\FilterPluginManager.
- */
-
-namespace Drupal\filter;
-
-use Drupal\Component\Plugin\PluginManagerBase;
-use Drupal\Component\Plugin\Factory\DefaultFactory;
-use Drupal\Core\Plugin\Discovery\AlterDecorator;
-use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery;
-use Drupal\Core\Plugin\Discovery\CacheDecorator;
-
-/**
- * Manages text processing filters.
- *
- * @see hook_filter_info_alter()
- */
-class FilterPluginManager extends PluginManagerBase {
-
-  /**
-   * Constructs a FilterPluginManager object.
-   *
-   * @param \Traversable $namespaces
-   *   An object that implements \Traversable which contains the root paths
-   *   keyed by the corresponding namespace to look for plugin implementations.
-   */
-  public function __construct(\Traversable $namespaces) {
-    $annotation_namespaces = array('Drupal\filter\Annotation' => $namespaces['Drupal\filter']);
-    $this->discovery = new AnnotatedClassDiscovery('Filter', $namespaces, $annotation_namespaces, 'Drupal\filter\Annotation\Filter');
-    $this->discovery = new AlterDecorator($this->discovery, 'filter_info');
-    $this->discovery = new CacheDecorator($this->discovery, 'filter_plugins:' . language(LANGUAGE_TYPE_INTERFACE)->langcode, 'cache', array(
-      'filter_formats' => TRUE,
-    ));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function createInstance($plugin_id, array $configuration = array(), FilterBag $filter_bag = NULL) {
-    $plugin_definition = $this->discovery->getDefinition($plugin_id);
-    $plugin_class = DefaultFactory::getPluginClass($plugin_id, $plugin_definition);
-    return new $plugin_class($configuration, $plugin_id, $plugin_definition, $filter_bag);
-  }
-
-}
diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php
index d6b1fe6..aa306bf 100644
--- a/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php
+++ b/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php
@@ -11,7 +11,6 @@
 use Drupal\Core\Entity\Annotation\EntityType;
 use Drupal\Core\Annotation\Translation;
 use Drupal\filter\FilterFormatInterface;
-use Drupal\filter\FilterBag;
 
 /**
  * Represents a text format.
@@ -99,30 +98,24 @@ class FilterFormat extends ConfigEntityBase implements FilterFormatInterface {
    * Configured filters for this text format.
    *
    * An associative array of filters assigned to the text format, keyed by the
-   * instance ID of each filter and using the properties:
-   * - plugin_id: The plugin ID of the filter plugin instance.
+   * ID of each filter (prefixed with module name) and using the properties:
    * - module: The name of the module providing the filter.
    * - status: (optional) A Boolean indicating whether the filter is
-   *   enabled in the text format. Defaults to FALSE.
-   * - weight: (optional) The weight of the filter in the text format. Defaults
-   *   to 0.
+   *   enabled in the text format. Defaults to disabled.
+   * - weight: (optional) The weight of the filter in the text format. If
+   *   omitted, the default value is determined in the following order:
+   *   - if any, the currently stored weight is retained.
+   *   - if any, the default weight from hook_filter_info() is taken over.
+   *   - otherwise, a default weight of 10, which usually sorts it last.
    * - settings: (optional) An array of configured settings for the filter.
-   *
-   * Use FilterFormat::filters() to access the actual filters.
+   *   See hook_filter_info() for details.
    *
    * @var array
    */
-  protected $filters = array();
-
-  /**
-   * Holds the collection of filters that are attached to this format.
-   *
-   * @var \Drupal\filter\FilterBag
-   */
-  protected $filterBag;
+  public $filters = array();
 
   /**
-   * {@inheritdoc}
+   * Overrides \Drupal\Core\Entity\Entity::id().
    */
   public function id() {
     return $this->format;
@@ -131,40 +124,21 @@ public function id() {
   /**
    * {@inheritdoc}
    */
-  public function filters($instance_id = NULL) {
-    if (!isset($this->filterBag)) {
-      $this->filterBag = new FilterBag(\Drupal::service('plugin.manager.filter'), $this->filters);
+  public static function sortFilters($a, $b) {
+    if ($a['status'] != $b['status']) {
+      return !empty($a['status']) ? -1 : 1;
     }
-    if (isset($instance_id)) {
-      return $this->filterBag->get($instance_id);
+    if ($a['weight'] != $b['weight']) {
+      return ($a['weight'] < $b['weight']) ? -1 : 1;
     }
-    return $this->filterBag;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setFilterConfig($instance_id, array $configuration) {
-    $this->filters[$instance_id] = $configuration;
-    if (isset($this->filterBag)) {
-      $this->filterBag->setConfig($instance_id, $configuration);
+    if ($a['module'] != $b['module']) {
+      return strnatcasecmp($a['module'], $b['module']);
     }
-    return $this;
+    return strnatcasecmp($a['name'], $b['name']);
   }
 
   /**
-   * {@inheritdoc}
-   */
-  public function getExportProperties() {
-    $properties = parent::getExportProperties();
-    // Sort and export the configuration of all filters.
-    $properties['filters'] = $this->filters()->sort()->export();
-
-    return $properties;
-  }
-
-  /**
-   * {@inheritdoc}
+   * Overrides \Drupal\Core\Config\Entity\ConfigEntityBase::disable().
    */
   public function disable() {
     parent::disable();
diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterAutoP.php b/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterAutoP.php
deleted file mode 100644
index 62d3649..0000000
--- a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterAutoP.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\Plugin\Filter\FilterAutoP.
- */
-
-namespace Drupal\filter\Plugin\Filter;
-
-use Drupal\filter\Annotation\Filter;
-use Drupal\Core\Annotation\Translation;
-use Drupal\filter\Plugin\FilterBase;
-
-/**
- * Provides a filter to conver line breaks to HTML.
- *
- * @Filter(
- *   id = "filter_autop",
- *   module = "filter",
- *   title = @Translation("Convert line breaks into HTML (i.e. <code>&lt;br&gt;</code> and <code>&lt;p&gt;</code>)"),
- *   type = FILTER_TYPE_MARKUP_LANGUAGE
- * )
- */
-class FilterAutoP extends FilterBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function process($text, $langcode, $cache, $cache_id) {
-    return _filter_autop($text);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function tips($long = FALSE) {
-    if ($long) {
-      return t('Lines and paragraphs are automatically recognized. The &lt;br /&gt; line break, &lt;p&gt; paragraph and &lt;/p&gt; close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple blank lines.');
-    }
-    else {
-      return t('Lines and paragraphs break automatically.');
-    }
-  }
-
-}
diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtml.php b/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtml.php
deleted file mode 100644
index c939c27..0000000
--- a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtml.php
+++ /dev/null
@@ -1,161 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\Plugin\Filter\FilterHtml.
- */
-
-namespace Drupal\filter\Plugin\Filter;
-
-use Drupal\filter\Annotation\Filter;
-use Drupal\Core\Annotation\Translation;
-use Drupal\filter\Plugin\FilterBase;
-
-/**
- * Provides a filter to limit allowed HTML tags.
- *
- * @Filter(
- *   id = "filter_html",
- *   module = "filter",
- *   title = @Translation("Limit allowed HTML tags"),
- *   type = FILTER_TYPE_HTML_RESTRICTOR,
- *   settings = {
- *     "allowed_html" = "<a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <h4> <h5> <h6>",
- *     "filter_html_help" = 1,
- *     "filter_html_nofollow" = 0
- *   },
- *   weight = -10
- * )
- */
-class FilterHtml extends FilterBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function settingsForm(array $form, array &$form_state) {
-    $form['allowed_html'] = array(
-      '#type' => 'textfield',
-      '#title' => t('Allowed HTML tags'),
-      '#default_value' => $this->settings['allowed_html'],
-      '#maxlength' => 1024,
-      '#description' => t('A list of HTML tags that can be used. JavaScript event attributes, JavaScript URLs, and CSS are always stripped.'),
-    );
-    $form['filter_html_help'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Display basic HTML help in long filter tips'),
-      '#default_value' => $this->settings['filter_html_help'],
-    );
-    $form['filter_html_nofollow'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Add rel="nofollow" to all links'),
-      '#default_value' => $this->settings['filter_html_nofollow'],
-    );
-    return $form;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function process($text, $langcode, $cache, $cache_id) {
-    return _filter_html($text, $this);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function tips($long = FALSE) {
-    global $base_url;
-
-    if (!($allowed_html = $this->settings['allowed_html'])) {
-      return;
-    }
-    $output = t('Allowed HTML tags: @tags', array('@tags' => $allowed_html));
-    if (!$long) {
-      return $output;
-    }
-
-    $output = '<p>' . $output . '</p>';
-    if (!$this->settings['filter_html_help']) {
-      return $output;
-    }
-
-    $output .= '<p>' . t('This site allows HTML content. While learning all of HTML may feel intimidating, learning how to use a very small number of the most basic HTML "tags" is very easy. This table provides examples for each tag that is enabled on this site.') . '</p>';
-    $output .= '<p>' . t('For more information see W3C\'s <a href="@html-specifications">HTML Specifications</a> or use your favorite search engine to find other sites that explain HTML.', array('@html-specifications' => 'http://www.w3.org/TR/html/')) . '</p>';
-    $tips = array(
-      'a' => array(t('Anchors are used to make links to other pages.'), '<a href="' . $base_url . '">' . check_plain(config('system.site')->get('name')) . '</a>'),
-      'br' => array(t('By default line break tags are automatically added, so use this tag to add additional ones. Use of this tag is different because it is not used with an open/close pair like all the others. Use the extra " /" inside the tag to maintain XHTML 1.0 compatibility'), t('Text with <br />line break')),
-      'p' => array(t('By default paragraph tags are automatically added, so use this tag to add additional ones.'), '<p>' . t('Paragraph one.') . '</p> <p>' . t('Paragraph two.') . '</p>'),
-      'strong' => array(t('Strong', array(), array('context' => 'Font weight')), '<strong>' . t('Strong', array(), array('context' => 'Font weight')) . '</strong>'),
-      'em' => array(t('Emphasized'), '<em>' . t('Emphasized') . '</em>'),
-      'cite' => array(t('Cited'), '<cite>' . t('Cited') . '</cite>'),
-      'code' => array(t('Coded text used to show programming source code'), '<code>' . t('Coded') . '</code>'),
-      'b' => array(t('Bolded'), '<b>' . t('Bolded') . '</b>'),
-      'u' => array(t('Underlined'), '<u>' . t('Underlined') . '</u>'),
-      'i' => array(t('Italicized'), '<i>' . t('Italicized') . '</i>'),
-      'sup' => array(t('Superscripted'), t('<sup>Super</sup>scripted')),
-      'sub' => array(t('Subscripted'), t('<sub>Sub</sub>scripted')),
-      'pre' => array(t('Preformatted'), '<pre>' . t('Preformatted') . '</pre>'),
-      'abbr' => array(t('Abbreviation'), t('<abbr title="Abbreviation">Abbrev.</abbr>')),
-      'acronym' => array(t('Acronym'), t('<acronym title="Three-Letter Acronym">TLA</acronym>')),
-      'blockquote' => array(t('Block quoted'), '<blockquote>' . t('Block quoted') . '</blockquote>'),
-      'q' => array(t('Quoted inline'), '<q>' . t('Quoted inline') . '</q>'),
-      // Assumes and describes tr, td, th.
-      'table' => array(t('Table'), '<table> <tr><th>' . t('Table header') . '</th></tr> <tr><td>' . t('Table cell') . '</td></tr> </table>'),
-      'tr' => NULL, 'td' => NULL, 'th' => NULL,
-      'del' => array(t('Deleted'), '<del>' . t('Deleted') . '</del>'),
-      'ins' => array(t('Inserted'), '<ins>' . t('Inserted') . '</ins>'),
-       // Assumes and describes li.
-      'ol' => array(t('Ordered list - use the &lt;li&gt; to begin each list item'), '<ol> <li>' . t('First item') . '</li> <li>' . t('Second item') . '</li> </ol>'),
-      'ul' => array(t('Unordered list - use the &lt;li&gt; to begin each list item'), '<ul> <li>' . t('First item') . '</li> <li>' . t('Second item') . '</li> </ul>'),
-      'li' => NULL,
-      // Assumes and describes dt and dd.
-      'dl' => array(t('Definition lists are similar to other HTML lists. &lt;dl&gt; begins the definition list, &lt;dt&gt; begins the definition term and &lt;dd&gt; begins the definition description.'), '<dl> <dt>' . t('First term') . '</dt> <dd>' . t('First definition') . '</dd> <dt>' . t('Second term') . '</dt> <dd>' . t('Second definition') . '</dd> </dl>'),
-      'dt' => NULL, 'dd' => NULL,
-      'h1' => array(t('Heading'), '<h1>' . t('Title') . '</h1>'),
-      'h2' => array(t('Heading'), '<h2>' . t('Subtitle') . '</h2>'),
-      'h3' => array(t('Heading'), '<h3>' . t('Subtitle three') . '</h3>'),
-      'h4' => array(t('Heading'), '<h4>' . t('Subtitle four') . '</h4>'),
-      'h5' => array(t('Heading'), '<h5>' . t('Subtitle five') . '</h5>'),
-      'h6' => array(t('Heading'), '<h6>' . t('Subtitle six') . '</h6>')
-    );
-    $header = array(t('Tag Description'), t('You Type'), t('You Get'));
-    preg_match_all('/<([a-z0-9]+)[^a-z0-9]/i', $allowed_html, $out);
-    foreach ($out[1] as $tag) {
-      if (!empty($tips[$tag])) {
-        $rows[] = array(
-          array('data' => $tips[$tag][0], 'class' => array('description')),
-          array('data' => '<code>' . check_plain($tips[$tag][1]) . '</code>', 'class' => array('type')),
-          array('data' => $tips[$tag][1], 'class' => array('get'))
-        );
-      }
-      else {
-        $rows[] = array(
-          array('data' => t('No help provided for tag %tag.', array('%tag' => $tag)), 'class' => array('description'), 'colspan' => 3),
-        );
-      }
-    }
-    $output .= theme('table', array('header' => $header, 'rows' => $rows));
-
-    $output .= '<p>' . t('Most unusual characters can be directly entered without any problems.') . '</p>';
-    $output .= '<p>' . t('If you do encounter problems, try using HTML character entities. A common example looks like &amp;amp; for an ampersand &amp; character. For a full list of entities see HTML\'s <a href="@html-entities">entities</a> page. Some of the available characters include:', array('@html-entities' => 'http://www.w3.org/TR/html4/sgml/entities.html')) . '</p>';
-
-    $entities = array(
-      array(t('Ampersand'), '&amp;'),
-      array(t('Greater than'), '&gt;'),
-      array(t('Less than'), '&lt;'),
-      array(t('Quotation mark'), '&quot;'),
-    );
-    $header = array(t('Character Description'), t('You Type'), t('You Get'));
-    unset($rows);
-    foreach ($entities as $entity) {
-      $rows[] = array(
-        array('data' => $entity[0], 'class' => array('description')),
-        array('data' => '<code>' . check_plain($entity[1]) . '</code>', 'class' => array('type')),
-        array('data' => $entity[1], 'class' => array('get'))
-      );
-    }
-    $output .= theme('table', array('header' => $header, 'rows' => $rows));
-    return $output;
-  }
-
-}
diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtmlCorrector.php b/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtmlCorrector.php
deleted file mode 100644
index 3f6b8e3..0000000
--- a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtmlCorrector.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\Plugin\Filter\FilterHtmlCorrector.
- */
-
-namespace Drupal\filter\Plugin\Filter;
-
-use Drupal\filter\Annotation\Filter;
-use Drupal\Core\Annotation\Translation;
-use Drupal\filter\Plugin\FilterBase;
-
-/**
- * Provides a filter to correct faulty and chopped off HTML.
- *
- * @Filter(
- *   id = "filter_htmlcorrector",
- *   module = "filter",
- *   title = @Translation("Correct faulty and chopped off HTML"),
- *   type = FILTER_TYPE_HTML_RESTRICTOR,
- *   weight = 10
- * )
- */
-class FilterHtmlCorrector extends FilterBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function process($text, $langcode, $cache, $cache_id) {
-    return _filter_htmlcorrector($text);
-  }
-
-}
diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtmlEscape.php b/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtmlEscape.php
deleted file mode 100644
index f4a3694..0000000
--- a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtmlEscape.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\Plugin\Filter\FilterHtmlEscape.
- */
-
-namespace Drupal\filter\Plugin\Filter;
-
-use Drupal\filter\Annotation\Filter;
-use Drupal\Core\Annotation\Translation;
-use Drupal\filter\Plugin\FilterBase;
-
-/**
- * Provides a filter to display any HTML as plain text.
- *
- * @Filter(
- *   id = "filter_html_escape",
- *   module = "filter",
- *   title = @Translation("Display any HTML as plain text"),
- *   type = FILTER_TYPE_HTML_RESTRICTOR,
- *   weight = -10
- * )
- */
-class FilterHtmlEscape extends FilterBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function process($text, $langcode, $cache, $cache_id) {
-    return _filter_html_escape($text);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function tips($long = FALSE) {
-    return t('No HTML tags allowed.');
-  }
-
-}
diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtmlImageSecure.php b/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtmlImageSecure.php
deleted file mode 100644
index e919939..0000000
--- a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterHtmlImageSecure.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\Plugin\Filter\FilterHtmlImageSecure.
- */
-
-namespace Drupal\filter\Plugin\Filter;
-
-use Drupal\filter\Annotation\Filter;
-use Drupal\Core\Annotation\Translation;
-use Drupal\filter\Plugin\FilterBase;
-
-/**
- * Provides a filter to restrict images to site.
- *
- * @Filter(
- *   id = "filter_html_image_secure",
- *   module = "filter",
- *   title = @Translation("Restrict images to this site"),
- *   description = @Translation("Disallows usage of &lt;img&gt; tag sources that are not hosted on this site by replacing them with a placeholder image."),
- *   type = FILTER_TYPE_HTML_RESTRICTOR,
- *   weight = 9
- * )
- */
-class FilterHtmlImageSecure extends FilterBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function process($text, $langcode, $cache, $cache_id) {
-    return _filter_html_image_secure_process($text);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function tips($long = FALSE) {
-    return t('Only images hosted on this site may be used in &lt;img&gt; tags.');
-  }
-
-}
diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterUrl.php b/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterUrl.php
deleted file mode 100644
index 4b432b6..0000000
--- a/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterUrl.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\Plugin\Filter\FilterUrl.
- */
-
-namespace Drupal\filter\Plugin\Filter;
-
-use Drupal\filter\Annotation\Filter;
-use Drupal\Core\Annotation\Translation;
-use Drupal\filter\Plugin\FilterBase;
-
-/**
- * Provides a filter to convert URLs into links.
- *
- * @Filter(
- *   id = "filter_url",
- *   module = "filter",
- *   title = @Translation("Convert URLs into links"),
- *   type = FILTER_TYPE_MARKUP_LANGUAGE,
- *   settings = {
- *     "filter_url_length" = 72
- *   }
- * )
- */
-class FilterUrl extends FilterBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function settingsForm(array $form, array &$form_state) {
-    $form['filter_url_length'] = array(
-      '#type' => 'number',
-      '#title' => t('Maximum link text length'),
-      '#default_value' => $this->settings['filter_url_length'],
-      '#min' => 1,
-      '#field_suffix' => t('characters'),
-      '#description' => t('URLs longer than this number of characters will be truncated to prevent long strings that break formatting. The link itself will be retained; just the text portion of the link will be truncated.'),
-    );
-    return $form;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function process($text, $langcode, $cache, $cache_id) {
-    return _filter_url($text, $this);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function tips($long = FALSE) {
-    return t('Web page addresses and e-mail addresses turn into links automatically.');
-  }
-
-}
diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/FilterBase.php b/core/modules/filter/lib/Drupal/filter/Plugin/FilterBase.php
deleted file mode 100644
index ab56c91..0000000
--- a/core/modules/filter/lib/Drupal/filter/Plugin/FilterBase.php
+++ /dev/null
@@ -1,156 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\Plugin\Filter\FilterBase.
- */
-
-namespace Drupal\filter\Plugin;
-
-use Drupal\Component\Plugin\PluginBase;
-use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
-use Drupal\filter\FilterBag;
-
-/**
- * Provides a base class for Filter plugins.
- */
-abstract class FilterBase extends PluginBase implements FilterInterface {
-
-  /**
-   * The plugin ID of this filter.
-   *
-   * @var string
-   */
-  protected $plugin_id;
-
-  /**
-   * The name of the module that owns this filter.
-   *
-   * @var string
-   */
-  public $module;
-
-  /**
-   * A Boolean indicating whether this filter is enabled.
-   *
-   * @var bool
-   */
-  public $status = FALSE;
-
-  /**
-   * The weight of this filter compared to others in a filter collection.
-   *
-   * @see FilterBase::$filterBag
-   *
-   * @var int
-   */
-  public $weight = 0;
-
-  /**
-   * A Boolean indicating whether the text processed by this filter may be cached.
-   *
-   * @var bool
-   */
-  public $cache = TRUE;
-
-  /**
-   * An associative array containing the configured settings of this filter.
-   *
-   * @var array
-   */
-  public $settings = array();
-
-  /**
-   * A collection of all filters this filter participates in.
-   *
-   * @var \Drupal\filter\FilterBag
-   */
-  protected $bag;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, FilterBag $bag) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition);
-
-    $this->module = $this->pluginDefinition['module'];
-    $this->cache = $this->pluginDefinition['cache'];
-
-    $this->setPluginConfiguration($configuration);
-
-    $this->bag = $bag;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setPluginConfiguration(array $configuration) {
-    if (isset($configuration['status'])) {
-      $this->status = (bool) $configuration['status'];
-    }
-    if (isset($configuration['weight'])) {
-      $this->weight = (int) $configuration['weight'];
-    }
-    if (isset($configuration['settings'])) {
-      $this->settings = (array) $configuration['settings'];
-    }
-    return $this;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function export() {
-    return array(
-      'module' => $this->pluginDefinition['module'],
-      'status' => $this->status,
-      'weight' => $this->weight,
-      'settings' => $this->settings,
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getType() {
-    return $this->pluginDefinition['type'];
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getLabel() {
-    return $this->pluginDefinition['title'];
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getDescription() {
-    return $this->pluginDefinition['description'];
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function settingsForm(array $form, array &$form_state) {
-    // Implementations should work with and return $form. Returning an empty
-    // array here allows the text format administration form to identify whether
-    // the filter plugin has any settings form elements.
-    return array();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function prepare($text, $langcode, $cache, $cache_id) {
-    return $text;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function tips($long = FALSE) {
-  }
-
-}
diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/FilterInterface.php b/core/modules/filter/lib/Drupal/filter/Plugin/FilterInterface.php
deleted file mode 100644
index 0857139..0000000
--- a/core/modules/filter/lib/Drupal/filter/Plugin/FilterInterface.php
+++ /dev/null
@@ -1,196 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter\Plugin\Filter\FilterInterface.
- */
-
-namespace Drupal\filter\Plugin;
-
-/**
- * Defines the interface for text processing filter plugins.
- *
- * User submitted content is passed through a group of filters before it is
- * output in HTML, in order to remove insecure or unwanted parts, correct or
- * enhance the formatting, transform special keywords, etc. A group of filters
- * is referred to as a "text format". Administrators can create as many text
- * formats as needed. Individual filters can be enabled and configured
- * differently for each text format.
- *
- * @see \Drupal\filter\Plugin\Core\Entity\FilterFormat
- *
- * Filtering is a two-step process. First, the content is 'prepared' by calling
- * the FilterInterface::prepare() method for every filter. The purpose is to
- * escape HTML-like structures. For example, imagine a filter which allows the
- * user to paste entire chunks of programming code without requiring manual
- * escaping of special HTML characters like < or &. If the programming code were
- * left untouched, then other filters could think it was HTML and change it. For
- * many filters, the prepare step is not necessary.
- *
- * The second step is the actual processing step. The result from passing the
- * text through all the filters' prepare steps gets passed to all the filters
- * again, this time to the FilterInterface::process() method. The process method
- * should then actually change the content: transform URLs into hyperlinks,
- * convert smileys into images, etc.
- *
- * For performance reasons, content is only filtered once; the result is stored
- * in the cache table and retrieved from the cache the next time the same piece
- * of content is displayed. If a filter's output is dynamic, it can override
- * the cache mechanism, but obviously this should be used with caution: having
- * one filter that does not support caching in a collection of filters disables
- * caching for the entire collection, not just for one filter.
- *
- * Beware of the filter cache when developing your module: it is advised to set
- * your filter to 'cache' to FALSE while developing, but be sure to remove that
- * setting if it's not needed, when you are no longer in development mode.
- *
- * @see check_markup()
- *
- * Filters are discovered through annotations, which may contain the following
- * definition properties:
- * - title: (required) An administrative summary of what the filter does.
- *   - type: (required) A classification of the filter's purpose. This is one
- *     of the following:
- *     - FILTER_TYPE_HTML_RESTRICTOR: HTML tag and attribute restricting
- *       filters.
- *     - FILTER_TYPE_MARKUP_LANGUAGE: Non-HTML markup language filters that
- *       generate HTML.
- *     - FILTER_TYPE_TRANSFORM_IRREVERSIBLE: Irreversible transformation
- *       filters.
- *     - FILTER_TYPE_TRANSFORM_REVERSIBLE: Reversible transformation filters.
- * - description: Additional administrative information about the filter's
- *   behavior, if needed for clarification.
- * - status: The default status for new instances of the filter. Defaults to
- *   FALSE.
- * - weight: A default weight for new instances of the filter. Defaults to 0.
- * - cache: Whether the filtered text can be cached. Defaults to TRUE.
- *   Note that setting this to FALSE disables caching for an entire text format,
- *   which can have a negative impact on the site's overall performance.
- * - settings: An associative array containing default settings for new
- *   instances of the filter.
- *
- * Most implementations want to extend the generic basic implementation for
- * filter plugins.
- *
- * @see \Drupal\filter\Plugin\Filter\FilterBase
- */
-interface FilterInterface {
-
-  /**
-   * Sets the configuration for this filter plugin instance.
-   *
-   * @param array $configuration
-   *   An associative array containing:
-   *   - status: A Boolean indicating whether the plugin is enabled.
-   *   - weight: The weight of the filter compared to others.
-   *   - settings: An associative array containing configured settings for this
-   *     filter implementation.
-   */
-  public function setPluginConfiguration(array $configuration);
-
-  /**
-   * Exports the complete configuration of this filter plugin instance.
-   *
-   * @return array
-   */
-  public function export();
-
-  /**
-   * Returns the processing type of this filter plugin.
-   *
-   * @return int
-   *   One of:
-   *   - FILTER_TYPE_MARKUP_LANGUAGE
-   *   - FILTER_TYPE_HTML_RESTRICTOR
-   *   - FILTER_TYPE_TRANSFORM_REVERSIBLE
-   *   - FILTER_TYPE_TRANSFORM_IRREVERSIBLE
-   */
-  public function getType();
-
-  /**
-   * Returns the administrative label for this filter plugin.
-   *
-   * @return string
-   */
-  public function getLabel();
-
-  /**
-   * Returns the administrative description for this filter plugin.
-   *
-   * @return string
-   */
-  public function getDescription();
-
-  /**
-   * Generates a filter's settings form.
-   *
-   * @param array $form
-   *   A minimally prepopulated form array.
-   * @param array $form_state
-   *   The state of the (entire) configuration form.
-   *
-   * @return array
-   *   The $form array with additional form elements for the settings of this
-   *   filter. The submitted form values should match $this->settings.
-   */
-  public function settingsForm(array $form, array &$form_state);
-
-  /**
-   * Prepares the text for processing.
-   *
-   * Filters should not use the prepare method for anything other than escaping,
-   * because that would short-circuit the control the user has over the order in
-   * which filters are applied.
-   *
-   * @param string $text
-   *   The text string to be filtered.
-   * @param string $langcode
-   *   The language code of the text to be filtered.
-   * @param bool $cache
-   *   A Boolean indicating whether the filtered text is going to be cached in
-   *   {cache_filter}.
-   * @param string $cache_id
-   *   The ID of the filtered text in {cache_filter}, if $cache is TRUE.
-   *
-   * @return string
-   *   The prepared, escaped text.
-   */
-  public function prepare($text, $langcode, $cache, $cache_id);
-
-  /**
-   * Performs the filter processing.
-   *
-   * @param string $text
-   *   The text string to be filtered.
-   * @param string $langcode
-   *   The language code of the text to be filtered.
-   * @param bool $cache
-   *   A Boolean indicating whether the filtered text is going to be cached in
-   *   {cache_filter}.
-   * @param string $cache_id
-   *   The ID of the filtered text in {cache_filter}, if $cache is TRUE.
-   *
-   * @return string
-   *   The filtered text.
-   */
-  public function process($text, $langcode, $cache, $cache_id);
-
-  /**
-   * Generates a filter's tip.
-   *
-   * A filter's tips should be informative and to the point. Short tips are
-   * preferably one-liners.
-   *
-   * @param bool $long
-   *   Whether this callback should return a short tip to display in a form
-   *   (FALSE), or whether a more elaborate filter tips should be returned for
-   *   theme_filter_tips() (TRUE).
-   *
-   * @return string|null
-   *   Translated text to display as a tip, or NULL if this filter has no tip.
-   *
-   * @todo Split into getSummaryItem() and buildGuidelines().
-   */
-  public function tips($long = FALSE);
-
-}
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
index b07acac..81d5321 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAdminTest.php
@@ -34,12 +34,10 @@ function setUp() {
 
     // Create users.
     $basic_html_format = filter_format_load('basic_html');
-    $restricted_html_format = filter_format_load('restricted_html');
     $full_html_format = filter_format_load('full_html');
     $this->admin_user = $this->drupalCreateUser(array(
       'administer filters',
       filter_permission_name($basic_html_format),
-      filter_permission_name($restricted_html_format),
       filter_permission_name($full_html_format),
     ));
 
@@ -117,11 +115,12 @@ function testFormatAdmin() {
    * Tests filter administration functionality.
    */
   function testFilterAdmin() {
-    $first_filter = 'filter_autop';
-    $second_filter = 'filter_url';
+    // URL filter.
+    $first_filter = 'filter_url';
+    // Line filter.
+    $second_filter = 'filter_autop';
 
     $basic = 'basic_html';
-    $restricted = 'restricted_html';
     $full = 'full_html';
     $plain = 'plain_text';
 
@@ -139,9 +138,9 @@ function testFilterAdmin() {
     // Add an additional tag.
     $edit = array();
     $edit['filters[filter_html][settings][allowed_html]'] = '<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <quote>';
-    $this->drupalPost('admin/config/content/formats/' . $restricted, $edit, t('Save configuration'));
+    $this->drupalPost('admin/config/content/formats/' . $basic, $edit, t('Save configuration'));
     $this->assertUrl('admin/config/content/formats');
-    $this->drupalGet('admin/config/content/formats/' . $restricted);
+    $this->drupalGet('admin/config/content/formats/' . $basic);
     $this->assertFieldByName('filters[filter_html][settings][allowed_html]', $edit['filters[filter_html][settings][allowed_html]'], 'Allowed HTML tag added.');
 
     $this->assertTrue(cache('filter')->isEmpty(), 'Cache cleared.');
@@ -158,7 +157,7 @@ function testFilterAdmin() {
     $edit['filters[' . $first_filter . '][weight]'] = 2;
     $this->drupalPost(NULL, $edit, t('Save configuration'));
     $this->assertUrl('admin/config/content/formats');
-    $this->drupalGet('admin/config/content/formats/' . $restricted);
+    $this->drupalGet('admin/config/content/formats/' . $basic);
     $this->assertFieldByName('filters[' . $second_filter . '][weight]', 1, 'Order saved successfully.');
     $this->assertFieldByName('filters[' . $first_filter . '][weight]', 2, 'Order saved successfully.');
 
@@ -168,14 +167,13 @@ function testFilterAdmin() {
     ));
     $this->assertTrue(!empty($elements), 'Reorder confirmed in admin interface.');
 
-    $filter_format = entity_load('filter_format', $restricted);
-    foreach ($filter_format->filters() as $filter_name => $filter) {
+    $filter_format = entity_load('filter_format', $basic);
+    foreach ($filter_format->filters as $filter_name => $filter) {
       if ($filter_name == $second_filter || $filter_name == $first_filter) {
         $filters[] = $filter_name;
       }
     }
-    // Ensure that the second filter is now before the first filter.
-    $this->assertEqual($filter_format->filters($second_filter)->weight + 1, $filter_format->filters($first_filter)->weight, 'Order confirmed in configuration.');
+    $this->assertTrue($filter_format->filters['filter_autop']['weight'] + 1 == $filter_format->filters['filter_url']['weight'], t('Order confirmed in configuration.'));
 
     // Add format.
     $edit = array();
@@ -211,6 +209,7 @@ function testFilterAdmin() {
     $this->assertRaw(t('The text format %format has been updated.', array('%format' => $format->name)), 'Full HTML format successfully updated.');
 
     // Switch user.
+    $this->drupalLogout();
     $this->drupalLogin($this->web_user);
 
     $this->drupalGet('node/add/page');
@@ -251,6 +250,7 @@ function testFilterAdmin() {
       ->save();
 
     // Switch user.
+    $this->drupalLogout();
     $this->drupalLogin($this->admin_user);
 
     // Clean up.
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterCrudTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterCrudTest.php
index 80b9dd1..7ba7b7d 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterCrudTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterCrudTest.php
@@ -7,19 +7,20 @@
 
 namespace Drupal\filter\Tests;
 
-use Drupal\simpletest\DrupalUnitTestBase;
+use Drupal\simpletest\WebTestBase;
+use stdClass;
 
 /**
  * Tests for text format and filter CRUD operations.
  */
-class FilterCrudTest extends DrupalUnitTestBase {
+class FilterCrudTest extends WebTestBase {
 
   /**
    * Modules to enable.
    *
    * @var array
    */
-  public static $modules = array('filter', 'filter_test');
+  public static $modules = array('filter_test');
 
   public static function getInfo() {
     return array(
@@ -45,32 +46,28 @@ function testTextFormatCrud() {
     $format = entity_create('filter_format', array());
     $format->format = 'custom_format';
     $format->name = 'Custom format';
-    $format->setFilterConfig('filter_url', array(
-      'status' => 1,
-      'settings' => array(
-        'filter_url_length' => 30,
+    $format->filters = array(
+      'filter_url' => array(
+        'status' => 1,
+        'settings' => array(
+          'filter_url_length' => 30,
+        ),
       ),
-    ));
+    );
     $format->save();
     $this->verifyTextFormat($format);
     $this->verifyFilters($format);
 
     // Alter some text format properties and save again.
     $format->name = 'Altered format';
-    $format->setFilterConfig('filter_url', array(
-      'status' => 0,
-    ));
-    $format->setFilterConfig('filter_autop', array(
-      'status' => 1,
-    ));
+    $format->filters['filter_url']['status'] = 0;
+    $format->filters['filter_autop']['status'] = 1;
     $format->save();
     $this->verifyTextFormat($format);
     $this->verifyFilters($format);
 
     // Add a uncacheable filter and save again.
-    $format->setFilterConfig('filter_test_uncacheable', array(
-      'status' => 1,
-    ));
+    $format->filters['filter_test_uncacheable']['status'] = 1;
     $format->save();
     $this->verifyTextFormat($format);
     $this->verifyFilters($format);
@@ -99,12 +96,13 @@ function verifyTextFormat($format) {
     $this->assertEqual($format->langcode, $default_langcode, format_string('filter_format_load: Proper language code for text format %format.', $t_args));
 
     // Verify the 'cache' text format property according to enabled filters.
+    $filter_info = filter_get_filters();
     $filters = filter_list_format($filter_format->format);
     $cacheable = TRUE;
     foreach ($filters as $name => $filter) {
       // If this filter is not cacheable, update $cacheable accordingly, so we
       // can verify $format->cache after iterating over all filters.
-      if ($filter->status && !$filter->cache) {
+      if ($filter->status && isset($filter_info[$name]['cache']) && !$filter_info[$name]['cache']) {
         $cacheable = FALSE;
         break;
       }
@@ -116,21 +114,28 @@ function verifyTextFormat($format) {
    * Verifies that filters are properly stored for a text format.
    */
   function verifyFilters($format) {
+    $format_filters = $format->filters;
+
+    // Verify filter_list_format().
     $filters = filter_list_format($format->format);
-    $format_filters = $format->filters();
+    $format_filters = $format->filters;
     foreach ($filters as $name => $filter) {
       $t_args = array('%format' => $format->name, '%filter' => $name);
 
       // Verify that filter status is properly stored.
-      $this->assertEqual($filter->status, $format_filters->get($name)->status, format_string('filter_list_format: Proper status for %filter in text format %format.', $t_args));
+      $this->assertEqual($filter->status, $format_filters[$name]['status'], format_string('filter_list_format: Proper status for %filter in text format %format.', $t_args));
 
       // Verify that filter settings were properly stored.
-      $this->assertEqual($filter->settings, $format_filters->get($name)->settings, format_string('filter_list_format: Proper filter settings for %filter in text format %format.', $t_args));
+      $this->assertEqual($filter->settings, isset($format_filters[$name]['settings']) ? $format_filters[$name]['settings'] : array(), format_string('filter_list_format: Proper filter settings for %filter in text format %format.', $t_args));
 
       // Verify that each filter has a module name assigned.
       $this->assertTrue(!empty($filter->module), format_string('filter_list_format: Proper module name for %filter in text format %format.', $t_args));
+
+      // Remove the filter from the copy of saved $format to check whether all
+      // filters have been processed later.
+      unset($format_filters[$name]);
     }
-    $this->assertEqual(count($filters), count($format_filters), 'filter_list_format: All filters for the format are present.');
+    // Verify that all filters have been processed.
+    $this->assertTrue(empty($format_filters), 'filter_list_format: Loaded filters contain values for all filters in the saved format.');
   }
-
 }
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php
index ac078e8..85b5fef 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterDefaultConfigTest.php
@@ -42,7 +42,7 @@ function setUp() {
   function testInstallation() {
     // Verify that the format was installed correctly.
     $format = filter_format_load('filter_test');
-    $this->assertTrue((bool) $format);
+    $this->assertTrue($format);
     $this->assertEqual($format->id(), 'filter_test');
     $this->assertEqual($format->label(), 'Test format');
     $this->assertEqual($format->get('weight'), 2);
@@ -75,6 +75,14 @@ function testInstallation() {
     $this->assertEqual($filters['filter_url']['settings'], array(
       'filter_url_length' => 72,
     ));
+
+    // Verify disabled filters.
+    $this->assertEqual($filters['filter_html']['status'], 0);
+    $this->assertEqual($filters['filter_html']['weight'], -10);
+    $this->assertEqual($filters['filter_html']['module'], 'filter');
+    $this->assertEqual($filters['filter_htmlcorrector']['status'], 0);
+    $this->assertEqual($filters['filter_htmlcorrector']['weight'], 10);
+    $this->assertEqual($filters['filter_htmlcorrector']['module'], 'filter');
   }
 
   /**
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterSettingsTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterSettingsTest.php
index 1b6c173..1a0be97 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterSettingsTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterSettingsTest.php
@@ -7,19 +7,18 @@
 
 namespace Drupal\filter\Tests;
 
-use Drupal\simpletest\DrupalUnitTestBase;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Tests filter settings.
  */
-class FilterSettingsTest extends DrupalUnitTestBase {
-
+class FilterSettingsTest extends WebTestBase {
   /**
-   * Modules to enable.
+   * The installation profile to use with this test class.
    *
-   * @var array
+   * @var string
    */
-  public static $modules = array('filter');
+  protected $profile = 'testing';
 
   public static function getInfo() {
     return array(
@@ -33,7 +32,7 @@ public static function getInfo() {
    * Tests explicit and implicit default settings for filters.
    */
   function testFilterDefaults() {
-    $filter_info = $this->container->get('plugin.manager.filter')->getDefinitions();
+    $filter_info = filter_filter_info();
     $filters = array_fill_keys(array_keys($filter_info), array());
 
     // Create text format using filter default settings.
@@ -46,11 +45,11 @@ function testFilterDefaults() {
 
     // Verify that default weights defined in hook_filter_info() were applied.
     $saved_settings = array();
-    foreach ($filter_defaults_format->filters() as $name => $filter) {
-      $expected_weight = $filter_info[$name]['weight'];
-      $this->assertEqual($filter->weight, $expected_weight, format_string('@name filter weight %saved equals %default', array(
+    foreach ($filter_defaults_format->filters as $name => $settings) {
+      $expected_weight = (isset($filter_info[$name]['weight']) ? $filter_info[$name]['weight'] : 0);
+      $this->assertEqual($settings['weight'], $expected_weight, format_string('@name filter weight %saved equals %default', array(
         '@name' => $name,
-        '%saved' => $filter->weight,
+        '%saved' => $settings['weight'],
         '%default' => $expected_weight,
       )));
       $saved_settings[$name]['weight'] = $expected_weight;
@@ -60,12 +59,14 @@ function testFilterDefaults() {
     $filter_defaults_format->save();
     // Reload it from scratch.
     filter_formats_reset();
+    $filter_defaults_format = filter_format_load($filter_defaults_format->format);
+    $filter_defaults_format->filters = filter_list_format($filter_defaults_format->format);
 
     // Verify that saved filter settings have not been changed.
-    foreach (filter_list_format($filter_defaults_format->format) as $name => $filter) {
-      $this->assertEqual($filter->weight, $saved_settings[$name]['weight'], format_string('@name filter weight %saved equals %previous', array(
+    foreach ($filter_defaults_format->filters as $name => $settings) {
+      $this->assertEqual($settings->weight, $saved_settings[$name]['weight'], format_string('@name filter weight %saved equals %previous', array(
         '@name' => $name,
-        '%saved' => $filter->weight,
+        '%saved' => $settings->weight,
         '%previous' => $saved_settings[$name]['weight'],
       )));
     }
diff --git a/core/modules/filter/tests/filter_test/config/filter.format.filter_test.yml b/core/modules/filter/tests/filter_test/config/filter.format.filter_test.yml
index e5ebf83..f57eb00 100644
--- a/core/modules/filter/tests/filter_test/config/filter.format.filter_test.yml
+++ b/core/modules/filter/tests/filter_test/config/filter.format.filter_test.yml
@@ -1,26 +1,13 @@
 format: filter_test
 name: 'Test format'
-weight: '2'
+weight: 2
 roles:
   - anonymous
   - authenticated
-cache: '1'
-status: '1'
-langcode: en
 filters:
   filter_html_escape:
-    module: filter
     status: '1'
-    weight: '-10'
-    settings: {  }
-  filter_autop:
-    module: filter
-    status: '1'
-    weight: '0'
-    settings: {  }
   filter_url:
-    module: filter
     status: '1'
-    weight: '0'
-    settings:
-      filter_url_length: '72'
+  filter_autop:
+    status: '1'
diff --git a/core/modules/filter/tests/filter_test/filter_test.module b/core/modules/filter/tests/filter_test/filter_test.module
index e3983b4..a61941a 100644
--- a/core/modules/filter/tests/filter_test/filter_test.module
+++ b/core/modules/filter/tests/filter_test/filter_test.module
@@ -25,3 +25,40 @@ function filter_test_filter_format_update($format) {
 function filter_test_filter_format_disable($format) {
   drupal_set_message('hook_filter_format_disable invoked.');
 }
+
+/**
+ * Implements hook_filter_info().
+ */
+function filter_test_filter_info() {
+  $filters['filter_test_uncacheable'] = array(
+    'title' => 'Uncacheable filter',
+    'type' => FILTER_TYPE_TRANSFORM_IRREVERSIBLE,
+    'description' => 'Does nothing, but makes a text format uncacheable.',
+    'cache' => FALSE,
+  );
+  $filters['filter_test_replace'] = array(
+    'title' => 'Testing filter',
+    'type' => FILTER_TYPE_TRANSFORM_IRREVERSIBLE,
+    'description' => 'Replaces all content with filter and text format information.',
+    'process callback' => 'filter_test_replace',
+  );
+  return $filters;
+}
+
+/**
+ * Process handler for filter_test_replace filter.
+ *
+ * Replaces all text with filter and text format information.
+ */
+function filter_test_replace($text, $filter, $format, $langcode, $cache, $cache_id) {
+  $text = array();
+  $text[] = 'Filter: ' . $filter->title . ' (' . $filter->name . ')';
+  $text[] = 'Format: ' . $format->name . ' (' . $format->format . ')';
+  $text[] = 'Language: ' . $langcode;
+  $text[] = 'Cache: ' . ($cache ? 'Enabled' : 'Disabled');
+  if ($cache_id) {
+    $text[] = 'Cache ID: ' . $cache_id;
+  }
+  return implode("<br />\n", $text);
+}
+
diff --git a/core/modules/filter/tests/filter_test/lib/Drupal/filter_test/Plugin/Filter/FilterTestReplace.php b/core/modules/filter/tests/filter_test/lib/Drupal/filter_test/Plugin/Filter/FilterTestReplace.php
deleted file mode 100644
index df208e2..0000000
--- a/core/modules/filter/tests/filter_test/lib/Drupal/filter_test/Plugin/Filter/FilterTestReplace.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter_test\Plugin\Filter\FilterTestReplace.
- */
-
-namespace Drupal\filter_test\Plugin\Filter;
-
-use Drupal\filter\Annotation\Filter;
-use Drupal\Core\Annotation\Translation;
-use Drupal\filter\Plugin\FilterBase;
-
-/**
- * Provides a test filter to replace all content.
- *
- * @Filter(
- *   id = "filter_test_replace",
- *   module = "filter_test",
- *   title = @Translation("Testing filter"),
- *   description = @Translation("Replaces all content with filter and text format information."),
- *   type = FILTER_TYPE_TRANSFORM_IRREVERSIBLE
- * )
- */
-class FilterTestReplace extends FilterBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function process($text, $langcode, $cache, $cache_id) {
-    $text = array();
-    $text[] = 'Filter: ' . $this->getLabel() . ' (' . $this->getPluginID() . ')';
-    $text[] = 'Language: ' . $langcode;
-    $text[] = 'Cache: ' . ($cache ? 'Enabled' : 'Disabled');
-    if ($cache_id) {
-      $text[] = 'Cache ID: ' . $cache_id;
-    }
-    return implode("<br />\n", $text);
-  }
-
-}
diff --git a/core/modules/filter/tests/filter_test/lib/Drupal/filter_test/Plugin/Filter/FilterTestUncacheable.php b/core/modules/filter/tests/filter_test/lib/Drupal/filter_test/Plugin/Filter/FilterTestUncacheable.php
deleted file mode 100644
index 7c3140d..0000000
--- a/core/modules/filter/tests/filter_test/lib/Drupal/filter_test/Plugin/Filter/FilterTestUncacheable.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\filter_test\Plugin\Filter\FilterTestUncacheable.
- */
-
-namespace Drupal\filter_test\Plugin\Filter;
-
-use Drupal\filter\Annotation\Filter;
-use Drupal\Core\Annotation\Translation;
-use Drupal\filter\Plugin\FilterBase;
-
-/**
- * Provides a test filter that is uncacheable.
- *
- * @Filter(
- *   id = "filter_test_uncacheable",
- *   module = "filter_test",
- *   title = @Translation("Uncacheable filter"),
- *   description = @Translation("Does nothing, but makes a text format uncacheable"),
- *   type = FILTER_TYPE_TRANSFORM_IRREVERSIBLE,
- *   cache = false
- * )
- */
-class FilterTestUncacheable extends FilterBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function process($text, $langcode, $cache, $cache_id) {
-    return $text;
-  }
-
-}
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 1a5e009..74d19e2 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -33,7 +33,7 @@ function forum_help($path, $arg) {
       $output .= '<dt>' . t('Setting up forum structure') . '</dt>';
       $output .= '<dd>' . t('Visit the <a href="@forums">Forums page</a> to set up containers and forums to hold your discussion topics.', array('@forums' => url('admin/structure/forum'))) . '</dd>';
       $output .= '<dt>' . t('Starting a discussion') . '</dt>';
-      $output .= '<dd>' . t('The <a href="@create-topic">Forum topic</a> link on the <a href="@content-add">Add new content</a> page creates the first post of a new threaded discussion, or thread.', array('@create-topic' => url('node/add/forum'), '@content-add' => url('node/add'))) . '</dd>';
+      $output .= '<dd>' . t('The <a href="@create-topic">Forum topic</a> link on the <a href="@content-add">Add content</a> page creates the first post of a new threaded discussion, or thread.', array('@create-topic' => url('node/add/forum'), '@content-add' => url('node/add'))) . '</dd>';
       $output .= '<dt>' . t('Forum navigation') . '</dt>';
       $output .= '<dd>' . t('Enabling the Forum module provides a default <em>Forums</em> menu item in the Tools menu that links to the <a href="@forums">Forums page</a>.', array('@forums' => url('forum'))) . '</dd>';
       $output .= '<dt>' . t('Moving forum topics') . '</dt>';
@@ -179,7 +179,7 @@ function forum_menu_local_tasks(&$data, $router_item, $root_path) {
           $links[$type] = array(
             '#theme' => 'menu_local_action',
             '#link' => array(
-              'title' => t('Add new @node_type', array('@node_type' => node_type_get_label($type))),
+              'title' => t('Add @node_type', array('@node_type' => node_type_get_label($type))),
               'href' => 'node/add/' . $type . '/' . $forum_term->id(),
             ),
           );
@@ -973,7 +973,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function forum_preprocess_block(&$variables) {
   if ($variables['configuration']['module'] == 'forum') {
@@ -982,11 +982,9 @@ function forum_preprocess_block(&$variables) {
 }
 
 /**
- * Prepares variables for forums templates.
+ * Preprocesses variables for forums.tpl.php.
  *
- * Default template: forums.html.twig.
- *
- * @param array $variables
+ * @param $variables
  *   An array containing the following elements:
  *   - forums: An array of all forum objects to display for the given taxonomy
  *     term ID. If tid = 0 then all the top-level forums are displayed.
@@ -1000,32 +998,23 @@ function forum_preprocess_block(&$variables) {
  *     - 3: Posts with the most comments first.
  *     - 4: Posts with the least comments first.
  *   - forum_per_page: The maximum number of topics to display per page.
+ *
+ * @see forums.tpl.php
  */
 function template_preprocess_forums(&$variables) {
   if ($variables['forums_defined'] = count($variables['forums']) || count($variables['parents'])) {
     if (!empty($variables['forums'])) {
-      $variables['forums'] = array(
-        '#theme' => 'forum_list',
-        '#forums' => $variables['forums'],
-        '#parents' => $variables['parents'],
-        '#tid' => $variables['tid'],
-      );
+      $variables['forums'] = theme('forum_list', $variables);
     }
     else {
-      $variables['forums'] = array();
+      $variables['forums'] = '';
     }
 
     if ($variables['tid'] && array_search($variables['tid'], config('forum.settings')->get('containers')) === FALSE) {
-      $variables['topics'] = array(
-        '#theme' => 'forum_topic_list',
-        '#tid' => $variables['tid'],
-        '#topics' => $variables['topics'],
-        '#sortby' => $variables['sortby'],
-        '#forum_per_page' => $variables['forum_per_page'],
-      );
+      $variables['topics'] = theme('forum_topic_list', $variables);
     }
     else {
-      $variables['topics'] = array();
+      $variables['topics'] = '';
     }
 
     // Provide separate template suggestions based on what's being output. Topic id is also accounted for.
@@ -1046,23 +1035,24 @@ function template_preprocess_forums(&$variables) {
 
   }
   else {
-    $variables['forums'] = array();
-    $variables['topics'] = array();
+    $variables['forums'] = '';
+    $variables['topics'] = '';
   }
 }
 
 /**
- * Prepares variables for forum list templates.
+ * Preprocesses variables for forum-list.tpl.php.
  *
- * Default template: forum-list.html.twig.
- *
- * @param array $variables
+ * @param $variables
  *   An array containing the following elements:
  *   - forums: An array of all forum objects to display for the given taxonomy
  *     term ID. If tid = 0 then all the top-level forums are displayed.
  *   - parents: An array of taxonomy term objects that are ancestors of the
  *     current term ID.
  *   - tid: Taxonomy term ID of the current forum.
+ *
+ * @see forum-list.tpl.php
+ * @see theme_forum_list()
  */
 function template_preprocess_forum_list(&$variables) {
   global $user;
@@ -1094,26 +1084,22 @@ function template_preprocess_forum_list(&$variables) {
     }
     $variables['forums'][$id]->last_reply = theme('forum_submitted', array('topic' => $forum->last_post));
   }
-
-  $variables['pager'] = array(
-   '#theme' => 'pager',
-  );
-
-  // Give meaning to $tid for themers. $tid actually stands for term ID.
+  // Give meaning to $tid for themers. $tid actually stands for term id.
   $variables['forum_id'] = $variables['tid'];
   unset($variables['tid']);
 }
 
 /**
- * Prepares variables for forum topic list templates.
+ * Preprocesses variables for forum-topic-list.tpl.php.
  *
- * Default template: forum-topic-list.html.twig.
- *
- * @param array $variables
+ * @param $variables
  *   An array containing the following elements:
  *   - tid: Taxonomy term ID of the current forum.
  *   - topics: An array of all the topics in the current forum.
  *   - forum_per_page: The maximum number of topics to display per page.
+ *
+ * @see forum-topic-list.tpl.php
+ * @see theme_forum_topic_list()
  */
 function template_preprocess_forum_topic_list(&$variables) {
   global $forum_topic_list_header;
@@ -1130,14 +1116,7 @@ function template_preprocess_forum_topic_list(&$variables) {
   if (!empty($variables['topics'])) {
     $row = 0;
     foreach ($variables['topics'] as $id => $topic) {
-      $variables['topics'][$id]->icon = array(
-        '#theme' => 'forum_icon',
-        '#new_posts' => $topic->new,
-        '#num_posts' => $topic->comment_count,
-        '#comment_mode' => $topic->comment_mode,
-        '#sticky' => $topic->sticky,
-        '#first_new' => $topic->first_new,
-      );
+      $variables['topics'][$id]->icon = theme('forum_icon', array('new_posts' => $topic->new, 'num_posts' => $topic->comment_count, 'comment_mode' => $topic->comment_mode, 'sticky' => $topic->sticky, 'first_new' => $topic->first_new));
       $variables['topics'][$id]->zebra = $row % 2 == 0 ? 'odd' : 'even';
       $row++;
 
@@ -1174,17 +1153,13 @@ function template_preprocess_forum_topic_list(&$variables) {
   $variables['topic_id'] = $variables['tid'];
   unset($variables['tid']);
 
-  $variables['pager'] = array(
-    '#theme' => 'pager',
-  );
+  $variables['pager'] = theme('pager');
 }
 
 /**
- * Prepares variables for forum icon templates.
+ * Preprocesses variables for forum-icon.tpl.php.
  *
- * Default template: forum-icon.html.twig.
- *
- * @param array $variables
+ * @param $variables
  *   An array containing the following elements:
  *   - new_posts: Indicates whether or not the topic contains new posts.
  *   - num_posts: The total number of posts in all topics.
@@ -1192,45 +1167,44 @@ function template_preprocess_forum_topic_list(&$variables) {
  *     or hidden.
  *   - sticky: Indicates whether the topic is sticky.
  *   - first_new: Indicates whether this is the first topic with new posts.
+ *
+ * @see forum-icon.tpl.php
+ * @see theme_forum_icon()
  */
 function template_preprocess_forum_icon(&$variables) {
   $variables['hot_threshold'] = config('forum.settings')->get('topics.hot_threshold');
-
   if ($variables['num_posts'] > $variables['hot_threshold']) {
-    $icon_status_class = $variables['new_posts'] ? 'hot-new' : 'hot';
+    $variables['icon_class'] = $variables['new_posts'] ? 'hot-new' : 'hot';
     $variables['icon_title'] = $variables['new_posts'] ? t('Hot topic, new comments') : t('Hot topic');
   }
   else {
-    $icon_status_class = $variables['new_posts'] ? 'new' : 'default';
+    $variables['icon_class'] = $variables['new_posts'] ? 'new' : 'default';
     $variables['icon_title'] = $variables['new_posts'] ? t('New comments') : t('Normal topic');
   }
 
   if ($variables['comment_mode'] == COMMENT_NODE_CLOSED || $variables['comment_mode'] == COMMENT_NODE_HIDDEN) {
-    $icon_status_class = 'closed';
+    $variables['icon_class'] = 'closed';
     $variables['icon_title'] = t('Closed topic');
   }
 
   if ($variables['sticky'] == 1) {
-    $icon_status_class = 'sticky';
+    $variables['icon_class'] = 'sticky';
     $variables['icon_title'] = t('Sticky topic');
   }
-
-  $variables['attributes']['class'][] = 'icon';
-  $variables['attributes']['class'][] = 'topic-status-' . $icon_status_class;
-  $variables['attributes']['title'] = $variables['icon_title'];
 }
 
 /**
- * Prepares variables for forum submission information templates.
+ * Preprocesses variables for forum-submitted.tpl.php.
  *
  * The submission information will be displayed in the forum list and topic
  * list.
  *
- * Default template: forum-submitted.html.twig.
- *
- * @param array $variables
+ * @param $variables
  *   An array containing the following elements:
  *   - topic: The topic object.
+ *
+ * @see forum-submitted.tpl.php
+ * @see theme_forum_submitted()
  */
 function template_preprocess_forum_submitted(&$variables) {
   $variables['author'] = isset($variables['topic']->uid) ? theme('username', array('account' => $variables['topic'])) : '';
diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
index 0232b21..1798f6c 100644
--- a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
+++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
@@ -165,11 +165,11 @@ function testForum() {
     // Verify that this user cannot edit forum content authored by another user.
     $this->verifyForums($this->edit_any_topics_user, $any_topics_user_node, FALSE, 403);
 
-    // Verify that this user is shown a local task to add new forum content.
+    // Verify that this user is shown a local task to add forum content.
     $this->drupalGet('forum');
-    $this->assertLink(t('Add new Forum topic'));
+    $this->assertLink(t('Add Forum topic'));
     $this->drupalGet('forum/' . $this->forum['tid']);
-    $this->assertLink(t('Add new Forum topic'));
+    $this->assertLink(t('Add Forum topic'));
 
     // Login a user with permission to edit any forum content.
     $this->drupalLogin($this->edit_any_topics_user);
diff --git a/core/modules/forum/templates/forum-icon.html.twig b/core/modules/forum/templates/forum-icon.html.twig
deleted file mode 100644
index eafbe06..0000000
--- a/core/modules/forum/templates/forum-icon.html.twig
+++ /dev/null
@@ -1,26 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a status icon for a forum post.
- *
- * Available variables:
- * - attributes: HTML attributes to be applied to the wrapper element.
- *   - class: HTML classes that determine which icon to display. May be one of
- *     'hot', 'hot-new', 'new', 'default', 'closed', or 'sticky'.
- *   - title: Text alternative for the forum icon.
- * - icon_title: Text alternative for the forum icon, same as above.
- * - new_posts: '1' when this topic contains new posts, otherwise '0'.
- * - first_new: '1' when this is the first topic with new posts, otherwise '0'.
- *
- * @see template_preprocess()
- * @see template_preprocess_forum_icon()
- *
- * @ingroup themeable
- */
-#}
-<div{{ attributes }}>
-  {% if first_new -%}
-    <a id="new"></a>
-  {%- endif %}
-  <span class="element-invisible">{{ icon_title }}</span>
-</div>
diff --git a/core/modules/forum/templates/forum-icon.tpl.php b/core/modules/forum/templates/forum-icon.tpl.php
new file mode 100644
index 0000000..8b70eb3
--- /dev/null
+++ b/core/modules/forum/templates/forum-icon.tpl.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * @file
+ * Displays an appropriate icon for a forum post.
+ *
+ * Available variables:
+ * - $new_posts: Indicates whether or not the topic contains new posts.
+ * - $icon_class: The icon to display. May be one of 'hot', 'hot-new', 'new',
+ *   'default', 'closed', or 'sticky'.
+ * - $first_new: Indicates whether this is the first topic with new posts.
+ *
+ * @see template_preprocess_forum_icon()
+ * @see theme_forum_icon()
+ *
+ * @ingroup themeable
+ */
+?>
+<div class="icon topic-status-<?php print $icon_class ?>" title="<?php print $icon_title ?>">
+<?php if ($first_new): ?>
+  <a id="new"></a>
+<?php endif; ?>
+
+  <span class="element-invisible"><?php print $icon_title ?></span>
+
+</div>
diff --git a/core/modules/forum/templates/forum-list.html.twig b/core/modules/forum/templates/forum-list.html.twig
deleted file mode 100644
index fd55a77..0000000
--- a/core/modules/forum/templates/forum-list.html.twig
+++ /dev/null
@@ -1,82 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a list of forums and containers.
- *
- * Available variables:
- * - forums: A collection of forums and containers to display. It is keyed to
- *   the numeric IDs of all child forums and containers. Each forum in forums
- *   contains:
- *   - is_container: A flag indicating if the forum can contain other
- *     forums. Otherwise, the forum can only contain topics.
- *   - depth: How deep the forum is in the current hierarchy.
- *   - zebra: 'even' or 'odd', used for row class.
- *   - icon_class: 'default' or 'new', used for forum icon class.
- *   - icon_title: Text alternative for the forum icon.
- *   - name: The name of the forum.
- *   - link: The URL to link to this forum.
- *   - description: The description field for the forum, containing:
- *     - value: The descriptive text for the forum.
- *   - new_topics: A flag indicating if the forum contains unread posts.
- *   - new_url: A URL to the forum's unread posts.
- *   - new_text: Text for the above URL, which tells how many new posts.
- *   - old_topics: A count of posts that have already been read.
- *   - num_posts: The total number of posts in the forum.
- *   - last_reply: Text representing the last time a forum was posted or
- *     commented in.
- * - forum_id: Forum ID for the current forum. Parent to all items within the
- *   forums array.
- *
- * @see template_preprocess()
- * @see template_preprocess_forum_list()
- *
- * @ingroup themeable
- */
-#}
-<table id="forum-{{ forum_id }}">
-  <thead>
-    <tr>
-      <th>{{ 'Forum'|t }}</th>
-      <th>{{ 'Topics'|t }}</th>
-      <th>{{ 'Posts'|t }}</th>
-      <th>{{ 'Last post'|t }}</th>
-    </tr>
-  </thead>
-  <tbody>
-  {% for child_id, forum in forums %}
-    <tr id="forum-list-{{ child_id }}" class="{{ forum.zebra }}">
-      <td {% if forum.is_container == true -%}
-        colspan="4" class="container"
-      {%- else -%}
-        class="forum"
-      {%- endif -%}>
-        {#
-          Enclose the contents of this cell with X divs, where X is the
-          depth this forum resides at. This will allow us to use CSS
-          left-margin for indenting.
-        #}
-        {% for i in 1..forum.depth if forum.depth > 0 %}<div class="indent">{% endfor %}
-          <div class="icon forum-status-{{ forum.icon_class }}" title="{{ forum.icon_title }}">
-            <span class="element-invisible">{{ forum.icon_title }}</span>
-          </div>
-          <div class="name"><a href="{{ forum.link }}">{{ forum.label }}</a></div>
-          {% if forum.description.value %}
-            <div class="description">{{ forum.description.value }}</div>
-          {% endif %}
-        {% for i in 1..forum.depth if forum.depth > 0 %}</div>{% endfor %}
-      </td>
-      {% if forum.is_container == false %}
-        <td class="topics">
-          {{ forum.num_topics }}
-          {% if forum.new_topics == true %}
-            <br />
-            <a href="{{ forum.new_url }}">{{ forum.new_text }}</a>
-          {% endif %}
-        </td>
-        <td class="posts">{{ forum.num_posts }}</td>
-        <td class="last-reply">{{ forum.last_reply }}</td>
-      {% endif %}
-    </tr>
-  {% endfor %}
-  </tbody>
-</table>
diff --git a/core/modules/forum/templates/forum-list.tpl.php b/core/modules/forum/templates/forum-list.tpl.php
new file mode 100644
index 0000000..da8a12d
--- /dev/null
+++ b/core/modules/forum/templates/forum-list.tpl.php
@@ -0,0 +1,77 @@
+<?php
+
+/**
+ * @file
+ * Displays a list of forums and containers.
+ *
+ * Available variables:
+ * - $forums: An array of forums and containers to display. It is keyed to the
+ *   numeric IDs of all child forums and containers. Each $forum in $forums
+ *   contains:
+ *   - $forum->is_container: TRUE if the forum can contain other forums. FALSE
+ *     if the forum can contain only topics.
+ *   - $forum->depth: How deep the forum is in the current hierarchy.
+ *   - $forum->zebra: 'even' or 'odd' string used for row class.
+ *   - $forum->icon_class: 'default' or 'new' string used for forum icon class.
+ *   - $forum->icon_title: Text alternative for the forum icon.
+ *   - $forum->name: The name of the forum.
+ *   - $forum->link: The URL to link to this forum.
+ *   - $forum->description: The description of this forum.
+ *   - $forum->new_topics: TRUE if the forum contains unread posts.
+ *   - $forum->new_url: A URL to the forum's unread posts.
+ *   - $forum->new_text: Text for the above URL, which tells how many new posts.
+ *   - $forum->old_topics: A count of posts that have already been read.
+ *   - $forum->num_posts: The total number of posts in the forum.
+ *   - $forum->last_reply: Text representing the last time a forum was posted or
+ *     commented in.
+ * - $forum_id: Forum ID for the current forum. Parent to all items within the
+ *   $forums array.
+ *
+ * @see template_preprocess_forum_list()
+ * @see theme_forum_list()
+ *
+ * @ingroup themeable
+ */
+?>
+<table id="forum-<?php print $forum_id; ?>">
+  <thead>
+    <tr>
+      <th><?php print t('Forum'); ?></th>
+      <th><?php print t('Topics');?></th>
+      <th><?php print t('Posts'); ?></th>
+      <th><?php print t('Last post'); ?></th>
+    </tr>
+  </thead>
+  <tbody>
+  <?php foreach ($forums as $child_id => $forum): ?>
+    <tr id="forum-list-<?php print $child_id; ?>" class="<?php print $forum->zebra; ?>">
+      <td <?php print $forum->is_container ? 'colspan="4" class="container"' : 'class="forum"'; ?>>
+        <?php /* Enclose the contents of this cell with X divs, where X is the
+               * depth this forum resides at. This will allow us to use CSS
+               * left-margin for indenting.
+               */ ?>
+        <?php print str_repeat('<div class="indent">', $forum->depth); ?>
+          <div class="icon forum-status-<?php print $forum->icon_class; ?>" title="<?php print $forum->icon_title; ?>">
+            <span class="element-invisible"><?php print $forum->icon_title; ?></span>
+          </div>
+          <div class="name"><a href="<?php print $forum->link; ?>"><?php print $forum->label(); ?></a></div>
+          <?php if ($forum->description->value): ?>
+            <div class="description"><?php print $forum->description->value; ?></div>
+          <?php endif; ?>
+        <?php print str_repeat('</div>', $forum->depth); ?>
+      </td>
+      <?php if (!$forum->is_container): ?>
+        <td class="topics">
+          <?php print $forum->num_topics ?>
+          <?php if ($forum->new_topics): ?>
+            <br />
+            <a href="<?php print $forum->new_url; ?>"><?php print $forum->new_text; ?></a>
+          <?php endif; ?>
+        </td>
+        <td class="posts"><?php print $forum->num_posts ?></td>
+        <td class="last-reply"><?php print $forum->last_reply ?></td>
+      <?php endif; ?>
+    </tr>
+  <?php endforeach; ?>
+  </tbody>
+</table>
diff --git a/core/modules/forum/templates/forum-submitted.html.twig b/core/modules/forum/templates/forum-submitted.html.twig
deleted file mode 100644
index ad059dc..0000000
--- a/core/modules/forum/templates/forum-submitted.html.twig
+++ /dev/null
@@ -1,24 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a forum post submission string.
- *
- * The submission string indicates when and by whom a topic was submitted.
- *
- * Available variables:
- * - author: The author of the post.
- * - time: How long ago the post was created.
- * - topic: An object with the raw data of the post. Potentially unsafe. Be
- *   sure to clean this data before printing.
- *
- * @see template_preprocess()
- * @see template_preprocess_forum_submitted()
- *
- * @ingroup themeable
- */
-#}
-{% if time %}
-  <span class="submitted">{{ 'By !author @time ago'|t({'@time': time, '!author': author}) }}</span>
-{% else %}
-  {{ 'n/a'|t }}
-{% endif %}
diff --git a/core/modules/forum/templates/forum-submitted.tpl.php b/core/modules/forum/templates/forum-submitted.tpl.php
new file mode 100644
index 0000000..18fea8f
--- /dev/null
+++ b/core/modules/forum/templates/forum-submitted.tpl.php
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * @file
+ * Formats a forum post submission string.
+ *
+ * The submission string indicates when and by whom a topic was submitted.
+ *
+ * Available variables:
+ * - $author: The author of the post.
+ * - $time: How long ago the post was created.
+ * - $topic: An object with the raw data of the post. Potentially unsafe. Be
+ *   sure to clean this data before printing.
+ *
+ * @see template_preprocess_forum_submitted()
+ * @see theme_forum_submitted()
+ *
+ * @ingroup themeable
+ */
+?>
+<?php if ($time): ?>
+  <span class="submitted">
+  <?php print t('By !author @time ago', array(
+    '@time' => $time,
+    '!author' => $author,
+    )); ?>
+  </span>
+<?php else: ?>
+  <?php print t('n/a'); ?>
+<?php endif; ?>
diff --git a/core/modules/forum/templates/forum-topic-list.html.twig b/core/modules/forum/templates/forum-topic-list.html.twig
deleted file mode 100644
index 32727ee..0000000
--- a/core/modules/forum/templates/forum-topic-list.html.twig
+++ /dev/null
@@ -1,69 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a list of forum topics.
- *
- * Available variables:
- * - header: The table header. This is pre-generated with click-sorting
- *   information. If you need to change this, see
- *   template_preprocess_forum_topic_list().
- * - pager: The pager to display beneath the table.
- * - topics: A collection of topics to be displayed. Each topic in topics
- *   contains:
- *   - icon: The icon to display.
- *   - moved: A flag to indicate whether the topic has been moved to another
- *     forum.
- *   - title: The title of the topic. Safe to output.
- *   - message: If the topic has been moved, this contains an explanation and a
- *     link.
- *   - zebra: 'even' or 'odd', used for row class.
- *   - comment_count: The number of replies on this topic.
- *   - new_replies: A flag to indicate whether there are unread comments.
- *   - new_url: If there are unread replies, this is a link to them.
- *   - new_text: Text containing the translated, properly pluralized count.
- *   - created: Text representing when the topic was posted. Safe to output.
- *   - last_reply: Text representing when the topic was last replied to.
- *   - timestamp: The raw timestamp this topic was posted.
- * - topic_id: Numeric ID for the current forum topic.
- *
- * @see template_preprocess()
- * @see template_preprocess_forum_topic_list()
- *
- * @ingroup themeable
- */
-#}
-<table id="forum-topic-{{ topic_id }}">
-  <thead>
-    <tr>{{ header }}</tr>
-  </thead>
-  <tbody>
-  {% for topic in topics %}
-    <tr class="{{ topic.zebra }}">
-      <td class="topic">
-        {{ topic.icon }}
-        <div class="title">
-          <div>
-            {{ topic.title }}
-          </div>
-          <div>
-            {{ topic.created }}
-          </div>
-        </div>
-      </td>
-    {% if topic.moved %}
-      <td colspan="3">{{ topic.message }}</td>
-    {% else %}
-      <td class="replies">
-        {{ topic.comment_count }}
-        {% if topic.new_replies %}
-          <br />
-          <a href="{{ topic.new_url }}">{{ topic.new_text }}</a>
-        {% endif %}
-      </td>
-      <td class="last-reply">{{ topic.last_reply }}</td>
-    {% endif %}
-    </tr>
-  {% endfor %}
-  </tbody>
-</table>
-{{ pager }}
diff --git a/core/modules/forum/templates/forum-topic-list.tpl.php b/core/modules/forum/templates/forum-topic-list.tpl.php
new file mode 100644
index 0000000..5130ed6
--- /dev/null
+++ b/core/modules/forum/templates/forum-topic-list.tpl.php
@@ -0,0 +1,74 @@
+<?php
+
+/**
+ * @file
+ * Displays a list of forum topics.
+ *
+ * Available variables:
+ * - $header: The table header. This is pre-generated with click-sorting
+ *   information. If you need to change this, see
+ *   template_preprocess_forum_topic_list().
+ * - $pager: The pager to display beneath the table.
+ * - $topics: An array of topics to be displayed. Each $topic in $topics
+ *   contains:
+ *   - $topic->icon: The icon to display.
+ *   - $topic->moved: A flag to indicate whether the topic has been moved to
+ *     another forum.
+ *   - $topic->title: The title of the topic. Safe to output.
+ *   - $topic->message: If the topic has been moved, this contains an
+ *     explanation and a link.
+ *   - $topic->zebra: 'even' or 'odd' string used for row class.
+ *   - $topic->comment_count: The number of replies on this topic.
+ *   - $topic->new_replies: A flag to indicate whether there are unread
+ *     comments.
+ *   - $topic->new_url: If there are unread replies, this is a link to them.
+ *   - $topic->new_text: Text containing the translated, properly pluralized
+ *     count.
+ *   - $topic->created: A string representing when the topic was posted. Safe
+ *     to output.
+ *   - $topic->last_reply: An outputtable string representing when the topic was
+ *     last replied to.
+ *   - $topic->timestamp: The raw timestamp this topic was posted.
+ * - $topic_id: Numeric ID for the current forum topic.
+ *
+ * @see template_preprocess_forum_topic_list()
+ * @see theme_forum_topic_list()
+ *
+ * @ingroup themeable
+ */
+?>
+<table id="forum-topic-<?php print $topic_id; ?>">
+  <thead>
+    <tr><?php print $header; ?></tr>
+  </thead>
+  <tbody>
+  <?php foreach ($topics as $topic): ?>
+    <tr class="<?php print $topic->zebra;?>">
+      <td class="topic">
+        <?php print $topic->icon; ?>
+        <div class="title">
+          <div>
+            <?php print $topic->title; ?>
+          </div>
+          <div>
+            <?php print $topic->created; ?>
+          </div>
+        </div>
+      </td>
+    <?php if ($topic->moved): ?>
+      <td colspan="3"><?php print $topic->message; ?></td>
+    <?php else: ?>
+      <td class="replies">
+        <?php print $topic->comment_count; ?>
+        <?php if ($topic->new_replies): ?>
+          <br />
+          <a href="<?php print $topic->new_url; ?>"><?php print $topic->new_text; ?></a>
+        <?php endif; ?>
+      </td>
+      <td class="last-reply"><?php print $topic->last_reply; ?></td>
+    <?php endif; ?>
+    </tr>
+  <?php endforeach; ?>
+  </tbody>
+</table>
+<?php print $pager; ?>
diff --git a/core/modules/forum/templates/forums.html.twig b/core/modules/forum/templates/forums.html.twig
deleted file mode 100644
index 59fff7d..0000000
--- a/core/modules/forum/templates/forums.html.twig
+++ /dev/null
@@ -1,24 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a forum.
- *
- * May contain forum containers as well as forum topics.
- *
- * Available variables:
- * - forums: The forums to display (as processed by forum-list.html.twig).
- * - topics: The topics to display (as processed by forum-topic-list.html.twig).
- * - forums_defined: A flag to indicate that the forums are configured.
- *
- * @see template_preprocess()
- * @see template_preprocess_forums()
- *
- * @ingroup themeable
- */
-#}
-{% if forums_defined %}
-  <div id="forum">
-    {{ forums }}
-    {{ topics }}
-  </div>
-{% endif %}
diff --git a/core/modules/forum/templates/forums.tpl.php b/core/modules/forum/templates/forums.tpl.php
new file mode 100644
index 0000000..6a0e02e
--- /dev/null
+++ b/core/modules/forum/templates/forums.tpl.php
@@ -0,0 +1,24 @@
+<?php
+
+/**
+ * @file
+ * Displays a forum.
+ *
+ * May contain forum containers as well as forum topics.
+ *
+ * Available variables:
+ * - $forums: The forums to display (as processed by forum-list.tpl.php).
+ * - $topics: The topics to display (as processed by forum-topic-list.tpl.php).
+ * - $forums_defined: A flag to indicate that the forums are configured.
+ *
+ * @see template_preprocess_forums()
+ *
+ * @ingroup themeable
+ */
+?>
+<?php if ($forums_defined): ?>
+<div id="forum">
+  <?php print $forums; ?>
+  <?php print $topics; ?>
+</div>
+<?php endif; ?>
diff --git a/core/modules/help/help.module b/core/modules/help/help.module
index 4c347f9..370cf9c 100644
--- a/core/modules/help/help.module
+++ b/core/modules/help/help.module
@@ -45,7 +45,7 @@ function help_help($path, $arg) {
       $output .= '<li>' . t('<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href="@themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="@download_themes">Drupal themes download section</a>.', array('@themes' => url('admin/appearance'), '@download_themes' => 'http://drupal.org/project/themes')) . '</li>';
       // Display a link to the create content page if Node module is enabled.
       if (module_exists('node')) {
-        $output .= '<li>' . t('<strong>Start posting content</strong> Finally, you can <a href="@content">add new content</a> for your website.', array('@content' => url('node/add'))) . '</li>';
+        $output .= '<li>' . t('<strong>Start posting content</strong> Finally, you can <a href="@content">add content</a> for your website.', array('@content' => url('node/add'))) . '</li>';
       }
       $output .= '</ol>';
       $output .= '<p>' . t('For more information, refer to the specific topics listed in the next section or to the <a href="@handbook">online Drupal handbooks</a>. You may also post at the <a href="@forum">Drupal forum</a> or view the wide range of <a href="@support">other support options</a> available.', array('@help' => url('admin/help'), '@handbook' => 'http://drupal.org/documentation', '@forum' => 'http://drupal.org/forum', '@support' => 'http://drupal.org/support')) . '</p>';
@@ -66,7 +66,7 @@ function help_help($path, $arg) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function help_preprocess_block(&$variables) {
   if ($variables['plugin_id'] == 'system_help_block') {
diff --git a/core/modules/image/image.admin.inc b/core/modules/image/image.admin.inc
index 9ed3aa9..323db4b 100644
--- a/core/modules/image/image.admin.inc
+++ b/core/modules/image/image.admin.inc
@@ -540,7 +540,7 @@ function theme_image_style_list($variables) {
   if (empty($rows)) {
     $rows[] = array(array(
       'colspan' => 4,
-      'data' => t('There are currently no styles. <a href="!url">Add a new one</a>.', array('!url' => url('admin/config/media/image-styles/add'))),
+      'data' => t('There are currently no styles. <a href="!url">Add one</a>.', array('!url' => url('admin/config/media/image-styles/add'))),
     ));
   }
 
diff --git a/core/modules/image/image.module b/core/modules/image/image.module
index a7696a6..ac6910f 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module
@@ -63,7 +63,7 @@ function image_help($path, $arg) {
       $output .= '<li>' . t('Describing its appearance: eg. <em>square-85x85</em>') . '</li></ul>';
       $output .=  t('After you create an image style, you can add effects: crop, scale, resize, rotate, and desaturate (other contributed modules provide additional effects). For example, by combining effects as crop, scale, and desaturate, you can create square, grayscale thumbnails.') . '<dd>';
       $output .= '<dt>' . t('Attaching images to content as fields') . '</dt>';
-      $output .= '<dd>' . t("Image module also allows you to attach images to content as fields. To add an image field to a <a href='@content-type'>content type</a>, go to the content type's <em>manage fields</em> page, and add a new field of type <em>Image</em>. Attaching images to content this way allows image styles to be applied and maintained, and also allows you more flexibility when theming.", array('@content-type' => url('admin/structure/types'))) . '</dd>';
+      $output .= '<dd>' . t("Image module also allows you to attach images to content as fields. To add an image field to a <a href='@content-type'>content type</a>, go to the content type's <em>manage fields</em> page, and add a field of type <em>Image</em>. Attaching images to content this way allows image styles to be applied and maintained, and also allows you more flexibility when theming.", array('@content-type' => url('admin/structure/types'))) . '</dd>';
       $output .= '</dl>';
       return $output;
     case 'admin/config/media/image-styles':
@@ -131,7 +131,7 @@ function image_menu() {
   );
   $items['admin/config/media/image-styles/add'] = array(
     'title' => 'Add style',
-    'description' => 'Add a new image style.',
+    'description' => 'Add a image style.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('image_style_add_form'),
     'access arguments' => array('administer image styles'),
@@ -177,7 +177,7 @@ function image_menu() {
   );
   $items['admin/config/media/image-styles/manage/%image_style/add/%image_effect_definition'] = array(
     'title' => 'Add image effect',
-    'description' => 'Add a new effect to a style.',
+    'description' => t('Add an effect to a style.'),
     'load arguments' => array(5),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('image_effect_form', 5, 7),
diff --git a/core/modules/language/language.module b/core/modules/language/language.module
index 1dd936f..6294f31 100644
--- a/core/modules/language/language.module
+++ b/core/modules/language/language.module
@@ -760,7 +760,7 @@ function language_language_delete($language) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function language_preprocess_block(&$variables) {
   if ($variables['configuration']['module'] == 'language') {
diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php
index 00bfd94..829058d 100644
--- a/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php
+++ b/core/modules/language/lib/Drupal/language/Tests/LanguageListTest.php
@@ -136,7 +136,7 @@ function testLanguageList() {
     $this->assertEqual(variable_get('language_count', 1), count($languages), 'Language count is correct.');
 
     // Ensure we can delete the English language. Right now English is the only
-    // language so we must add a new language and make it the default before
+    // language so we must add a language and make it the default before
     // deleting English.
     $langcode = 'xx';
     $name = $this->randomName(16);
diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php
index 47a61e7..8088f6a 100644
--- a/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php
+++ b/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php
@@ -59,7 +59,7 @@ function testLanguageBlock() {
     $this->assertText($block->label(), 'Language switcher block found.');
 
     // Assert that only the current language is marked as active.
-    list($language_switcher) = $this->xpath('//div[@id=:id]/div[contains(@class, "content")]', array(':id' => 'block-test-language-block'));
+    list($language_switcher) = $this->xpath('//div[@id=:id]/div[@class="content"]', array(':id' => 'block-test-language-block'));
     $links = array(
       'active' => array(),
       'inactive' => array(),
diff --git a/core/modules/layout/layouts/static/one-col/one-col.html.twig b/core/modules/layout/layouts/static/one-col/one-col.html.twig
deleted file mode 100644
index 8f30223..0000000
--- a/core/modules/layout/layouts/static/one-col/one-col.html.twig
+++ /dev/null
@@ -1,21 +0,0 @@
-{#
-/**
- * @file
- * Template for a 1 column layout.
- *
- * This template provides a simple one column display layout.
- *
- * Avaiable variables:
- * - attributes: Attributes to be placed on the wrapping element.
- * - content: All content items, each content item is keyed to one region of the
- *   layout. 'content' contains the following section:
- *   - content: Content in the content column.
- *
- * @ingroup themeable
- */
-#}
-<div class="layout-display layout-one-col {{ attributes.class }}"{{ attributes }}>
-  <div class="layout-region">
-    {{ content.content }}
-  </div>
-</div>
diff --git a/core/modules/layout/layouts/static/one-col/one-col.tpl.php b/core/modules/layout/layouts/static/one-col/one-col.tpl.php
new file mode 100644
index 0000000..61af832
--- /dev/null
+++ b/core/modules/layout/layouts/static/one-col/one-col.tpl.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * @file
+ * Template for a 1 column layout.
+ *
+ * This template provides a simple one column display layout.
+ *
+ * Variables:
+ * - $content: An array of content, each item in the array is keyed to one
+ *   region of the layout. This layout supports only one section:
+ *   - $content['content']: Content in the content column.
+ */
+?>
+<div class="layout-display layout-one-col <?php print $attributes['class']; ?>"<?php print $attributes; ?>>
+  <div class="layout-region">
+    <?php print $content['content']; ?>
+  </div>
+</div>
diff --git a/core/modules/layout/layouts/static/twocol/two-col.html.twig b/core/modules/layout/layouts/static/twocol/two-col.html.twig
deleted file mode 100644
index 2bfade0..0000000
--- a/core/modules/layout/layouts/static/twocol/two-col.html.twig
+++ /dev/null
@@ -1,27 +0,0 @@
-{#
-/**
- * @file
- * Template for a 2 column layout.
- *
- * This template provides a two column display layout, with each column equal in
- * width.
- *
- * Available variables:
- * - attributes: Attributes to be placed on the wrapping element.
- * - content: All content items, each content item is keyed to one region of the
- *   layout. 'content' contains the following sections:
- *   - first: Content in the first column.
- *   - second: Content in the second column.
- *
- * @ingroup themeable
- */
-#}
-<div class="layout-display layout-two-col clearfix {{ attributes.class }}"{{ attributes }}>
-  <div class="layout-region layout-col-first">
-    {{ content.first }}
-  </div>
-
-  <div class="layout-region layout-col-second">
-    {{ content.second }}
-  </div>
-</div>
diff --git a/core/modules/layout/layouts/static/twocol/two-col.tpl.php b/core/modules/layout/layouts/static/twocol/two-col.tpl.php
new file mode 100644
index 0000000..810a052
--- /dev/null
+++ b/core/modules/layout/layouts/static/twocol/two-col.tpl.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * @file
+ * Template for a 2 column layout.
+ *
+ * This template provides a two column display layout, with each column equal in
+ * width.
+ *
+ * Variables:
+ * - $content: An array of content, each item in the array is keyed to one
+ *   region of the layout. This layout supports the following sections:
+ *   - $content['first']: Content in the first column.
+ *   - $content['second']: Content in the second column.
+ */
+?>
+<div class="layout-display layout-two-col clearfix <?php print $attributes['class']; ?>"<?php print $attributes; ?>>
+  <div class="layout-region layout-col-first">
+    <?php print $content['first']; ?>
+  </div>
+
+  <div class="layout-region layout-col-second">
+    <?php print $content['second']; ?>
+  </div>
+</div>
diff --git a/core/modules/layout/tests/layouts/static/one-col/one-col.html.twig b/core/modules/layout/tests/layouts/static/one-col/one-col.html.twig
deleted file mode 100644
index c4f263d..0000000
--- a/core/modules/layout/tests/layouts/static/one-col/one-col.html.twig
+++ /dev/null
@@ -1,20 +0,0 @@
-{#
-/**
- * @file
- * Template for a one column layout.
- *
- * This template provides a very simple "one column" display layout.
- *
- * Avaiable variables:
- * - content: All content items, each content item is keyed to one region of the
- *   layout. 'content' contains the following section:
- *   - middle: The only region in the layout.
- *
- * @ingroup themeable
- */
-#}
-<div class="layout-display layout-one-col clearfix">
-  <div class="layout-region layout-col">
-    <div class="inside">{{ content.middle }}</div>
-  </div>
-</div>
diff --git a/core/modules/layout/tests/layouts/static/one-col/one-col.tpl.php b/core/modules/layout/tests/layouts/static/one-col/one-col.tpl.php
new file mode 100644
index 0000000..e47f83e
--- /dev/null
+++ b/core/modules/layout/tests/layouts/static/one-col/one-col.tpl.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * @file
+ * Template for a one column layout.
+ *
+ * This template provides a very simple "one column" display layout.
+ *
+ * Variables:
+ * - $content: An array of content, each item in the array is keyed to one
+ *   region of the layout. This layout supports the following sections:
+ *   $content['middle']: The only region in the layout.
+ */
+?>
+<div class="layout-display layout-one-col clearfix">
+  <div class="layout-region layout-col">
+    <div class="inside"><?php print $content['middle']; ?></div>
+  </div>
+</div>
diff --git a/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.html.twig b/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.html.twig
deleted file mode 100644
index 7c58a55..0000000
--- a/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.html.twig
+++ /dev/null
@@ -1,26 +0,0 @@
-{#
-/**
- * @file
- * Template for a 2 column layout.
- *
- * This template provides a two column display layout, with each column equal in
- * width.
- *
- * Available variables:
- * - content: All content items, each content item is keyed to one region of the
- *   layout. 'content' contains the following sections:
- *   - left: Content in the left column.
- *   - right: Content in the right column.
- *
- * @ingroup themeable
- */
-#}
-<div class="layout-display layout-two-col clearfix">
-  <div class="layout-region layout-col-left">
-    <div class="inside">{{ content.left }}</div>
-  </div>
-
-  <div class="layout-region layout-col-right">
-    <div class="inside">{{ content.right }}</div>
-  </div>
-</div>
diff --git a/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.tpl.php b/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.tpl.php
new file mode 100644
index 0000000..1d8dbe4
--- /dev/null
+++ b/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.tpl.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * @file
+ * Template for a 2 column layout.
+ *
+ * This template provides a two column display layout, with each column equal in
+ * width.
+ *
+ * Variables:
+ * - $content: An array of content, each item in the array is keyed to one
+ *   region of the layout. This layout supports the following sections:
+ *   - $content['left']: Content in the left column.
+ *   - $content['right']: Content in the right column.
+ */
+?>
+<div class="layout-display layout-two-col clearfix">
+  <div class="layout-region layout-col-left">
+    <div class="inside"><?php print $content['left']; ?></div>
+  </div>
+
+  <div class="layout-region layout-col-right">
+    <div class="inside"><?php print $content['right']; ?></div>
+  </div>
+</div>
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php
index d69d083..3e21ded 100644
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php
+++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleContentTest.php
@@ -166,7 +166,7 @@ function testContentTypeDirLang() {
     $this->assertRaw(t('The content type %type has been updated.', array('%type' => $type->name)));
     $this->drupalLogout();
 
-    // Login as web user to add new node.
+    // Login as web user to add node.
     $this->drupalLogin($web_user);
 
     // Create three nodes: English, Arabic and Spanish.
diff --git a/core/modules/locale/locale.admin.js b/core/modules/locale/locale.admin.js
index a0fda5a..2063246 100644
--- a/core/modules/locale/locale.admin.js
+++ b/core/modules/locale/locale.admin.js
@@ -46,6 +46,7 @@ Drupal.behaviors.localeTranslateDirty = {
 Drupal.behaviors.hideUpdateInformation = {
   attach: function (context, settings) {
     var $table = $('#locale-translation-status-form').once('expand-updates');
+    var effect = settings.hideUpdates;
     if ($table.length) {
       var $tbodies = $table.find('tbody');
 
diff --git a/core/modules/locale/locale.bulk.js b/core/modules/locale/locale.bulk.js
index 9d3e5a6..02cee5e 100644
--- a/core/modules/locale/locale.bulk.js
+++ b/core/modules/locale/locale.bulk.js
@@ -12,7 +12,7 @@ Drupal.behaviors.importLanguageCodeSelector = {
     var $form = $('#locale-translate-import-form').once('autodetect-lang');
     if ($form.length) {
       var $langcode = $form.find('.langcode-input');
-      $form.find('.file-import-input')
+      var $file = $form.find('.file-import-input')
         .on('change', function () {
           var matches = $(this).val().match(/\.([\-\w]+)\.po/);
           if (matches && $langcode.find('option[value="' + matches[1] + '"]').length) {
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 31fd0fc..75e0a22 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -870,7 +870,7 @@ function locale_system_file_system_settings_submit(&$form, $form_state) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for node.html.twig.
+ * Implements hook_preprocess_HOOK() for node.tpl.php.
  */
 function locale_preprocess_node(&$variables) {
   if ($variables['node']->langcode != LANGUAGE_NOT_SPECIFIED) {
diff --git a/core/modules/menu/menu.admin.js b/core/modules/menu/menu.admin.js
index 6f33ccf..c6df824 100644
--- a/core/modules/menu/menu.admin.js
+++ b/core/modules/menu/menu.admin.js
@@ -32,7 +32,7 @@ Drupal.menuUpdateParentList = function () {
       var selected = $select.val();
       // Remove all exisiting options from dropdown.
       $select.children().remove();
-      // Add new options to dropdown. Keep a count of options for testing later.
+      // Add options to dropdown. Keep a count of options for testing later.
       var totalOptions = 0;
       for (var machineName in options) {
         if (options.hasOwnProperty(machineName)) {
diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module
index 1b43a4e..9bc29e1 100644
--- a/core/modules/menu/menu.module
+++ b/core/modules/menu/menu.module
@@ -66,7 +66,7 @@ function menu_permission() {
 function menu_menu() {
   $items['admin/structure/menu'] = array(
     'title' => 'Menus',
-    'description' => 'Add new menus to your site, edit existing menus, and rename and reorganize menu links.',
+    'description' => 'Add menus to your site, edit existing menus, and rename and reorganize menu links.',
     'page callback' => 'menu_overview_page',
     'access callback' => 'user_access',
     'access arguments' => array('administer menu'),
@@ -713,7 +713,7 @@ function menu_get_menus($all = TRUE) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function menu_preprocess_block(&$variables) {
   if ($variables['configuration']['module'] == 'menu') {
diff --git a/core/modules/node/content_types.inc b/core/modules/node/content_types.inc
index f8b144a..f445ed7 100644
--- a/core/modules/node/content_types.inc
+++ b/core/modules/node/content_types.inc
@@ -122,7 +122,7 @@ function node_type_form($form, &$form_state, $type = NULL) {
     '#title' => t('Name'),
     '#type' => 'textfield',
     '#default_value' => $type->name,
-    '#description' => t('The human-readable name of this content type. This text will be displayed as part of the list on the <em>Add new content</em> page. It is recommended that this name begin with a capital letter and contain only letters, numbers, and spaces. This name must be unique.'),
+    '#description' => t('The human-readable name of this content type. This text will be displayed as part of the list on the <em>Add content</em> page. It is recommended that this name begin with a capital letter and contain only letters, numbers, and spaces. This name must be unique.'),
     '#required' => TRUE,
     '#size' => 30,
   );
@@ -137,7 +137,7 @@ function node_type_form($form, &$form_state, $type = NULL) {
       'source' => array('name'),
     ),
     '#description' => t('A unique machine-readable name for this content type. It must only contain lowercase letters, numbers, and underscores. This name will be used for constructing the URL of the %node-add page, in which underscores will be converted into hyphens.', array(
-      '%node-add' => t('Add new content'),
+      '%node-add' => t('Add content'),
     )),
   );
 
@@ -145,7 +145,7 @@ function node_type_form($form, &$form_state, $type = NULL) {
     '#title' => t('Description'),
     '#type' => 'textarea',
     '#default_value' => $type->description,
-    '#description' => t('Describe this content type. The text will be displayed on the <em>Add new content</em> page.'),
+    '#description' => t('Describe this content type. The text will be displayed on the <em>Add content</em> page.'),
   );
 
   $form['additional_settings'] = array(
diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php
index b6cd024..78a3139 100644
--- a/core/modules/node/node.api.php
+++ b/core/modules/node/node.api.php
@@ -898,8 +898,8 @@ function hook_node_view(\Drupal\Core\Entity\EntityInterface $node, \Drupal\entit
  * If the module wishes to act on the rendered HTML of the node rather than the
  * structured content array, it may use this hook to add a #post_render
  * callback.  Alternatively, it could also implement hook_preprocess_HOOK() for
- * node.html.twig. See drupal_render() and theme() documentation respectively
- * for details.
+ * node.tpl.php. See drupal_render() and theme() documentation respectively for
+ * details.
  *
  * @param $build
  *   A renderable array representing the node content.
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 1e1084e..5c934df 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -174,6 +174,7 @@ function node_theme() {
     ),
     'node_edit_form' => array(
       'render element' => 'form',
+      'path' => drupal_get_path('module', 'node') . '/templates',
       'template' => 'node-edit-form',
     ),
   );
@@ -1074,7 +1075,7 @@ function node_is_page(EntityInterface $node) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function node_preprocess_block(&$variables) {
   if ($variables['configuration']['module'] == 'node') {
@@ -1090,19 +1091,19 @@ function node_preprocess_block(&$variables) {
 }
 
 /**
- * Prepares variables for node templates.
+ * Processes variables for node.tpl.php.
  *
- * Default template: node.html.twig.
+ * Most themes utilize their own copy of node.tpl.php. The default is located
+ * inside "modules/node/node.tpl.php". Look in there for the full list of
+ * variables.
  *
- * Most themes utilize their own copy of node.html.twig. The default is located
- * inside "/core/modules/node/templates/node.html.twig". Look in there for the full
- * list of variables.
- *
- * @param array $variables
+ * @param $variables
  *   An associative array containing:
  *   - elements: An array of elements to display in view mode.
  *   - node: The node object.
  *   - view_mode: View mode; e.g., 'full', 'teaser'...
+ *
+ * @see node.tpl.php
  */
 function template_preprocess_node(&$variables) {
   $variables['view_mode'] = $variables['elements']['#view_mode'];
@@ -1111,18 +1112,25 @@ function template_preprocess_node(&$variables) {
   $variables['node'] = $variables['elements']['#node'];
   $node = $variables['node'];
 
-  $variables['date'] = format_date($node->created);
-  // @todo Change 'name' to 'author' and also convert to a render array pending
-  //   http://drupal.org/node/1941286.
-  $variables['name'] = theme('username', array(
+  $variables['date']      = format_date($node->created);
+  $variables['name']      = theme('username', array(
     'account' => $node,
     'link_attributes' => array('rel' => 'author'),
   ));
 
   $uri = $node->uri();
   $variables['node_url']  = url($uri['path'], $uri['options']);
-  $variables['label'] = check_plain($node->label());
-  $variables['page'] = $variables['view_mode'] == 'full' && node_is_page($node);
+  $variables['label']     = check_plain($node->label());
+  $variables['page']      = $variables['view_mode'] == 'full' && node_is_page($node);
+
+  // Make useful flags and node data available.
+  // @todo: The comment properties only exist if comment.module is enabled, but
+  //   are documented in node.tpl.php, so we make sure that they are set.
+  //   Consider removing them.
+  $properties = array('type', 'comment_count', 'uid', 'created', 'promote', 'sticky', 'status', 'comment');
+  foreach ($properties as $property) {
+    $variables[$property] = isset($node->$property) ? $node->$property : NULL;
+  }
 
   // Helpful $content variable for templates.
   $variables += array('content' => array());
@@ -1178,8 +1186,6 @@ function template_preprocess_node(&$variables) {
   // Clean up name so there are no underscores.
   $variables['theme_hook_suggestions'][] = 'node__' . $node->type;
   $variables['theme_hook_suggestions'][] = 'node__' . $node->nid;
-
-  $variables['content_attributes']['class'][] = 'content';
 }
 
 /**
diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc
index 863babd..d328639 100644
--- a/core/modules/node/node.pages.inc
+++ b/core/modules/node/node.pages.inc
@@ -79,7 +79,7 @@ function theme_node_add_list($variables) {
     $output .= '</dl>';
   }
   else {
-    $output = '<p>' . t('You have not created any content types yet. Go to the <a href="@create-content">content type creation page</a> to add a new content type.', array('@create-content' => url('admin/structure/types/add'))) . '</p>';
+    $output = '<p>' . t('You have not created any content types yet. Go to the <a href="@create-content">content type creation page</a> to add a content type.', array('@create-content' => url('admin/structure/types/add'))) . '</p>';
   }
   return $output;
 }
diff --git a/core/modules/node/templates/node-edit-form.html.twig b/core/modules/node/templates/node-edit-form.html.twig
deleted file mode 100644
index eee9ecc..0000000
--- a/core/modules/node/templates/node-edit-form.html.twig
+++ /dev/null
@@ -1,30 +0,0 @@
-{#
-/**
- * @file
- * Two column template for the node add/edit form.
- *
- * This template will be used when a node edit form specifies 'node_edit_form'
- * as its #theme callback.  Otherwise, by default, node add/edit forms will be
- * themed by theme_form().
- *
- * Available variables:
- * - form: The node add/edit form.
- *
- * @see seven_form_node_form_alter()
- *
- * @ingroup themeable
- */
-#}
-{% hide(form.advanced) %}
-{% hide(form.actions) %}
-<div class="layout-node-form clearfix">
-  <div class="layout-region layout-region-node-main">
-    {{ form }}
-  </div>
-  <div class="layout-region layout-region-node-secondary">
-    {{ form.advanced }}
-  </div>
-  <div class="layout-region layout-region-node-footer">
-    {{ form.actions }}
-  </div>
-</div>
diff --git a/core/modules/node/templates/node-edit-form.tpl.php b/core/modules/node/templates/node-edit-form.tpl.php
new file mode 100644
index 0000000..7b76683
--- /dev/null
+++ b/core/modules/node/templates/node-edit-form.tpl.php
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * @file
+ * Two column template for the node add/edit form.
+ *
+ * Available variables:
+ * - $form: The actual form to print.
+ */
+
+hide($form['advanced']);
+hide($form['actions']);
+
+?>
+<div class="layout-node-form clearfix">
+  <div class="layout-region layout-region-node-main">
+    <?php print drupal_render_children($form); ?>
+  </div>
+
+  <div class="layout-region layout-region-node-secondary">
+    <?php print render($form['advanced']); ?>
+  </div>
+
+  <div class="layout-region layout-region-node-footer">
+    <?php print render($form['actions']); ?>
+  </div>
+</div>
diff --git a/core/modules/node/templates/node.html.twig b/core/modules/node/templates/node.html.twig
index d28b880..0b3a322 100644
--- a/core/modules/node/templates/node.html.twig
+++ b/core/modules/node/templates/node.html.twig
@@ -4,25 +4,8 @@
  * Default theme implementation to display a node.
  *
  * Available variables:
- * - node: Full node entity.
- *   - type: The type of the node, for example, "page" or "article".
- *   - uid: The user ID of the node author.
- *   - created: Formatted creation date. Preprocess functions can reformat it by
- *     calling format_date() with the desired parameters on
- *     $variables['node']->created.
- *   - promote: Whether the node is promoted to the front page.
- *   - sticky: Whether the node is 'sticky'. Sticky nodes are ordered above
- *     other non-sticky nodes in teaser listings
- *   - status: Whether the node is published.
- *   - comment: A value representing the comment status of the current node. May
- *     be one of the following:
- *     - 0: The comment form and any existing comments are hidden.
- *     - 1: Comments are closed. No new comments may be posted, but existing
- *       comments are displayed.
- *     - 2: Comments are open on this node.
- *   - comment_count: Number of comments attached to the node.
- * - label: The title of the node.
- * - content: All node items. Use {{ content }} to print them all,
+ * - label: the title of the node.
+ * - content: node items. Use {{ content }} to print them all,
  *   or print a subset such as {{ content.field_example }}. Use
  *   {% hide(content.field_example) %} to temporarily suppress the printing
  *   of a given element.
@@ -35,28 +18,40 @@
  * - display_submitted: Whether submission information should be displayed.
  * - submitted: Submission information created from name and date during
  *   template_preprocess_node().
- * - attributes: HTML attributes for the containing element.
- *   The attributes.class element may contain one or more of the following
- *   classes:
- *   - node: The current template type (also known as a "theming hook").
+ * - attributes: HTML attributes for the surrounding element.
+ *    Attributes include the 'class' information, which contains:
+ *   - node: The current template type; for example, "theming hook".
  *   - node-[type]: The current node type. For example, if the node is a
  *     "Article" it would result in "node-article". Note that the machine
  *     name will often be in a short form of the human readable label.
- *   - view-mode-[view_mode]: The View Mode of the node; for example, a teaser
- *     would result in: "view-mode-teaser", and full: "view-mode-full".
- *   - preview: Whether a node is in preview mode.
+ *   - view-mode-[view_mode]: The View Mode of the node; for example, "teaser"
+ *     or "full".
+ *   - preview: Nodes in preview mode.
  *   The following are controlled through the node publishing options.
- *   - promoted: Appears on nodes promoted to the front page.
- *   - sticky: Appears on nodes ordered above other non-sticky nodes in teaser
+ *   - promoted: Nodes promoted to the front page.
+ *   - sticky: Nodes ordered above other non-sticky nodes in teaser
  *     listings.
- *   - unpublished: Appears on unpublished nodes visible only to site admins.
+ *   - unpublished: Unpublished nodes visible only to administrators.
  * - title_prefix: Additional output populated by modules, intended to be
  *   displayed in front of the main title tag that appears in the template.
  * - title_suffix: Additional output populated by modules, intended to be
  *   displayed after the main title tag that appears in the template.
+ *
+ * Other variables:
+ * - node: Fully loaded node entity.
+ * - type: Node type; for example, page, article, etc.
+ * - comment_count: Number of comments attached to the node.
+ * - uid: User ID of the node author.
+ * - created: Time the node was published formatted as a Unix timestamp.
+ *
+ * Node status variables:
  * - view_mode: View mode; for example, "teaser" or "full".
  * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'.
  * - page: Flag for the full page state. Will be true if view_mode is 'full'.
+ * - promote: Flag for front page promotion state.
+ * - sticky: Flag for sticky post setting.
+ * - status: Flag for published status.
+ * - comment: State of comment settings for the node.
  * - readmore: Flag for more state. Will be true if the teaser content of the
  *   node cannot hold the main body content.
  * - is_front: Flag for front. Will be true when presented on the front page.
@@ -65,20 +60,16 @@
  * - is_admin: Flag for admin user status. Will be true when the current user
  *   is an administrator.
  *
- * In field variables, each field instance attached to the node a corresponding
- * variable is defined; for example, 'node.body' becomes 'body'. When needing to
+ * Field variables: for each field instance attached to the node a corresponding
+ * variable is defined; for example, $node->body becomes body. When needing to
  * access a field's raw values, developers/themers are strongly encouraged to
  * use these variables. Otherwise they will have to explicitly specify the
- * desired field language; for example, 'node.body.en', thus overriding any
- * language negotiation rule that may have been applied previously.
+ * desired field language; for example, $node->body['en'], thus overriding any
+ * language negotiation rule that was previously applied.
  *
  * @see template_preprocess()
  * @see template_preprocess_node()
  *
- * @todo Remove the id attribute (or make it a class), because if that gets
- *   rendered twice on a page this is invalid CSS for example: two lists
- *   in different view modes.
- *
  * @ingroup themeable
  */
 #}
@@ -99,7 +90,7 @@
     </footer>
   {% endif %}
 
-  <div{{ content_attributes }}>
+  <div class="content"{{ content_attributes }}>
     {# We hide the comments and links now so that we can render them later. #}
     {% hide(content.comments) %}
     {% hide(content.links) %}
diff --git a/core/modules/node/templates/node.tpl.php b/core/modules/node/templates/node.tpl.php
new file mode 100644
index 0000000..35cd730
--- /dev/null
+++ b/core/modules/node/templates/node.tpl.php
@@ -0,0 +1,103 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to display a node.
+ *
+ * Available variables:
+ * - $label: the (sanitized) title of the node.
+ * - $content: An array of node items. Use render($content) to print them all,
+ *   or print a subset such as render($content['field_example']). Use
+ *   hide($content['field_example']) to temporarily suppress the printing of a
+ *   given element.
+ * - $user_picture: The node author's picture. Use render() to print it.
+ * - $date: Formatted creation date. Preprocess functions can reformat it by
+ *   calling format_date() with the desired parameters on the $created variable.
+ * - $name: Themed username of node author output from theme_username().
+ * - $node_url: Direct URL of the current node.
+ * - $display_submitted: Whether submission information should be displayed.
+ * - $submitted: Submission information created from $name and $date during
+ *   template_preprocess_node().
+ * - $attributes: An instance of Attributes class that can be manipulated as an
+ *    array and printed as a string.
+ *    It includes the 'class' information, which includes:
+ *   - node: The current template type; for example, "theming hook".
+ *   - node-[type]: The current node type. For example, if the node is a
+ *     "Article" it would result in "node-article". Note that the machine
+ *     name will often be in a short form of the human readable label.
+ *   - view-mode-[view_mode]: The View Mode of the node; for example, "teaser"
+ *     or "full".
+ *   - preview: Nodes in preview mode.
+ *   The following are controlled through the node publishing options.
+ *   - promoted: Nodes promoted to the front page.
+ *   - sticky: Nodes ordered above other non-sticky nodes in teaser
+ *     listings.
+ *   - unpublished: Unpublished nodes visible only to administrators.
+ * - $title_prefix (array): An array containing additional output populated by
+ *   modules, intended to be displayed in front of the main title tag that
+ *   appears in the template.
+ * - $title_suffix (array): An array containing additional output populated by
+ *   modules, intended to be displayed after the main title tag that appears in
+ *   the template.
+ *
+ * Other variables:
+ * - $node: Full node entity. Contains data that may not be safe.
+ * - $type: Node type; for example, page, article, etc.
+ * - $comment_count: Number of comments attached to the node.
+ * - $uid: User ID of the node author.
+ * - $created: Time the node was published formatted in Unix timestamp.
+ *
+ * Node status variables:
+ * - $view_mode: View mode; for example, "teaser" or "full".
+ * - $teaser: Flag for the teaser state (shortcut for $view_mode == 'teaser').
+ * - $page: Flag for the full page state.
+ * - $promote: Flag for front page promotion state.
+ * - $sticky: Flags for sticky post setting.
+ * - $status: Flag for published status.
+ * - $comment: State of comment settings for the node.
+ * - $is_front: Flags true when presented in the front page.
+ * - $logged_in: Flags true when the current user is a logged-in member.
+ * - $is_admin: Flags true when the current user is an administrator.
+ *
+ * Field variables: for each field instance attached to the node a corresponding
+ * variable is defined; for example, $node->body becomes $body. When needing to
+ * access a field's raw values, developers/themers are strongly encouraged to
+ * use these variables. Otherwise they will have to explicitly specify the
+ * desired field language; for example, $node->body['en'], thus overriding any
+ * language negotiation rule that was previously applied.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_node()
+ * @see template_process()
+ *
+ * @ingroup themeable
+ */
+?>
+<article id="node-<?php print $node->nid; ?>" class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?>>
+
+  <?php print render($title_prefix); ?>
+  <?php if (!$page): ?>
+    <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>" rel="bookmark"><?php print $label; ?></a></h2>
+  <?php endif; ?>
+  <?php print render($title_suffix); ?>
+
+  <?php if ($display_submitted): ?>
+    <footer>
+      <?php print render($user_picture); ?>
+      <p class="submitted"><?php print $submitted; ?></p>
+    </footer>
+  <?php endif; ?>
+
+  <div class="content"<?php print $content_attributes; ?>>
+    <?php
+      // We hide the comments and links now so that we can render them later.
+      hide($content['comments']);
+      hide($content['links']);
+      print render($content);
+    ?>
+  </div>
+
+  <?php print render($content['links']); ?>
+  <?php print render($content['comments']); ?>
+
+</article>
diff --git a/core/modules/overlay/overlay-child.js b/core/modules/overlay/overlay-child.js
index be43628..be6df9b 100644
--- a/core/modules/overlay/overlay-child.js
+++ b/core/modules/overlay/overlay-child.js
@@ -142,7 +142,7 @@ Drupal.overlayChild.behaviors.loading = function (context, settings) {
 
   $(document).bind('drupalOverlayBeforeLoad.drupal-overlay.drupal-overlay-child-loading', function () {
     $title = $('#overlay-title').text(text);
-    setInterval(function () {
+    var id = setInterval(function () {
       dots = (dots.length > 10) ? '' : dots + '.';
       $title.text(text + dots);
     }, 500);
diff --git a/core/modules/overlay/overlay-parent.js b/core/modules/overlay/overlay-parent.js
index a8a32d6..3356580 100644
--- a/core/modules/overlay/overlay-parent.js
+++ b/core/modules/overlay/overlay-parent.js
@@ -470,6 +470,7 @@ Drupal.overlay.eventhandlerAlterDisplacedElements = function (event) {
   });
   // Trigger a repaint.
   iframeBody.style.display = 'none';
+  var _tmp = iframeBody.offsetHeight;
   iframeBody.style.display = 'block';
 
   // Constrain the width of offsetting top and bottom elements, such as the
@@ -766,7 +767,7 @@ function refreshRegion(regionName, regionSelector) {
  *   corresponding to this region.
  */
 Drupal.overlay.refreshRegions = function (data) {
-  var region, region_info, regionClass;
+  var region, region_info, regionClass, regionName, regionSelector;
   for (region in data) {
     if (data.hasOwnProperty(region)) {
       region_info = data[region];
diff --git a/core/modules/overlay/overlay.module b/core/modules/overlay/overlay.module
index d400a32..1566740 100644
--- a/core/modules/overlay/overlay.module
+++ b/core/modules/overlay/overlay.module
@@ -497,7 +497,7 @@ function overlay_preprocess_html(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for maintenance-page.html.twig.
+ * Implements hook_preprocess_HOOK() for maintenance-page.tpl.php.
  *
  * If the current page request is inside the overlay, add appropriate classes
  * to the <body> element, and simplify the page title.
@@ -520,13 +520,9 @@ function template_preprocess_overlay(&$variables) {
   $variables['title'] = drupal_get_title();
   $variables['disable_overlay'] = overlay_disable_message();
 
-  // Add attributes for the overlay container.
-  $variables['attributes']['id'] = 'overlay';
+  // Add atrributes for the overlay container.
   $variables['attributes']['class'][] = 'overlay';
-  // Add attributes for the overlay title.
-  $variables['title_attributes']['id'] = 'overlay-title';
   // Add attributes for the overlay content.
-  $variables['content_attributes']['id'] = 'overlay-content';
   $variables['content_attributes']['class'][] = 'clearfix';
 }
 
diff --git a/core/modules/overlay/templates/overlay.html.twig b/core/modules/overlay/templates/overlay.html.twig
deleted file mode 100644
index f54633e..0000000
--- a/core/modules/overlay/templates/overlay.html.twig
+++ /dev/null
@@ -1,38 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a page in the overlay.
- *
- * Available variables:
- * - attributes: HTML attributes for the containing element.
- * - content_attributes: HTML attributes for the content.
- * - title_attributes: HTML attributes for the title.
- * - title: The (sanitized) title of the page.
- * - page: The rendered page content.
- * - tabs: Tabs linking to any sub-pages beneath the current page (e.g., the
- *   view and edit tabs when displaying a node).
- * - disable_overlay: The message about how to disable the overlay.
- *
- * @see template_preprocess()
- * @see template_preprocess_overlay()
- *
- * @ingroup themeable
- */
-#}
-{{ disable_overlay }}
-<div{{ attributes }}>
-  <div id="overlay-titlebar" class="clearfix">
-    <div id="overlay-title-wrapper" class="clearfix">
-      <h1{{ title_attributes }}>{{ title }}</h1>
-    </div>
-    <div id="overlay-close-wrapper">
-      <a id="overlay-close" href="#" class="overlay-close" role="button" aria-controls="overlay-content"><span class="element-invisible">{{ 'Close overlay'|t }}</span></a>
-    </div>
-    {% if tabs %}
-      <h2 class="element-invisible">{{ 'Primary tabs'|t }}</h2><ul id="overlay-tabs">{{ tabs }}</ul>
-    {% endif %}
-  </div>
-  <div{{ content_attributes }}>
-    {{ page }}
-  </div>
-</div>
diff --git a/core/modules/overlay/templates/overlay.tpl.php b/core/modules/overlay/templates/overlay.tpl.php
new file mode 100644
index 0000000..2b342ba
--- /dev/null
+++ b/core/modules/overlay/templates/overlay.tpl.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to display a page in the overlay.
+ *
+ * Available variables:
+ * - $title: the (sanitized) title of the page.
+ * - $page: The rendered page content.
+ * - $tabs (array): Tabs linking to any sub-pages beneath the current page
+ *   (e.g., the view and edit tabs when displaying a node).
+ * Helper variables:
+ * - $classes_array: Array of HMTL class attribute values. It is flattened into
+ *   a string within the variable $classes.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_overlay()
+ * @see template_process()
+ *
+ * @ingroup themeable
+ */
+?>
+
+<?php print render($disable_overlay); ?>
+<div id="overlay" <?php print $attributes; ?>>
+  <div id="overlay-titlebar" class="clearfix">
+    <div id="overlay-title-wrapper" class="clearfix">
+      <h1 id="overlay-title"<?php print $title_attributes; ?>><?php print $title; ?></h1>
+    </div>
+    <div id="overlay-close-wrapper">
+      <a id="overlay-close" href="#" class="overlay-close" role="button" aria-controls="overlay-content"><span class="element-invisible"><?php print t('Close overlay'); ?></span></a>
+    </div>
+    <?php if ($tabs): ?><h2 class="element-invisible"><?php print t('Primary tabs'); ?></h2><ul id="overlay-tabs"><?php print render($tabs); ?></ul><?php endif; ?>
+  </div>
+  <div id="overlay-content"<?php print $content_attributes; ?>>
+    <?php print $page; ?>
+  </div>
+</div>
diff --git a/core/modules/php/config/filter.format.php_code.yml b/core/modules/php/config/filter.format.php_code.yml
index eb8b7a2..cee6e9b 100644
--- a/core/modules/php/config/filter.format.php_code.yml
+++ b/core/modules/php/config/filter.format.php_code.yml
@@ -7,6 +7,4 @@ filters:
   php_code:
     module: php
     status: '1'
-    weight: '0'
-    settings: {  }
 langcode: und
diff --git a/core/modules/php/lib/Drupal/php/Plugin/Filter/Php.php b/core/modules/php/lib/Drupal/php/Plugin/Filter/Php.php
deleted file mode 100644
index dd58116..0000000
--- a/core/modules/php/lib/Drupal/php/Plugin/Filter/Php.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\php\Plugin\Filter\Php.
- */
-
-namespace Drupal\php\Plugin\Filter;
-
-use Drupal\filter\Annotation\Filter;
-use Drupal\Core\Annotation\Translation;
-use Drupal\filter\Plugin\FilterBase;
-
-/**
- * Provides PHP code filter. Use with care.
- *
- * @Filter(
- *   id = "php_code",
- *   module = "php",
- *   title = @Translation("PHP evaluator"),
- *   description = @Translation("Executes a piece of PHP code. The usage of this filter should be restricted to administrators only!"),
- *   type = FILTER_TYPE_MARKUP_LANGUAGE,
- *   cache = FALSE
- * )
- */
-class Php extends FilterBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function process($text, $langcode, $cache, $cache_id) {
-    return php_eval($text);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function tips($long = FALSE) {
-    global $base_url;
-    if ($long) {
-      $output = '<h4>' . t('Using custom PHP code') . '</h4>';
-      $output .= '<p>' . t('Custom PHP code may be embedded in some types of site content, including posts and blocks. While embedding PHP code inside a post or block is a powerful and flexible feature when used by a trusted user with PHP experience, it is a significant and dangerous security risk when used improperly. Even a small mistake when posting PHP code may accidentally compromise your site.') . '</p>';
-      $output .= '<p>' . t('If you are unfamiliar with PHP, SQL, or Drupal, avoid using custom PHP code within posts. Experimenting with PHP may corrupt your database, render your site inoperable, or significantly compromise security.') . '</p>';
-      $output .= '<p>' . t('Notes:') . '</p>';
-      $output .= '<ul><li>' . t('Remember to double-check each line for syntax and logic errors <strong>before</strong> saving.') . '</li>';
-      $output .= '<li>' . t('Statements must be correctly terminated with semicolons.') . '</li>';
-      $output .= '<li>' . t('Global variables used within your PHP code retain their values after your script executes.') . '</li>';
-      $output .= '<li>' . t('<code>register_globals</code> is <strong>turned off</strong>. If you need to use forms, understand and use the functions in <a href="@formapi">the Drupal Form API</a>.', array('@formapi' => url('http://api.drupal.org/api/group/form_api/8'))) . '</li>';
-      $output .= '<li>' . t('Use a <code>print</code> or <code>return</code> statement in your code to output content.') . '</li>';
-      $output .= '<li>' . t('Develop and test your PHP code using a separate test script and sample database before deploying on a production site.') . '</li>';
-      $output .= '<li>' . t('Consider including your custom PHP code within a site-specific module or theme rather than embedding it directly into a post or block.') . '</li>';
-      $output .= '<li>' . t('Be aware that the ability to embed PHP code within content is provided by the PHP Filter module. If this module is disabled or deleted, then blocks and posts with embedded PHP may display, rather than execute, the PHP code.') . '</li></ul>';
-      $output .= '<p>' . t('A basic example: <em>Creating a "Welcome" block that greets visitors with a simple message.</em>') . '</p>';
-      $output .= '<ul><li>' . t('<p>Add a custom block to your site, named "Welcome" . With its text format set to "PHP code" (or another format supporting PHP input), add the following in the Block body:</p>
-  <pre>
-  print t(\'Welcome visitor! Thank you for visiting.\');
-  </pre>') . '</li>';
-      $output .= '<li>' . t('<p>To display the name of a registered user, use this instead:</p>
-  <pre>
-  global $user;
-  if ($user->uid) {
-    print t(\'Welcome @name! Thank you for visiting.\', array(\'@name\' => user_format_name($user)));
-  }
-  else {
-    print t(\'Welcome visitor! Thank you for visiting.\');
-  }
-  </pre>') . '</li></ul>';
-      $output .= '<p>' . t('<a href="@drupal">Drupal.org</a> offers <a href="@php-snippets">some example PHP snippets</a>, or you can create your own with some PHP experience and knowledge of the Drupal system.', array('@drupal' => url('http://drupal.org'), '@php-snippets' => url('http://drupal.org/documentation/customization/php-snippets'))) . '</p>';
-      return $output;
-    }
-    else {
-      return t('You may post PHP code. You should include &lt;?php ?&gt; tags.');
-    }
-  }
-
-}
diff --git a/core/modules/php/lib/Drupal/php/Tests/PhpTestBase.php b/core/modules/php/lib/Drupal/php/Tests/PhpTestBase.php
index c18273a..abb3412 100644
--- a/core/modules/php/lib/Drupal/php/Tests/PhpTestBase.php
+++ b/core/modules/php/lib/Drupal/php/Tests/PhpTestBase.php
@@ -40,7 +40,7 @@ function setUp() {
 
     // Verify that the format has the PHP code filter enabled.
     $filters = filter_list_format($php_format_id);
-    $this->assertTrue($filters->get('php_code')->status, 'PHP code filter is enabled.');
+    $this->assertTrue($filters['php_code']->status, 'PHP code filter is enabled.');
 
     // Verify that the format exists on the administration page.
     $this->drupalGet('admin/config/content/formats');
diff --git a/core/modules/php/php.module b/core/modules/php/php.module
index 02fd1dd..e31b4c5 100644
--- a/core/modules/php/php.module
+++ b/core/modules/php/php.module
@@ -86,3 +86,63 @@ function php_eval($code) {
 
   return $output;
 }
+
+/**
+ * Implements hook_filter_FILTER_tips().
+ *
+ * @see php_filter_info()
+ */
+function _php_filter_tips($filter, $format, $long = FALSE) {
+  global $base_url;
+  if ($long) {
+    $output = '<h4>' . t('Using custom PHP code') . '</h4>';
+    $output .= '<p>' . t('Custom PHP code may be embedded in some types of site content, including posts and blocks. While embedding PHP code inside a post or block is a powerful and flexible feature when used by a trusted user with PHP experience, it is a significant and dangerous security risk when used improperly. Even a small mistake when posting PHP code may accidentally compromise your site.') . '</p>';
+    $output .= '<p>' . t('If you are unfamiliar with PHP, SQL, or Drupal, avoid using custom PHP code within posts. Experimenting with PHP may corrupt your database, render your site inoperable, or significantly compromise security.') . '</p>';
+    $output .= '<p>' . t('Notes:') . '</p>';
+    $output .= '<ul><li>' . t('Remember to double-check each line for syntax and logic errors <strong>before</strong> saving.') . '</li>';
+    $output .= '<li>' . t('Statements must be correctly terminated with semicolons.') . '</li>';
+    $output .= '<li>' . t('Global variables used within your PHP code retain their values after your script executes.') . '</li>';
+    $output .= '<li>' . t('<code>register_globals</code> is <strong>turned off</strong>. If you need to use forms, understand and use the functions in <a href="@formapi">the Drupal Form API</a>.', array('@formapi' => url('http://api.drupal.org/api/group/form_api/8'))) . '</li>';
+    $output .= '<li>' . t('Use a <code>print</code> or <code>return</code> statement in your code to output content.') . '</li>';
+    $output .= '<li>' . t('Develop and test your PHP code using a separate test script and sample database before deploying on a production site.') . '</li>';
+    $output .= '<li>' . t('Consider including your custom PHP code within a site-specific module or theme rather than embedding it directly into a post or block.') . '</li>';
+    $output .= '<li>' . t('Be aware that the ability to embed PHP code within content is provided by the PHP Filter module. If this module is disabled or deleted, then blocks and posts with embedded PHP may display, rather than execute, the PHP code.') . '</li></ul>';
+    $output .= '<p>' . t('A basic example: <em>Creating a "Welcome" block that greets visitors with a simple message.</em>') . '</p>';
+    $output .= '<ul><li>' . t('<p>Add a custom block to your site, named "Welcome" . With its text format set to "PHP code" (or another format supporting PHP input), add the following in the Block body:</p>
+<pre>
+print t(\'Welcome visitor! Thank you for visiting.\');
+</pre>') . '</li>';
+    $output .= '<li>' . t('<p>To display the name of a registered user, use this instead:</p>
+<pre>
+global $user;
+if ($user->uid) {
+  print t(\'Welcome @name! Thank you for visiting.\', array(\'@name\' => user_format_name($user)));
+}
+else {
+  print t(\'Welcome visitor! Thank you for visiting.\');
+}
+</pre>') . '</li></ul>';
+    $output .= '<p>' . t('<a href="@drupal">Drupal.org</a> offers <a href="@php-snippets">some example PHP snippets</a>, or you can create your own with some PHP experience and knowledge of the Drupal system.', array('@drupal' => url('http://drupal.org'), '@php-snippets' => url('http://drupal.org/documentation/customization/php-snippets'))) . '</p>';
+    return $output;
+  }
+  else {
+    return t('You may post PHP code. You should include &lt;?php ?&gt; tags.');
+  }
+}
+
+/**
+ * Implements hook_filter_info().
+ *
+ * Provide PHP code filter. Use with care.
+ */
+function php_filter_info() {
+  $filters['php_code'] = array(
+    'title' => t('PHP evaluator'),
+    'type' => FILTER_TYPE_MARKUP_LANGUAGE,
+    'description' => t('Executes a piece of PHP code. The usage of this filter should be restricted to administrators only!'),
+    'process callback' => 'php_eval',
+    'tips callback' => '_php_filter_tips',
+    'cache' => FALSE,
+  );
+  return $filters;
+}
diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module
index aaea6bb..a2f74a3 100644
--- a/core/modules/rdf/rdf.module
+++ b/core/modules/rdf/rdf.module
@@ -492,7 +492,7 @@ function rdf_preprocess_html(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for node.html.twig.
+ * Implements hook_preprocess_HOOK() for node.tpl.php.
  */
 function rdf_preprocess_node(&$variables) {
   // Adds RDFa markup to the node container. The about attribute specifies the
@@ -509,7 +509,7 @@ function rdf_preprocess_node(&$variables) {
   $variables['title_attributes']['property'] = empty($variables['node']->rdf_mapping['title']['predicates']) ? NULL : $variables['node']->rdf_mapping['title']['predicates'];
   $variables['title_attributes']['datatype'] = '';
 
-  // In full node mode, the title is not displayed by node.html.twig so it is
+  // In full node mode, the title is not displayed by node.tpl.php so it is
   // added in the <head> tag of the HTML page.
   if ($variables['page']) {
     $element = array(
@@ -557,7 +557,7 @@ function rdf_preprocess_node(&$variables) {
       $variables['content']['links']['comment']['#links']['comment-comments']['attributes'] += $comment_count_attributes;
     }
     // In full node view, the number of comments is not displayed by
-    // node.html.twig so it is expressed in RDFa in the <head> tag of the HTML
+    // node.tpl.php so it is expressed in RDFa in the <head> tag of the HTML
     // page.
     if ($variables['page'] && user_access('access comments')) {
       $element = array(
@@ -701,7 +701,7 @@ function rdf_preprocess_username(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for comment.html.twig.
+ * Implements hook_preprocess_HOOK() for comment.tpl.php.
  */
 function rdf_preprocess_comment(&$variables) {
   $comment = $variables['comment'];
@@ -843,12 +843,12 @@ function rdf_preprocess_image(&$variables) {
  *   - context: An array of context information about the content to be wrapped:
  *     - hook: The theme hook that will use the wrapped content. This
  *       corresponds to the key within the theme registry for this template.
- *       For example, if this content is about to be used in node.html.twig or
- *       node-[type].html.twig, then the 'hook' is 'node'.
+ *       For example, if this content is about to be used in node.tpl.php or
+ *       node-[type].tpl.php, then the 'hook' is 'node'.
  *     - variable_name: The name of the variable by which the template will
  *       refer to this content. Each template file has documentation about
  *       the variables it uses. For example, if this function is called in
- *       preparing the $author variable for comment.html.twig, then the
+ *       preparing the $author variable for comment.tpl.php, then the
  *       'variable_name' is 'author'.
  *     - variables: The full array of variables about to be passed to the
  *       template.
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
index 04d78a4..18ea9eb 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchCommentTest.php
@@ -214,7 +214,7 @@ function assertCommentAccess($assume_access, $message) {
   }
 
   /**
-   * Verify that 'add new comment' does not appear in search results or index.
+   * Verify that 'add comment' does not appear in search results or index.
    */
   function testAddNewComment() {
     // Create a node with a short body.
@@ -228,10 +228,10 @@ function testAddNewComment() {
     $this->drupalLogin($user);
 
     $node = $this->drupalCreateNode($settings);
-    // Verify that if you view the node on its own page, 'add new comment'
+    // Verify that if you view the node on its own page, 'add comment'
     // is there.
     $this->drupalGet('node/' . $node->nid);
-    $this->assertText(t('Add new comment'), 'Add new comment appears on node page');
+    $this->assertText(t('add comment'), 'Add comment appears on node page');
 
     // Run cron to index this page.
     $this->drupalLogout();
@@ -242,10 +242,10 @@ function testAddNewComment() {
     $this->drupalPost('search/node', array('keys' => 'comment'), t('Search'));
     $this->assertText(t('Your search yielded no results'), 'No results searching for the word comment');
 
-    // Search for the node title. Should be found, and 'Add new comment' should
+    // Search for the node title. Should be found, and 'Add comment' should
     // not be part of the search snippet.
     $this->drupalPost('search/node', array('keys' => 'short'), t('Search'));
     $this->assertText($node->label(), 'Search for keyword worked');
-    $this->assertNoText(t('Add new comment'), 'Add new comment does not appear on search results page');
+    $this->assertNoText(t('add comment'), 'add comment does not appear on search results page');
   }
 }
diff --git a/core/modules/search/search.api.php b/core/modules/search/search.api.php
index 3f30a4a..2c49bc5 100644
--- a/core/modules/search/search.api.php
+++ b/core/modules/search/search.api.php
@@ -47,6 +47,43 @@ function hook_search_info() {
 }
 
 /**
+ * Provide search query conditions.
+ *
+ * Callback for hook_search_info().
+ *
+ * This callback is invoked by search_view() to get an array of additional
+ * search conditions to pass to search_data(). For example, a search module
+ * may get additional keywords, filters, or modifiers for the search from
+ * the query string.
+ *
+ * This example pulls additional search keywords out of the $_REQUEST variable,
+ * (i.e. from the query string of the request). The conditions may also be
+ * generated internally - for example based on a module's settings.
+ *
+ * @param $keys
+ *   The search keywords string.
+ *
+ * @return
+ *   An array of additional conditions, such as filters.
+ *
+ * @ingroup search
+ */
+function callback_search_conditions($keys) {
+  $conditions = array();
+
+  if (!empty($_REQUEST['keys'])) {
+    $conditions['keys'] = $_REQUEST['keys'];
+  }
+  if (!empty($_REQUEST['sample_search_keys'])) {
+    $conditions['sample_search_keys'] = $_REQUEST['sample_search_keys'];
+  }
+  if ($force_keys = config('sample_search.settings')->get('force_keywords')) {
+    $conditions['sample_search_force_keywords'] = $force_keys;
+  }
+  return $conditions;
+}
+
+/**
  * Define access to a custom search routine.
  *
  * This hook allows a module to define permissions for a search tab.
@@ -359,42 +396,3 @@ function hook_update_index() {
 /**
  * @} End of "addtogroup hooks".
  */
-
-/**
- * Provide search query conditions.
- *
- * Callback for hook_search_info().
- *
- * This callback is invoked by search_view() to get an array of additional
- * search conditions to pass to search_data(). For example, a search module
- * may get additional keywords, filters, or modifiers for the search from
- * the query string.
- *
- * This example pulls additional search keywords out of the $_REQUEST variable,
- * (i.e. from the query string of the request). The conditions may also be
- * generated internally - for example based on a module's settings.
- *
- * @param $keys
- *   The search keywords string.
- *
- * @return
- *   An array of additional conditions, such as filters.
- *
- * @ingroup callbacks
- * @ingroup search
- */
-function callback_search_conditions($keys) {
-  $conditions = array();
-
-  if (!empty($_REQUEST['keys'])) {
-    $conditions['keys'] = $_REQUEST['keys'];
-  }
-  if (!empty($_REQUEST['sample_search_keys'])) {
-    $conditions['sample_search_keys'] = $_REQUEST['sample_search_keys'];
-  }
-  if ($force_keys = config('sample_search.settings')->get('force_keywords')) {
-    $conditions['sample_search_force_keywords'] = $force_keys;
-  }
-  return $conditions;
-}
-
diff --git a/core/modules/search/search.module b/core/modules/search/search.module
index efaf031..f31488b 100644
--- a/core/modules/search/search.module
+++ b/core/modules/search/search.module
@@ -135,7 +135,7 @@ function search_permission() {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function search_preprocess_block(&$variables) {
   if ($variables['plugin_id'] == 'search_form_block') {
diff --git a/core/modules/shortcut/shortcut.admin.inc b/core/modules/shortcut/shortcut.admin.inc
index 2f7acf6..c267f13 100644
--- a/core/modules/shortcut/shortcut.admin.inc
+++ b/core/modules/shortcut/shortcut.admin.inc
@@ -307,7 +307,7 @@ function theme_shortcut_set_customize($variables) {
  * @see shortcut_link_add_submit()
  */
 function shortcut_link_add($form, &$form_state, $shortcut_set) {
-  drupal_set_title(t('Add new shortcut'));
+  drupal_set_title(t('Add shortcut'));
   $form['shortcut_set'] = array(
     '#type' => 'value',
     '#value' => $shortcut_set,
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index 2da3d26..d1458a8 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -447,7 +447,7 @@ function shortcut_renderable_links($shortcut_set = NULL) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function shortcut_preprocess_block(&$variables) {
   if ($variables['configuration']['module'] == 'shortcut') {
diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module
index 7b15281..9d0c19e 100644
--- a/core/modules/statistics/statistics.module
+++ b/core/modules/statistics/statistics.module
@@ -234,7 +234,7 @@ function statistics_update_index() {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function statistics_preprocess_block(&$variables) {
   if ($variables['configuration']['module'] == 'statistics') {
diff --git a/core/modules/system/lib/Drupal/system/MachineNameController.php b/core/modules/system/lib/Drupal/system/MachineNameController.php
index f0db24c..c3c7087 100644
--- a/core/modules/system/lib/Drupal/system/MachineNameController.php
+++ b/core/modules/system/lib/Drupal/system/MachineNameController.php
@@ -8,7 +8,6 @@
 namespace Drupal\system;
 
 use Drupal\Component\Transliteration\TransliterationInterface;
-use Drupal\Component\Utility\Unicode;
 use Drupal\Core\ControllerInterface;
 use Symfony\Component\HttpFoundation\JsonResponse;
 use Symfony\Component\HttpFoundation\Request;
@@ -64,7 +63,7 @@ public function transliterate(Request $request) {
 
     $transliterated = $this->transliteration->transliterate($text, $langcode, '_');
     if($lowercase) {
-      $transliterated = Unicode::strtolower($transliterated);
+      $transliterated = drupal_strtolower($transliterated);
     }
     if(isset($replace_pattern) && isset($replace)) {
       $transliterated = preg_replace('@' . $replace_pattern . '@', $replace, $transliterated);
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
index 1f2575c..8ef304c 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
@@ -61,7 +61,7 @@ function testAdminDefinedFormatDate() {
     $this->admin_user = $this->drupalCreateUser(array('administer site configuration'));
     $this->drupalLogin($this->admin_user);
 
-    // Add new date format.
+    // Add date format.
     $edit = array(
       'date_format_id' => 'example_style',
       'date_format_name' => 'Example Style',
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php
index 461b5cb..5ac99e0 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php
@@ -63,8 +63,8 @@ function testFindThemeTemplates() {
     $this->assertEqual($cache['node']['template_file'], 'core/modules/node/templates/node.html.twig', 'Node is using node.html.twig as template file');
     $this->assertEqual($cache['node']['engine'], 'twig', 'Node is using twig engine');
 
-    $this->assertEqual($cache['theme_test_template_test']['template_file'], 'core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.html.twig', 'theme_test is using theme_test.template_test.html.twig as template file');
-    $this->assertEqual($cache['theme_test_template_test']['engine'], 'twig', 'theme_test is using twig as engine.');
+    $this->assertEqual($cache['theme_test_template_test']['template_file'], 'core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php', 'theme_test is using theme_test.template_test.tpl.php as template file');
+    $this->assertEqual($cache['theme_test_template_test']['engine'], 'phptemplate', 'theme_test is using phptemplate as engine.');
 
     $templates = drupal_find_theme_templates($cache, '.html.twig', drupal_get_path('theme', 'test_theme_twig'));
     $this->assertEqual($templates['node__1']['template'], 'node--1', 'Template node--1.html.twig was found in test_theme_twig.');
diff --git a/core/modules/system/lib/Drupal/system/Tests/Transliteration/MachineNameControllerTest.php b/core/modules/system/lib/Drupal/system/Tests/Transliteration/MachineNameControllerTest.php
new file mode 100644
index 0000000..2c689bf
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/Transliteration/MachineNameControllerTest.php
@@ -0,0 +1,74 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\Tests\Transliteration\MachineNameControllerTest.
+ */
+
+namespace Drupal\system\Tests\Transliteration;
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Component\Transliteration\PHPTransliteration;
+use Drupal\simpletest\DrupalUnitTestBase;
+use Drupal\system\MachineNameController;
+use Symfony\Component\HttpFoundation\Request;
+
+/**
+ * Tests machine name controller's transliteration functionality.
+ */
+class MachineNameControllerTest extends DrupalUnitTestBase {
+
+  /**
+   * The machine name controller.
+   *
+   * @var \Drupal\system\MachineNameController
+   */
+  protected $machineNameController;
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Machine name controller tests',
+      'description' => 'Tests that the machine name controller can transliterate strings as expected.',
+      'group' => 'Transliteration',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp();
+    // Create the machine name controller.
+    $this->machineNameController = new MachineNameController(new PHPTransliteration());
+  }
+
+  /**
+   * Tests machine name controller's transliteration functionality.
+   *
+   * @see \Drupal\system\MachineNameController::transliterate()
+   */
+  public function testMachineNameController() {
+    $request = Request::create('', 'GET', array('text' => 'Bob', 'langcode' => 'en'));
+    $json = $this->machineNameController->transliterate($request);
+    $this->assertEqual('"Bob"', $json->getContent());
+
+    $request = Request::create('', 'GET', array('text' => 'Bob', 'langcode' => 'en', 'lowercase' => TRUE));
+    $json = $this->machineNameController->transliterate($request);
+    $this->assertEqual('"bob"', $json->getContent());
+
+    $request = Request::create('', 'GET', array('text' => 'Bob', 'langcode' => 'en', 'replace' => 'Alice', 'replace_pattern' => 'Bob'));
+    $json = $this->machineNameController->transliterate($request);
+    $this->assertEqual('"Alice"', $json->getContent());
+
+    $request = Request::create('', 'GET', array('text' => 'Bob', 'langcode' => 'en', 'replace' => 'Alice', 'replace_pattern' => 'Tom'));
+    $json = $this->machineNameController->transliterate($request);
+    $this->assertEqual('"Bob"', $json->getContent());
+
+    $request = Request::create('', 'GET', array('text' => 'Äwesome', 'langcode' => 'en', 'lowercase' => TRUE));
+    $json = $this->machineNameController->transliterate($request);
+    $this->assertEqual('"awesome"', $json->getContent());
+
+    $request = Request::create('', 'GET', array('text' => 'Äwesome', 'langcode' => 'de', 'lowercase' => TRUE));
+    $json = $this->machineNameController->transliterate($request);
+    $this->assertEqual('"aewesome"', $json->getContent());
+
+  }
+
+}
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index aa79df9..5b80989 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -911,11 +911,11 @@ function hook_menu_local_tasks(&$data, $router_item, $root_path) {
   $data['actions']['node/add'] = array(
     '#theme' => 'menu_local_action',
     '#link' => array(
-      'title' => t('Add new content'),
+      'title' => t('Add content'),
       'href' => 'node/add',
       'localized_options' => array(
         'attributes' => array(
-          'title' => t('Add new content'),
+          'title' => t('Add content'),
         ),
       ),
     ),
@@ -929,7 +929,7 @@ function hook_menu_local_tasks(&$data, $router_item, $root_path) {
       'href' => 'node/add',
       'localized_options' => array(
         'attributes' => array(
-          'title' => t('Add new content'),
+          'title' => t('Add content'),
         ),
       ),
     ),
@@ -1103,7 +1103,7 @@ function hook_page_alter(&$page) {
   // Add help text to the user login block.
   $page['sidebar_first']['user_login']['help'] = array(
     '#weight' => -10,
-    '#markup' => t('To post comments or add new content, you first have to log in.'),
+    '#markup' => t('To post comments or add content, you first have to log in.'),
   );
 }
 
@@ -3063,9 +3063,9 @@ function hook_install_tasks_alter(&$tasks, $install_state) {
  * @see file_default_mimetype_mapping()
  */
 function hook_file_mimetype_mapping_alter(&$mapping) {
-  // Add new MIME type 'drupal/info'.
+  // Add MIME type 'drupal/info'.
   $mapping['mimetypes']['example_info'] = 'drupal/info';
-  // Add new extension '.info.yml' and map it to the 'drupal/info' MIME type.
+  // Add extension '.info.yml' and map it to the 'drupal/info' MIME type.
   $mapping['extensions']['info'] = 'example_info';
   // Override existing extension mapping for '.ogg' files.
   $mapping['extensions']['ogg'] = 189;
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index cbf9f44..0d472e5 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2664,7 +2664,7 @@ function system_user_timezone(&$form, &$form_state) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function system_preprocess_block(&$variables) {
   // Derive the base plugin ID.
@@ -2683,16 +2683,16 @@ function system_preprocess_block(&$variables) {
 }
 
 /**
- * Prepares variables for system plugin UI form templates.
+ * Implements hook_preprocess_HOOK() for system-plugin-ui-form.tpl.php.
  *
- * Default template: system-plugin-ui-form.html.twig.
- *
- * @param array $variables
- *   An associative array containing:
- *   - form: The plugin form elements.
-*/
+ * The $variables array contains the following arguments:
+ * - $form
+ */
 function template_preprocess_system_plugin_ui_form(&$variables) {
   drupal_add_css(drupal_get_path('module', 'system') . '/system.plugin.ui.css');
+  $variables['left'] = drupal_render($variables['form']['left']);
+  $variables['right'] = drupal_render($variables['form']['right']);
+  $variables['form_submit'] = drupal_render_children($variables['form']);
 }
 
 /**
diff --git a/core/modules/system/templates/html.html.twig b/core/modules/system/templates/html.html.twig
deleted file mode 100644
index 02a542b..0000000
--- a/core/modules/system/templates/html.html.twig
+++ /dev/null
@@ -1,49 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for the basic structure of a single Drupal page.
- *
- * Variables:
- * - css: A list of CSS files for the current page.
- * - head: Markup for the HEAD element (including meta tags, keyword tags, and
- *   so on).
- * - head_title: A modified version of the page title, for use in the TITLE tag.
- * - head_title_array: List of text elements that make up the head_title
- *   variable. May contain or more of the following:
- *   - title: The title of the page.
- *   - name: The name of the site.
- *   - slogan: The slogan of the site.
- * - page_top: Initial rendered markup. This should be printed before 'page'.
- * - page: The rendered page markup.
- * - page_bottom: Closing rendered markup. This variable should be printed after
- *   'page'.
- * - styles: Style tags necessary to import all necessary CSS files in the head.
- * - scripts: Script tags necessary to load the JavaScript files and settings
- *   in the head.
- *
- * @see template_preprocess()
- * @see template_preprocess_html()
- * @see template_process_html()
- *
- * @ingroup themeable
- */
-#}
-<!DOCTYPE html>
-<html{{ html_attributes }}>
-  <head>
-    {{ head }}
-    <title>{{ head_title }}</title>
-    {{ styles }}
-    {{ scripts }}
-  </head>
-  <body{{ attributes }}>
-    <div id="skip-link">
-      <a href="#main-content" class="element-invisible element-focusable">
-        {{ 'Skip to main content'|t }}
-      </a>
-    </div>
-    {{ page_top }}
-    {{ page }}
-    {{ page_bottom }}
-  </body>
-</html>
diff --git a/core/modules/system/templates/html.tpl.php b/core/modules/system/templates/html.tpl.php
new file mode 100644
index 0000000..893d8a0
--- /dev/null
+++ b/core/modules/system/templates/html.tpl.php
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to display the basic html structure of a single
+ * Drupal page.
+ *
+ * Variables:
+ * - $css: An array of CSS files for the current page.
+ * - $language: (object) The language the site is being displayed in.
+ *   $language->langcode contains its textual representation.
+ *   $language->dir contains the language direction.
+ *   It will either be 'ltr' or 'rtl'.
+ * - $head_title: A modified version of the page title, for use in the TITLE
+ *   tag.
+ * - $head_title_array: (array) An associative array containing the string parts
+ *   that were used to generate the $head_title variable, already prepared to be
+ *   output as TITLE tag. The key/value pairs may contain one or more of the
+ *   following, depending on conditions:
+ *   - title: The title of the current page, if any.
+ *   - name: The name of the site.
+ *   - slogan: The slogan of the site, if any, and if there is no title.
+ * - $head: Markup for the HEAD section (including meta tags, keyword tags, and
+ *   so on).
+ * - $styles: Style tags necessary to import all CSS files for the page.
+ * - $scripts: Script tags necessary to load the JavaScript files and settings
+ *   for the page.
+ * - $page_top: Initial markup from any modules that have altered the
+ *   page. This variable should always be output first, before all other dynamic
+ *   content.
+ * - $page: The rendered page content.
+ * - $page_bottom: Final closing markup from any modules that have altered the
+ *   page. This variable should always be output last, after all other dynamic
+ *   content.
+ * - $classes String of classes that can be used to style contextually through
+ *   CSS.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_html()
+ * @see template_process()
+ *
+ * @ingroup themeable
+ */
+?><!DOCTYPE html>
+<html<?php print $html_attributes; ?>>
+  <head>
+    <?php print $head; ?>
+    <title><?php print $head_title; ?></title>
+    <?php print $styles; ?>
+    <?php print $scripts; ?>
+  </head>
+  <body class="<?php print $attributes['class']; ?>" <?php print $attributes;?>>
+    <div id="skip-link">
+      <a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?></a>
+    </div>
+    <?php print $page_top; ?>
+    <?php print $page; ?>
+    <?php print $page_bottom; ?>
+  </body>
+</html>
diff --git a/core/modules/system/templates/maintenance-page.html.twig b/core/modules/system/templates/maintenance-page.html.twig
deleted file mode 100644
index a57b546..0000000
--- a/core/modules/system/templates/maintenance-page.html.twig
+++ /dev/null
@@ -1,92 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a single Drupal page while offline.
- *
- * 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()
- * @see template_preprocess_maintenance_page()
- *
- * @ingroup themeable
- */
-#}
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{ language.langcode }}" lang="{{ language.langcode }}" dir="{{ language.dir }}">
-<head>
-  <title>{{ head_title }}</title>
-  {{ head }}
-  {{ styles }}
-  {{ scripts }}
-</head>
-<body class="{{ attributes.class }}">
-  <div id="page">
-    <div id="header">
-      <div id="logo-title">
-        {% if logo %}
-          <a href="{{ base_path }}" title="{{ 'Home'|t }}" rel="home" id="logo">
-            <img src="{{ logo }}" alt="{{ 'Home'|t }}" />
-          </a>
-        {% endif %}
-
-        <div id="name-and-slogan">
-          {% if site_name %}
-            <h1 id="site-name">
-              <a href="{{ base_path }}" title="{{ 'Home'|t }}" rel="home"><span>{{ site_name }}</span></a>
-            </h1>
-          {% endif %}
-          {% if site_slogan %}
-            <div id="site-slogan">{{ site_slogan }}</div>
-          {% endif %}
-        </div> <!-- /name-and-slogan -->
-      </div> <!-- /logo-title -->
-
-      {% if header %}
-        <div id="header-region">
-          {{ header }}
-        </div>
-      {% endif %}
-
-    </div> <!-- /header -->
-
-    <div id="container" class="clearfix">
-
-      {% if sidebar_first %}
-        <div id="sidebar-first" class="column sidebar">
-          {{ sidebar_first }}
-        </div> <!-- /sidebar-first -->
-      {% endif %}
-
-      <div id="main" class="column"><div id="main-squeeze">
-
-        <div id="content">
-          {% if title %}<h1 class="title" id="page-title">{{ title }}</h1>{% endif %}
-          {% if messages %}{{ messages }}{% endif %}
-          <div id="content-content" class="clearfix">
-            {{ content }}
-          </div> <!-- /content-content -->
-        </div> <!-- /content -->
-
-      </div></div> <!-- /main-squeeze /main -->
-
-      {% if sidebar_second %}
-        <div id="sidebar-second" class="column sidebar">
-          {{ sidebar_second }}
-        </div> <!-- /sidebar-second -->
-      {% endif %}
-
-    </div> <!-- /container -->
-
-    <div id="footer-wrapper">
-      <div id="footer">
-        {% if footer %}{{ footer }}{% endif %}
-      </div> <!-- /footer -->
-    </div> <!-- /footer-wrapper -->
-
-  </div> <!-- /page -->
-
-</body>
-</html>
diff --git a/core/modules/system/templates/maintenance-page.tpl.php b/core/modules/system/templates/maintenance-page.tpl.php
new file mode 100644
index 0000000..5da7a1a
--- /dev/null
+++ b/core/modules/system/templates/maintenance-page.tpl.php
@@ -0,0 +1,95 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to display a single Drupal page while offline.
+ *
+ * All the available variables are mirrored in html.tpl.php and page.tpl.php.
+ * Some may be blank but they are provided for consistency.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_maintenance_page()
+ *
+ * @ingroup themeable
+ */
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->langcode ?>" lang="<?php print $language->langcode ?>" dir="<?php print $language->dir ?>">
+
+<head>
+  <title><?php print $head_title; ?></title>
+  <?php print $head; ?>
+  <?php print $styles; ?>
+  <?php print $scripts; ?>
+</head>
+<body class="<?php print $attributes['class']; ?>">
+  <div id="page">
+    <div id="header">
+      <div id="logo-title">
+
+        <?php if (!empty($logo)): ?>
+          <a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
+            <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
+          </a>
+        <?php endif; ?>
+
+        <div id="name-and-slogan">
+          <?php if (!empty($site_name)): ?>
+            <h1 id="site-name">
+              <a href="<?php print $base_path ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
+            </h1>
+          <?php endif; ?>
+
+          <?php if (!empty($site_slogan)): ?>
+            <div id="site-slogan"><?php print $site_slogan; ?></div>
+          <?php endif; ?>
+        </div> <!-- /name-and-slogan -->
+      </div> <!-- /logo-title -->
+
+      <?php if (!empty($header)): ?>
+        <div id="header-region">
+          <?php print $header; ?>
+        </div>
+      <?php endif; ?>
+
+    </div> <!-- /header -->
+
+    <div id="container" class="clearfix">
+
+      <?php if (!empty($sidebar_first)): ?>
+        <div id="sidebar-first" class="column sidebar">
+          <?php print $sidebar_first; ?>
+        </div> <!-- /sidebar-first -->
+      <?php endif; ?>
+
+      <div id="main" class="column"><div id="main-squeeze">
+
+        <div id="content">
+          <?php if (!empty($title)): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
+          <?php if (!empty($messages)): print $messages; endif; ?>
+          <div id="content-content" class="clearfix">
+            <?php print $content; ?>
+          </div> <!-- /content-content -->
+        </div> <!-- /content -->
+
+      </div></div> <!-- /main-squeeze /main -->
+
+      <?php if (!empty($sidebar_second)): ?>
+        <div id="sidebar-second" class="column sidebar">
+          <?php print $sidebar_second; ?>
+        </div> <!-- /sidebar-second -->
+      <?php endif; ?>
+
+    </div> <!-- /container -->
+
+    <div id="footer-wrapper">
+      <div id="footer">
+        <?php if (!empty($footer)): print $footer; endif; ?>
+      </div> <!-- /footer -->
+    </div> <!-- /footer-wrapper -->
+
+  </div> <!-- /page -->
+
+</body>
+</html>
diff --git a/core/modules/system/templates/page.html.twig b/core/modules/system/templates/page.html.twig
deleted file mode 100644
index ff7c010..0000000
--- a/core/modules/system/templates/page.html.twig
+++ /dev/null
@@ -1,150 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a single page.
- *
- * The doctype, html, head and body tags are not in this template. Instead they
- * can be found in the html.html.twig template in this directory.
- *
- * Available variables:
- *
- * General utility variables:
- * - base_path: The base URL path of the Drupal installation. Will usually be
- *   "/" unless you have installed Drupal in a sub-directory.
- * - is_front: A flag indicating if the current page is the front page.
- * - logged_in: A flag indicating if the user is registered and signed in.
- * - is_admin: A flag indicating if the user has permission to access
- *   administration pages.
- *
- * Site identity:
- * - front_page: The URL of the front page. Use this instead of base_path when
- *   linking to the front page. This includes the language domain or prefix.
- * - logo: The url of the logo image, as defined in theme settings.
- * - site_name: The name of the site. This is empty when displaying the site
- *   name has been disabled in the theme settings.
- * - site_slogan: The slogan of the site. This is empty when displaying the site
- *   slogan has been disabled in theme settings.
- *
- * Navigation:
- * - main_menu: The Main menu links for the site, if they have been configured.
- * - secondary_menu: The Secondary menu links for the site, if they have been
- *   configured.
- * - breadcrumb: The breadcrumb trail for the current page.
- *
- * Page content (in order of occurrence in the default page.html.twig):
- * - title_prefix: Additional output populated by modules, intended to be
- *   displayed in front of the main title tag that appears in the template.
- * - title: The page title, for use in the actual content.
- * - title_suffix: Additional output populated by modules, intended to be
- *   displayed after the main title tag that appears in the template.
- * - messages: Status and error messages. Should be displayed prominently.
- * - tabs: Tabs linking to any sub-pages beneath the current page (e.g., the
- *   view and edit tabs when displaying a node).
- * - action_links: Actions local to the page, such as "Add menu" on the menu
- *   administration interface.
- * - feed_icons: All feed icons for the current page.
- * - node: Fully loaded node, if there is an automatically-loaded node
- *   associated with the page and the node ID is the second argument in the
- *   page's path (e.g. node/12345 and node/12345/revisions, but not
- *   comment/reply/12345).
- *
- * Regions:
- * - page.header: Items for the header region.
- * - page.highlighted: Items for the highlighted content region.
- * - page.help: Dynamic help text, mostly for admin pages.
- * - page.content: The main content of the current page.
- * - page.sidebar_first: Items for the first sidebar.
- * - page.sidebar_second: Items for the second sidebar.
- * - page.footer: Items for the footer region.
- *
- * @see template_preprocess()
- * @see template_preprocess_page()
- * @see template_process()
- * @see template_process_page()
- * @see html.html.twig
- *
- * @ingroup themeable
- */
-#}
-<div id="page">
-
-  <header id="header" role="banner" class="clearfix">
-
-    {% if logo %}
-      <a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home" id="logo">
-        <img src="{{ logo }}" alt="{{ 'Home'|t }}"/>
-      </a>
-    {% endif %}
-
-    {% if site_name or site_slogan %}
-      <div id="name-and-slogan">
-        {% if site_name %}
-          {% if title %}
-            <p id="site-name"><strong>
-              <a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
-            </strong></p>
-          {# Use h1 when the content title is empty #}
-          {% else %}
-            <h1 id="site-name">
-              <a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
-            </h1>
-          {% endif %}
-        {% endif %}
-
-        {% if site_slogan %}
-          <p id="site-slogan">{{ site_slogan }}</p>
-        {% endif %}
-      </div><!-- /#name-and-slogan -->
-    {% endif %}
-
-    {{ page.header }}
-
-  </header>
-
-  {% if main_menu or secondary_menu %}
-    <nav role="navigation">
-      {{ main_menu }}
-      {{ secondary_menu }}
-    </nav>
-  {% endif %}
-
-  {{ breadcrumb }}
-
-  {% if messages %}
-    <div id="messages">{{ messages }}</div>
-  {% endif %}
-
-  <div id="main" role="main" class="clearfix">
-    <a id="main-content"></a>
-
-    <div id="content" class="column">
-      {% if page.highlighted %}<div id="highlighted">{{ page.highlighted }}</div>{% endif %}
-      {{ title_prefix }}
-      {% if title %}<h1 class="title" id="page-title">{{ title }}</h1>{% endif %}
-      {{ title_suffix }}
-      {% if tabs %}<div class="tabs">{{ tabs }}</div>{% endif %}
-      {{ page.help }}
-      {% if action_links %}<ul class="action-links">{{ action_links }}</ul>{% endif %}
-      {{ page.content }}
-      {{ feed_icons }}
-    </div><!-- /#content -->
-
-    {% if page.sidebar_first %}
-      <div id="sidebar-first" class="column sidebar">
-        {{ page.sidebar_first }}
-      </div><!-- /#sidebar-first -->
-    {% endif %}
-
-    {% if page.sidebar_second %}
-      <div id="sidebar-second" class="column sidebar">
-        {{ page.sidebar_second }}
-      </div><!-- /#sidebar-second -->
-    {% endif %}
-
-  </div><!-- /#main -->
-
-  <footer id="footer" role="contentinfo">
-    {{ page.footer }}
-  </footer>
-
-</div><!-- /#page -->
diff --git a/core/modules/system/templates/page.tpl.php b/core/modules/system/templates/page.tpl.php
new file mode 100644
index 0000000..6ddeeed
--- /dev/null
+++ b/core/modules/system/templates/page.tpl.php
@@ -0,0 +1,155 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to display a single Drupal page.
+ *
+ * The doctype, html, head and body tags are not in this template. Instead they
+ * can be found in the html.tpl.php template in this directory.
+ *
+ * Available variables:
+ *
+ * General utility variables:
+ * - $base_path: The base URL path of the Drupal installation. At the very
+ *   least, this will always default to /.
+ * - $directory: The directory the template is located in, e.g. modules/system
+ *   or themes/bartik.
+ * - $is_front: TRUE if the current page is the front page.
+ * - $logged_in: TRUE if the user is registered and signed in.
+ * - $is_admin: TRUE if the user has permission to access administration pages.
+ *
+ * Site identity:
+ * - $front_page: The URL of the front page. Use this instead of $base_path,
+ *   when linking to the front page. This includes the language domain or
+ *   prefix.
+ * - $logo: The path to the logo image, as defined in theme configuration.
+ * - $site_name: The name of the site, empty when display has been disabled
+ *   in theme settings.
+ * - $site_slogan: The slogan of the site, empty when display has been disabled
+ *   in theme settings.
+ *
+ * Navigation:
+ * - $main_menu (array): An array containing the Main menu links for the
+ *   site, if they have been configured.
+ * - $secondary_menu (array): An array containing the Secondary menu links for
+ *   the site, if they have been configured.
+ * - $breadcrumb: The breadcrumb trail for the current page.
+ *
+ * Page content (in order of occurrence in the default page.tpl.php):
+ * - $title_prefix (array): An array containing additional output populated by
+ *   modules, intended to be displayed in front of the main title tag that
+ *   appears in the template.
+ * - $title: The page title, for use in the actual HTML content.
+ * - $title_suffix (array): An array containing additional output populated by
+ *   modules, intended to be displayed after the main title tag that appears in
+ *   the template.
+ * - $messages: HTML for status and error messages. Should be displayed
+ *   prominently.
+ * - $tabs (array): Tabs linking to any sub-pages beneath the current page
+ *   (e.g., the view and edit tabs when displaying a node).
+ * - $action_links (array): Actions local to the page, such as 'Add menu' on the
+ *   menu administration interface.
+ * - $feed_icons: A string of all feed icons for the current page.
+ * - $node: The node entity, if there is an automatically-loaded node
+ *   associated with the page, and the node ID is the second argument
+ *   in the page's path (e.g. node/12345 and node/12345/revisions, but not
+ *   comment/reply/12345).
+ *
+ * Regions:
+ * - $page['help']: Dynamic help text, mostly for admin pages.
+ * - $page['highlighted']: Items for the highlighted content region.
+ * - $page['content']: The main content of the current page.
+ * - $page['sidebar_first']: Items for the first sidebar.
+ * - $page['sidebar_second']: Items for the second sidebar.
+ * - $page['header']: Items for the header region.
+ * - $page['footer']: Items for the footer region.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_page()
+ * @see template_process()
+ * @see html.tpl.php
+ *
+ * @ingroup themeable
+ */
+?>
+
+  <div id="page">
+    <header id="header" role="banner" class="clearfix">
+
+      <?php if ($logo): ?>
+        <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
+          <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
+        </a>
+      <?php endif; ?>
+
+      <?php if ($site_name || $site_slogan): ?>
+        <div id="name-and-slogan">
+          <?php if ($site_name): ?>
+            <?php if ($title): ?>
+              <p id="site-name"><strong>
+                <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><?php print $site_name; ?></a>
+              </strong></p>
+            <?php else: /* Use h1 when the content title is empty */ ?>
+              <h1 id="site-name">
+                <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><?php print $site_name; ?></a>
+              </h1>
+            <?php endif; ?>
+          <?php endif; ?>
+
+          <?php if ($site_slogan): ?>
+            <p id="site-slogan"><?php print $site_slogan; ?></p>
+          <?php endif; ?>
+        </div><!-- #name-and-slogan -->
+      <?php endif; ?>
+
+      <?php print render($page['header']); ?>
+
+    </header>
+
+    <?php if ($main_menu || $secondary_menu): ?>
+      <nav role="navigation">
+        <?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => array('text' => t('Main menu'), 'class' => array('element-invisible')))); ?>
+        <?php print theme('links__system_secondary_menu', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => array('text' => t('Secondary menu'), 'class' => array('element-invisible')))); ?>
+      </nav>
+    <?php endif; ?>
+
+    <?php print $breadcrumb; ?>
+
+    <?php if ($messages): ?>
+      <div id="messages"><?php print $messages; ?></div>
+    <?php endif; ?>
+
+    <div id="main" role="main" class="clearfix">
+    <a id="main-content"></a>
+
+      <div id="content" class="column">
+        <?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
+        <?php print render($title_prefix); ?>
+        <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
+        <?php print render($title_suffix); ?>
+        <?php if ($tabs): ?><div class="tabs"><?php print render($tabs); ?></div><?php endif; ?>
+        <?php print render($page['help']); ?>
+        <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
+        <?php print render($page['content']); ?>
+        <?php print $feed_icons; ?>
+      </div>
+
+      <?php if ($page['sidebar_first']): ?>
+        <div id="sidebar-first" class="column sidebar">
+          <?php print render($page['sidebar_first']); ?>
+        </div><!-- #sidebar-first -->
+      <?php endif; ?>
+
+      <?php if ($page['sidebar_second']): ?>
+        <div id="sidebar-second" class="column sidebar">
+          <?php print render($page['sidebar_second']); ?>
+        </div><!-- #sidebar-second -->
+      <?php endif; ?>
+
+    </div><!-- #main -->
+
+    <footer id="footer" role="contentinfo">
+      <?php print render($page['footer']); ?>
+    </footer>
+
+  </div><!-- #page -->
diff --git a/core/modules/system/templates/region.html.twig b/core/modules/system/templates/region.html.twig
deleted file mode 100644
index fe566fe..0000000
--- a/core/modules/system/templates/region.html.twig
+++ /dev/null
@@ -1,28 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a region.
- *
- * Available variables:
- * - content: The content for this region, typically blocks.
- * - attributes: HTML attributes for the region div, including:
- *   - class: Classes that can be used to style contextually through CSS,
- *     including:
- *     - region: The current template type (also know as "theming hook").
- *     - region-[name]: The name of the region with underscores replaced with
- *       dashes. For example, page_top region would have a region-page-top
- *       class.
- * - region: The name of the region variable as defined in the theme's
- *   .info.yml file.
- *
- * @see template_preprocess()
- * @see template_preprocess_region()
- *
- * @ingroup themeable
- */
-#}
-{% if content %}
-  <div{{ attributes }}>
-    {{ content }}
-  </div>
-{% endif %}
diff --git a/core/modules/system/templates/region.tpl.php b/core/modules/system/templates/region.tpl.php
new file mode 100644
index 0000000..92f401e
--- /dev/null
+++ b/core/modules/system/templates/region.tpl.php
@@ -0,0 +1,34 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to display a region.
+ *
+ * Available variables:
+ * - $content: The content for this region, typically blocks.
+ * - $attributes: An instance of Attributes class that can be manipulated as an
+ *    array and printed as a string.
+ *    It includes the 'class' information, which includes:
+ *   - region: The current template type, i.e., "theming hook".
+ *   - region-[name]: The name of the region with underscores replaced with
+ *     dashes. For example, the page_top region would have a region-page-top class.
+ * - $region: The name of the region variable as defined in the theme's
+ *    .info.yml file.
+ *
+ * Helper variables:
+ * - $is_admin: Flags true when the current user is an administrator.
+ * - $is_front: Flags true when presented in the front page.
+ * - $logged_in: Flags true when the current user is a logged-in member.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_region()
+ * @see template_process()
+ *
+ * @ingroup themeable
+ */
+?>
+<?php if ($content): ?>
+  <div <?php print $attributes; ?>>
+    <?php print $content; ?>
+  </div>
+<?php endif; ?>
diff --git a/core/modules/system/templates/system-plugin-ui-form.html.twig b/core/modules/system/templates/system-plugin-ui-form.html.twig
deleted file mode 100644
index 415a6bf..0000000
--- a/core/modules/system/templates/system-plugin-ui-form.html.twig
+++ /dev/null
@@ -1,31 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to configure blocks.
- *
- * Available variables:
- * - form: The form elements which contains:
- *   - left: Form elements that appear in the left column.
- *   - right: Form elements that appear in the right column.
- *
- * @see template_preprocess()
- * @see template_preprocess_system_plugin_ui_form()
- *
- * @ingroup themeable
- */
-#}
-<div id="block-library" class="container">
-  <div class="left-col">
-    <div class="inside">
-      {{ form.left }}
-    </div>
-  </div>
-  <div class="right-col">
-    <div class="inside">
-      {{ form.right }}
-    </div>
-  </div>
-  {% if form -%}
-    <div class="bottom-bar">{{ form }}</div>
-  {%- endif -%}
-</div>
diff --git a/core/modules/system/templates/system-plugin-ui-form.tpl.php b/core/modules/system/templates/system-plugin-ui-form.tpl.php
new file mode 100644
index 0000000..8179076
--- /dev/null
+++ b/core/modules/system/templates/system-plugin-ui-form.tpl.php
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to configure blocks.
+ *
+ * Available variables:
+ * - $left: Any form array elements that should appear in the left hand column.
+ * - $right: Any form array elements that should appear in the right hand column.
+ * - $form_submit: Form submit button.
+ *
+ * @see template_preprocess_block_library_form()
+ * @see theme_block_library_form()
+ *
+ * @ingroup themeable
+ */
+?>
+<div id="block-library" class="container">
+  <div class="left-col">
+    <div class="inside">
+      <?php print $left; ?>
+    </div>
+  </div>
+  <div class="right-col">
+    <div class="inside">
+      <?php print $right; ?>
+    </div>
+  </div>
+  <?php if ($form_submit) { ?>
+  <div class="bottom-bar"><?php print $form_submit; ?></div>
+  <?php } ?>
+</div>
diff --git a/core/modules/system/tests/Drupal/system/Tests/Transliteration/MachineNameControllerTest.php b/core/modules/system/tests/Drupal/system/Tests/Transliteration/MachineNameControllerTest.php
deleted file mode 100644
index 8eb2592..0000000
--- a/core/modules/system/tests/Drupal/system/Tests/Transliteration/MachineNameControllerTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\system\Tests\Transliteration\MachineNameControllerTest.
- */
-
-namespace Drupal\system\Tests\Transliteration;
-
-use Drupal\Tests\UnitTestCase;
-use Drupal\Core\DependencyInjection\ContainerBuilder;
-use Drupal\Component\Transliteration\PHPTransliteration;
-use Drupal\system\MachineNameController;
-use Symfony\Component\HttpFoundation\Request;
-
-/**
- * Tests machine name controller's transliteration functionality.
- *
- * @group System
- */
-class MachineNameControllerTest extends UnitTestCase {
-
-  /**
-   * The machine name controller.
-   *
-   * @var \Drupal\system\MachineNameController
-   */
-  protected $machineNameController;
-
-  public static function getInfo() {
-    return array(
-      'name' => 'Machine name controller tests',
-      'description' => 'Tests that the machine name controller can transliterate strings as expected.',
-      'group' => 'Transliteration',
-    );
-  }
-
-  public function setUp() {
-    parent::setUp();
-    // Create the machine name controller.
-    $this->machineNameController = new MachineNameController(new PHPTransliteration());
-  }
-
-  /**
-   * Data provider for testMachineNameController().
-   *
-   * @see testMachineNameController()
-   *
-   * @return array
-   *   An array containing:
-   *     - An array of request parameters.
-   *     - The expected content of the JSONresponse.
-   */
-  public function providerTestMachineNameController() {
-    return array(
-      array(array('text' => 'Bob', 'langcode' => 'en'), '"Bob"'),
-      array(array('text' => 'Bob', 'langcode' => 'en', 'lowercase' => TRUE), '"bob"'),
-      array(array('text' => 'Bob', 'langcode' => 'en', 'replace' => 'Alice', 'replace_pattern' => 'Bob'), '"Alice"'),
-      array(array('text' => 'Bob', 'langcode' => 'en', 'replace' => 'Alice', 'replace_pattern' => 'Tom'), '"Bob"'),
-      array(array('text' => 'Äwesome', 'langcode' => 'en', 'lowercase' => TRUE), '"awesome"'),
-      array(array('text' => 'Äwesome', 'langcode' => 'de', 'lowercase' => TRUE), '"aewesome"'),
-    );
-  }
-
-  /**
-   * Tests machine name controller's transliteration functionality.
-   *
-   * @param array $request_params
-   *   An array of request parameters.
-   * @param $expected_content
-   *   The expected content of the JSONresponse.
-   *
-   * @see \Drupal\system\MachineNameController::transliterate()
-   *
-   * @dataProvider providerTestMachineNameController
-   */
-  public function testMachineNameController(array $request_params, $expected_content) {
-    $request = Request::create('', 'GET', $request_params);
-    $json = $this->machineNameController->transliterate($request);
-    $this->assertEquals($expected_content, $json->getContent());
-  }
-
-}
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module
index e8c1d9b..f486786 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.module
+++ b/core/modules/system/tests/modules/entity_test/entity_test.module
@@ -221,7 +221,7 @@ function entity_test_form_node_form_alter(&$form, &$form_state, $form_id) {
 }
 
 /**
- * Menu callback: displays the 'Add new entity_test' form.
+ * Menu callback: displays the 'Add entity_test' form.
  *
  * @param string $entity_type
  *   Name of the entity type for which a create form should be displayed.
diff --git a/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/MockBlockManager.php b/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/MockBlockManager.php
index 157e583..d08a991 100644
--- a/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/MockBlockManager.php
+++ b/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/MockBlockManager.php
@@ -34,7 +34,7 @@ public function __construct() {
     // for the Drupal 8 Blocks and Layouts initiative
     // (http://groups.drupal.org/node/213563). As stated above, we set
     // definitions here, because this is for unit testing. Real plugin managers
-    // use a discovery implementation that allows for any module to add new
+    // use a discovery implementation that allows for any module to add
     // plugins to the system.
 
     // A simple plugin: the user login block.
diff --git a/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.html.twig b/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.html.twig
deleted file mode 100644
index cde8faa..0000000
--- a/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.html.twig
+++ /dev/null
@@ -1,2 +0,0 @@
-<!-- Output for Theme API test -->
-Fail: Template not overridden.
diff --git a/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php b/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php
new file mode 100644
index 0000000..cde8faa
--- /dev/null
+++ b/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php
@@ -0,0 +1,2 @@
+<!-- Output for Theme API test -->
+Fail: Template not overridden.
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index c531daf..2a97b8e 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -58,7 +58,7 @@ function taxonomy_help($path, $arg) {
       $output .= '<dt>' . t('Assigning vocabularies to content types') . '</dt>';
       $output .= '<dd>' . t('Before you can use a new vocabulary to classify your content, a new Taxonomy term field must be added to a <a href="@ctedit">content type</a> on its <em>manage fields</em> page. When adding a taxonomy field, you choose a <em>widget</em> to use to enter the taxonomy information on the content editing page: a select list, checkboxes, radio buttons, or an auto-complete field (to build a free-tagging vocabulary). After choosing the field type and widget, on the subsequent <em>field settings</em> page you can choose the desired vocabulary, whether one or multiple terms can be chosen from the vocabulary, and other settings. The same vocabulary can be added to multiple content types, by using the "Re-use existing field" section on the manage fields page.', array('@ctedit' => url('admin/structure/types'))) . '</dd>';
       $output .= '<dt>' . t('Classifying content') . '</dt>';
-      $output .= '<dd>' . t('After the vocabulary is assigned to the content type, you can start classifying content. The field with terms will appear on the content editing screen when you edit or <a href="@addnode">add new content</a>.', array('@addnode' => url('node/add'))) . '</dd>';
+      $output .= '<dd>' . t('After the vocabulary is assigned to the content type, you can start classifying content. The field with terms will appear on the content editing screen when you edit or <a href="@addnode">add content</a>.', array('@addnode' => url('node/add'))) . '</dd>';
       $output .= '<dt>' . t('Viewing listings and RSS feeds by term') . '</dt>';
       $output .= '<dd>' . t("Each taxonomy term automatically provides a page listing content that has its classification, and a corresponding RSS feed. For example, if the taxonomy term <em>country rock</em> has the ID 123 (you can see this by looking at the URL when hovering on the linked term, which you can click to navigate to the listing page), then you will find this list at the path <em>taxonomy/term/123</em>. The RSS feed will use the path <em>taxonomy/term/123/feed</em> (the RSS icon for this term's listing will automatically display in your browser's address bar when viewing the listing page).") . '</dd>';
       $output .= '<dt>' . t('Extending Taxonomy module') . '</dt>';
@@ -452,18 +452,7 @@ function taxonomy_term_view_multiple(array $terms, $view_mode = 'full', $langcod
 }
 
 /**
- * Prepares variables for taxonomy term templates.
- *
- * Default template: taxonomy-term.html.twig.
- *
- * @param array $variables
- *   An associative array containing:
- *   - elements: An associative array containing the taxonomy term and any
- *     fields attached to the term. Properties used:
- *     - #term: The term object.
- *     - #view_mode: The current view mode for this taxonomy term, e.g.
- *       'full' or 'teaser'.
- *   - attributes: HTML attributes for the containing element.
+ * Process variables for taxonomy-term.tpl.php.
  */
 function template_preprocess_taxonomy_term(&$variables) {
   $variables['view_mode'] = $variables['elements']['#view_mode'];
@@ -472,9 +461,8 @@ function template_preprocess_taxonomy_term(&$variables) {
 
   $uri = $term->uri();
   $variables['url']  = url($uri['path'], $uri['options']);
-  // We use name here because that is what appears in the UI.
-  $variables['name'] = check_plain($term->label());
-  $variables['page'] = $variables['view_mode'] == 'full' && taxonomy_term_is_page($term);
+  $variables['label'] = check_plain($term->label());
+  $variables['page']      = $variables['view_mode'] == 'full' && taxonomy_term_is_page($term);
 
   // Helpful $content variable for templates.
   $variables['content'] = array();
diff --git a/core/modules/taxonomy/templates/taxonomy-term.html.twig b/core/modules/taxonomy/templates/taxonomy-term.html.twig
deleted file mode 100644
index 765cbcf..0000000
--- a/core/modules/taxonomy/templates/taxonomy-term.html.twig
+++ /dev/null
@@ -1,42 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a taxonomy term.
- *
- * Available variables:
- * - url: URL of the current term.
- * - name: Name of the current term.
- * - content: Items for the content of the term (fields and description).
- *   Use 'content' to print them all, or print a subset such as
- *   'content.description'. Use the following code to temporarily suppress the
- *   printing of a given element:
- *   @code
- *   {% hide(content.description) %}
- *   @endcode
- * - attributes: HTML attributes for the wrapper. The 'class' attribute
- *   contains the following classes by default:
- *   - taxonomy-term: The current template type, i.e. "theming hook".
- *   - vocabulary-[vocabulary-name]: The vocabulary that this term belongs to.
- *     For example, if the term belongs to a vocabulary called "Tags" then the
- *     class would be "vocabulary-tags".
- * - page: Flag for the full page state.
- * - term: The taxonomy term entity, including:
- *   - id: The ID of the taxonomy term.
- * - view_mode: View mode, e.g. 'full', 'teaser', etc.
- *
- * @see template_preprocess()
- * @see template_preprocess_taxonomy_term()
- *
- * @ingroup themeable
- */
-#}
-<div id="taxonomy-term-{{ term.id }}"{{ attributes }}>
-  {{ title_prefix }}
-  {% if not page %}
-    <h2><a href="{{ url }}">{{ name }}</a></h2>
-  {% endif %}
-  {{ title_suffix }}
-  <div class="content">
-    {{ content }}
-  </div>
-</div>
diff --git a/core/modules/taxonomy/templates/taxonomy-term.tpl.php b/core/modules/taxonomy/templates/taxonomy-term.tpl.php
new file mode 100644
index 0000000..a7e58f6
--- /dev/null
+++ b/core/modules/taxonomy/templates/taxonomy-term.tpl.php
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to display a term.
+ *
+ * Available variables:
+ * - $content: An array of items for the content of the term (fields and
+ *   description). Use render($content) to print them all, or print a subset
+ *   such as render($content['field_example']). Use
+ *   hide($content['field_example']) to temporarily suppress the printing of a
+ *   given element.
+ * - $url: Direct url of the current term.
+ * - $label: Name of the current term.
+ * - $attributes: An instance of Attributes class that can be manipulated as an
+ *    array and printed as a string.
+ *    It includes the 'class' information, which includes:
+ *   - taxonomy-term: The current template type, i.e., "theming hook".
+ *   - vocabulary-[vocabulary-name]: The vocabulary to which the term belongs to.
+ *     For example, if the term is a "Tag" it would result in "vocabulary-tag".
+ *
+ * Other variables:
+ * - $term: Full term object. Contains data that may not be safe.
+ * - $view_mode: View mode, e.g. 'full', 'teaser'...
+ * - $page: Flag for the full page state.
+ * - $is_front: Flags true when presented in the front page.
+ * - $logged_in: Flags true when the current user is a logged-in member.
+ * - $is_admin: Flags true when the current user is an administrator.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_taxonomy_term()
+ * @see template_process()
+ *
+ * @ingroup themeable
+ */
+?>
+<div id="taxonomy-term-<?php print $term->id(); ?>"<?php print $attributes; ?>>
+
+  <?php print render($title_prefix); ?>
+  <?php if (!$page): ?>
+    <h2><a href="<?php print $url; ?>"><?php print $label; ?></a></h2>
+  <?php endif; ?>
+  <?php print render($title_suffix); ?>
+
+  <div class="content">
+    <?php print render($content); ?>
+  </div>
+
+</div>
diff --git a/core/modules/text/lib/Drupal/text/Tests/TextSummaryTest.php b/core/modules/text/lib/Drupal/text/Tests/TextSummaryTest.php
index aec92e0..f679109 100644
--- a/core/modules/text/lib/Drupal/text/Tests/TextSummaryTest.php
+++ b/core/modules/text/lib/Drupal/text/Tests/TextSummaryTest.php
@@ -7,14 +7,13 @@
 
 namespace Drupal\text\Tests;
 
-use Drupal\simpletest\DrupalUnitTestBase;
+use Drupal\simpletest\WebTestBase;
 
 /**
  * Tests the text field summary.
  */
-class TextSummaryTest extends DrupalUnitTestBase {
-
-  public static $modules = array('system', 'user', 'filter', 'text');
+class TextSummaryTest extends WebTestBase {
+  protected $profile = 'standard';
 
   public static function getInfo() {
     return array(
@@ -26,10 +25,7 @@ public static function getInfo() {
 
   function setUp() {
     parent::setUp();
-
-    $this->installSchema('system', 'url_alias');
-    $this->installSchema('user', 'role_permission');
-    $this->installConfig(array('text'));
+    $this->article_creator = $this->drupalCreateUser(array('create article content', 'edit own article content'));
   }
 
   /**
@@ -40,7 +36,7 @@ function setUp() {
   function testFirstSentenceQuestion() {
     $text = 'A question? A sentence. Another sentence.';
     $expected = 'A question? A sentence.';
-    $this->assertTextSummary($text, $expected, NULL, 30);
+    $this->callTextSummary($text, $expected, NULL, 30);
   }
 
   /**
@@ -55,174 +51,133 @@ function testLongSentence() {
                 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ' .
                 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.';
     // First three sentences add up to: 336, so add one for space and then 3 to get half-way into next word.
-    $this->assertTextSummary($text, $expected, NULL, 340);
+    $this->callTextSummary($text, $expected, NULL, 340);
   }
 
   /**
    * Test various summary length edge cases.
    */
   function testLength() {
-    entity_create('filter_format', array(
-      'format' => 'autop',
-      'filters' => array(
-        'filter_autop' => array(
-          'status' => 1,
-        ),
-      ),
-    ))->save();
-    entity_create('filter_format', array(
-      'format' => 'autop_correct',
-      'filters' => array(
-        'filter_autop' => array(
-          'status' => 1,
-        ),
-        'filter_htmlcorrector' => array(
-          'status' => 1,
-        ),
-      ),
-    ))->save();
-
     // This string tests a number of edge cases.
     $text = "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>";
 
     // The summaries we expect text_summary() to return when $size is the index
     // of each array item.
     // Using no text format:
-    $format = NULL;
-    $i = 0;
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<", $format, $i++);
-    $this->assertTextSummary($text, "<p", $format, $i++);
-    $this->assertTextSummary($text, "<p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\n", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nH", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n<", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
+    $expected = array(
+      "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>",
+      "<",
+      "<p",
+      "<p>",
+      "<p>\n",
+      "<p>\nH",
+      "<p>\nHi",
+      "<p>\nHi\n",
+      "<p>\nHi\n<",
+      "<p>\nHi\n</",
+      "<p>\nHi\n</p",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>",
+      "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>",
+      "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>",
+    );
 
-    // Using a text format with filter_autop enabled.
-    $format = 'autop';
-    $i = 0;
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<", $format, $i++);
-    $this->assertTextSummary($text, "<p", $format, $i++);
-    $this->assertTextSummary($text, "<p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
+    // And using a text format WITH the line-break and htmlcorrector filters.
+    $expected_lb = array(
+      "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>",
+      "",
+      "<p></p>",
+      "<p></p>",
+      "<p></p>",
+      "<p></p>",
+      "<p></p>",
+      "<p>\nHi</p>",
+      "<p>\nHi</p>",
+      "<p>\nHi</p>",
+      "<p>\nHi</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>",
+      "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>",
+      "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>",
+      "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>",
+    );
 
-    // Using a text format with filter_autop and filter_htmlcorrector enabled.
-    $format = 'autop_correct';
-    $i = 0;
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "", $format, $i++);
-    $this->assertTextSummary($text, "<p></p>", $format, $i++);
-    $this->assertTextSummary($text, "<p></p>", $format, $i++);
-    $this->assertTextSummary($text, "<p></p>", $format, $i++);
-    $this->assertTextSummary($text, "<p></p>", $format, $i++);
-    $this->assertTextSummary($text, "<p></p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
-    $this->assertTextSummary($text, "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>", $format, $i++);
+    // Test text_summary() for different sizes.
+    for ($i = 0; $i <= 37; $i++) {
+      $this->callTextSummary($text, $expected[$i],    NULL, $i);
+      $this->callTextSummary($text, $expected_lb[$i], 'plain_text', $i);
+      $this->callTextSummary($text, $expected_lb[$i], 'basic_html', $i);
+    }
   }
 
   /**
    * Calls text_summary() and asserts that the expected teaser is returned.
    */
-  function assertTextSummary($text, $expected, $format = NULL, $size = NULL) {
+  function callTextSummary($text, $expected, $format = NULL, $size = NULL) {
     $summary = text_summary($text, $format, $size);
-    $this->assertIdentical($summary, $expected, format_string('<pre style="white-space: pre-wrap">@actual</pre> is identical to <pre style="white-space: pre-wrap">@expected</pre>', array(
-      '@actual' => $summary,
-      '@expected' => $expected,
-    )));
+    $this->assertIdentical($summary, $expected, t('Generated summary "@summary" matches expected "@expected".', array('@summary' => $summary, '@expected' => $expected)));
   }
 
+  /**
+   * Test sending only summary.
+   */
+  function testOnlyTextSummary() {
+    // Login as article creator.
+    $this->drupalLogin($this->article_creator);
+    // Create article with summary but empty body.
+    $summary = $this->randomName();
+    $edit = array(
+      "title" => $this->randomName(),
+      "body[und][0][summary]" => $summary,
+    );
+    $this->drupalPost('node/add/article', $edit, t('Save'));
+    $node = $this->drupalGetNodeByTitle($edit['title']);
+
+    $this->assertIdentical($node->body['und'][0]['summary'], $summary, 'Article with with summary and no body has been submitted.');
+  }
 }
diff --git a/core/modules/text/text.module b/core/modules/text/text.module
index 4fe2115..4bf51b6 100644
--- a/core/modules/text/text.module
+++ b/core/modules/text/text.module
@@ -272,22 +272,14 @@ function text_summary($text, $format = NULL, $size = NULL) {
     return substr($text, 0, $delimiter);
   }
 
-  // Retrieve the filters of the specified text format, if any.
-  if (isset($format)) {
-    $filters = filter_list_format($format);
-    // If the specified format does not exist, return nothing. $text is already
-    // filtered text, but the remainder of this function will not be able to
-    // ensure a sane and secure summary.
-    if (!$filters) {
-      return '';
-    }
-  }
-
   // We check for the presence of the PHP evaluator filter in the current
   // format. If the body contains PHP code, we do not split it up to prevent
   // parse errors.
-  if (isset($format) && $filters->has('php_code') && $filters->get('php_code')->status && strpos($text, '<?') !== FALSE) {
-    return $text;
+  if (isset($format)) {
+    $filters = filter_list_format($format);
+    if (isset($filters['php_code']) && $filters['php_code']->status && strpos($text, '<?') !== FALSE) {
+      return $text;
+    }
   }
 
   // If we have a short body, the entire body is the summary.
@@ -324,7 +316,7 @@ function text_summary($text, $format = NULL, $size = NULL) {
   $line_breaks = array('<br />' => 6, '<br>' => 4);
   // Newline only indicates a line break if line break converter
   // filter is present.
-  if (isset($format) && $filters->has('filter_autop') && $filters->get('filter_autop')->status) {
+  if (isset($filters['filter_autop'])) {
     $line_breaks["\n"] = 1;
   }
   $break_points[] = $line_breaks;
@@ -352,7 +344,7 @@ function text_summary($text, $format = NULL, $size = NULL) {
   }
 
   // If the htmlcorrector filter is present, apply it to the generated summary.
-  if (isset($format) && $filters->has('filter_htmlcorrector') && $filters->get('filter_htmlcorrector')->status) {
+  if (isset($filters['filter_htmlcorrector'])) {
     $summary = _filter_htmlcorrector($summary);
   }
 
diff --git a/core/modules/tour/js/tour.js b/core/modules/tour/js/tour.js
index fde4f58..7e87417 100644
--- a/core/modules/tour/js/tour.js
+++ b/core/modules/tour/js/tour.js
@@ -14,7 +14,7 @@ Drupal.behaviors.tour = {
   attach: function (context) {
     $('body').once('tour', function (index, element) {
       var model = new Drupal.tour.models.StateModel();
-      new Drupal.tour.views.ToggleTourView({
+      var view = new Drupal.tour.views.ToggleTourView({
         el: $(context).find('#toolbar-tab-tour'),
         model: model
       });
@@ -177,12 +177,10 @@ Drupal.tour.views.ToggleTourView = Backbone.View.extend({
         var $this = $(this);
         var itemId = $this.attr('data-id');
         var itemClass = $this.attr('data-class');
-        if ((itemId && $document.find('#' + itemId).length) ||
-           (itemClass && $document.find('.' + itemClass).length)){
-          return;
+        if ((itemId || itemClass) && $document.find('#' + itemId + ', .' + itemClass).length === 0) {
+          removals = true;
+          $this.remove();
         }
-        removals = true;
-        $this.remove();
       });
 
     // If there were removals, we'll have to do some clean-up.
diff --git a/core/modules/user/templates/user-picture.tpl.php b/core/modules/user/templates/user-picture.tpl.php
new file mode 100644
index 0000000..ee82187
--- /dev/null
+++ b/core/modules/user/templates/user-picture.tpl.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to present a picture configured for the
+ * user's account.
+ *
+ * Available variables:
+ * - $user_picture: Image set by the user or the site's default. Will be linked
+ *   depending on the viewer's permission to view the user's profile page.
+ * - $account: Array of account information. Potentially unsafe. Be sure to
+ *   check_plain() before use.
+ *
+ * @see template_preprocess_user_picture()
+ *
+ * @ingroup themeable
+ */
+?>
+<?php if ($user_picture): ?>
+  <div class="user-picture">
+    <?php print $user_picture; ?>
+  </div>
+<?php endif; ?>
diff --git a/core/modules/user/templates/user.html.twig b/core/modules/user/templates/user.html.twig
deleted file mode 100644
index e011796..0000000
--- a/core/modules/user/templates/user.html.twig
+++ /dev/null
@@ -1,31 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to present all user data.
- *
- * This template is used when viewing a registered user's page,
- * e.g., example.com/user/123. 123 being the user's ID.
- *
- * Available variables:
- * - content: A list of content items. Use 'content' to print all content, or
- *   print a subset such as 'content.field_example'.
- * - Field variables: For each field instance attached to the user a
- *   corresponding variable is defined; e.g., account.field_example has a
- *   variable 'field_example' defined. When needing to access a field's raw
- *   values, developers/themers are strongly encouraged to use these
- *   variables. Otherwise they will have to explicitly specify the desired
- *   field language, e.g. account.field_example.en, thus overriding any
- *   language negotiation rule that was previously applied.
- * - attributes: HTML attributes for the container element.
- *
- * @see template_preprocess()
- * @see template_preprocess_user()
- *
- * @ingroup themeable
- */
-#}
-<article{{ attributes }}>
-  {% if content %}
-    {{- content -}}
-  {% endif %}
-</article>
diff --git a/core/modules/user/templates/user.tpl.php b/core/modules/user/templates/user.tpl.php
new file mode 100644
index 0000000..617d310
--- /dev/null
+++ b/core/modules/user/templates/user.tpl.php
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to present all user data.
+ *
+ * This template is used when viewing a registered user's page,
+ * e.g., example.com/user/123. 123 being the users ID.
+ *
+ * Use render($content) to print all content, or print a subset
+ * such as render($content['field_example']).
+ * By default, $user_profile['summary'] is provided, which contains data on the
+ * user's history. Other data can be included by modules.
+ *
+ * Available variables:
+ *   - $content: An array of content items. Use render() to print them.
+ *   - Field variables: for each field instance attached to the user a
+ *     corresponding variable is defined; e.g., $account->field_example has a
+ *     variable $field_example defined. When needing to access a field's raw
+ *     values, developers/themers are strongly encouraged to use these
+ *     variables. Otherwise they will have to explicitly specify the desired
+ *     field language, e.g. $account->field_example['en'], thus overriding any
+ *     language negotiation rule that was previously applied.
+ *
+ * @see template_preprocess_user()
+ *
+ * @ingroup themeable
+ */
+?>
+<article class="profile"<?php print $attributes; ?>>
+  <?php print render($content); ?>
+</article>
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 0b884fa..42a79db 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -93,8 +93,8 @@ function user_theme() {
   return array(
     'user' => array(
       'render element' => 'elements',
-      'file' => 'user.pages.inc',
       'template' => 'user',
+      'file' => 'user.pages.inc',
     ),
     'user_admin_permissions' => array(
       'render element' => 'form',
@@ -646,7 +646,7 @@ function user_validate_current_pass(&$form, &$form_state) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for block.html.twig.
+ * Implements hook_preprocess_HOOK() for block.tpl.php.
  */
 function user_preprocess_block(&$variables) {
   if ($variables['configuration']['module'] == 'user') {
diff --git a/core/modules/user/user.pages.inc b/core/modules/user/user.pages.inc
index 5817d9c..5f0cfab 100644
--- a/core/modules/user/user.pages.inc
+++ b/core/modules/user/user.pages.inc
@@ -179,13 +179,12 @@ function user_logout() {
 }
 
 /**
- * Prepares variables for user templates.
+ * Process variables for user.tpl.php.
  *
- * Default template: user.html.twig.
+ * The $variables array contains the following arguments:
+ * - $account
  *
- * @param array $variables
- *   An associative array containing:
- *   - account: The user account.
+ * @see user.tpl.php
  */
 function template_preprocess_user(&$variables) {
   $account = $variables['elements']['#user'];
@@ -197,9 +196,6 @@ function template_preprocess_user(&$variables) {
 
   // Preprocess fields.
   field_attach_preprocess($account, $variables['elements'], $variables);
-
-  // Set up attributes.
-  $variables['attributes']['class'][] = 'profile';
 }
 
 /**
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
index 3f510aa..00ce88b 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
@@ -435,7 +435,7 @@ public function showExposeForm(&$form, &$form_state) {
 
     $this->buildExposeForm($form, $form_state);
 
-    // When we click the expose button, we add new gadgets to the form but they
+    // When we click the expose button, we add gadgets to the form but they
     // have no data in $_POST so their defaults get wiped out. This prevents
     // these defaults from getting wiped out. This setting will only be TRUE
     // during a 2nd pass rerender.
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php
index e0dd2d5..0795c3b 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php
@@ -350,7 +350,7 @@ function show_build_group_form(&$form, &$form_state) {
 
     $this->build_group_form($form, $form_state);
 
-    // When we click the expose button, we add new gadgets to the form but they
+    // When we click the expose button, we add gadgets to the form but they
     // have no data in $_POST so their defaults get wiped out. This prevents
     // these defaults from getting wiped out. This setting will only be TRUE
     // during a 2nd pass rerender.
diff --git a/core/modules/views/templates/views-exposed-form.html.twig b/core/modules/views/templates/views-exposed-form.html.twig
deleted file mode 100644
index 239b67d..0000000
--- a/core/modules/views/templates/views-exposed-form.html.twig
+++ /dev/null
@@ -1,87 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation of a views exposed form.
- *
- * Available variables:
- * - widgets: A list of exposed form widgets. Each widget contains:
- *   - label: The sanitized label of the widget.
- *   - id: The ID of the widget, if available.
- *   - operator: The select element for the operator widget.
- *   - description: The sanitized description of the widget.
- *   - widget: The widget itself.
- *   - index: the widget's row index.
- * - form: A render element representing the form.
- *   - sort_by: An optional select element to sort the view by fields.
- *   - sort_order: An optional select element with ascending or
- *     descending order options.
- *   - items_per_page: An optional select element for the available items per
- *     page.
- *   - offset: An optional textfield to define the offset of the view.
- *   - reset_button: An optional button to reset the exposed filter applied.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_exposed_form()
- *
- * @ingroup themeable
- */
-#}
-{% if q is not empty %}
-  {#
-    This ensures that, if clean URLs are off, the 'q' is added first,
-    as a hidden form element, so that it shows up first in the POST URL.
-  #}
-{{ q }}
-{% endif %}
-<div class="views-exposed-form">
-  <div class="views-exposed-widgets clearfix">
-    {% for index, widget in widgets %}
-      <div id="{{ widget.id }}-wrapper" class="views-exposed-widget views-widget-{{ index }}">
-          {% if widget.label %}
-          <label for="{{ widget.id }}">
-            {{ widget.label }}
-          </label>
-        {% endif %}
-        {% if widget.operator %}
-          <div class="views-operator">
-            {{ widget.operator }}
-          </div>
-        {% endif %}
-        <div class="views-widget">
-          {{ widget.widget }}
-        </div>
-        {% if widget.description %}
-          <div class="description">
-            {{ widget.description }}
-          </div>
-        {% endif %}
-      </div>
-    {% endfor %}
-    {% if form.sort_by %}
-      <div class="views-exposed-widget views-widget-sort-by">
-        {{ form.sort_by }}
-      </div>
-      <div class="views-exposed-widget views-widget-sort-order">
-        {{ form.sort_order }}
-      </div>
-    {% endif %}
-    {% if form.items_per_page %}
-      <div class="views-exposed-widget views-widget-per-page">
-        {{ form.items_per_page }}
-      </div>
-    {% endif %}
-    {% if form.offset %}
-      <div class="views-exposed-widget views-widget-offset">
-        {{ form.offset }}
-      </div>
-    {% endif %}
-    <div class="views-exposed-widget views-submit-button">
-      {{ form }}
-    </div>
-    {% if form.reset_button %}
-      <div class="views-exposed-widget views-reset-button">
-        {{ form.reset_button }}
-      </div>
-    {% endif %}
-  </div>
-</div>
diff --git a/core/modules/views/templates/views-exposed-form.tpl.php b/core/modules/views/templates/views-exposed-form.tpl.php
new file mode 100644
index 0000000..bdd570c
--- /dev/null
+++ b/core/modules/views/templates/views-exposed-form.tpl.php
@@ -0,0 +1,80 @@
+<?php
+
+/**
+ * @file
+ * This template handles the layout of the views exposed filter form.
+ *
+ * Variables available:
+ * - $widgets: An array of exposed form widgets. Each widget contains:
+ * - $widget->label: The visible label to print. May be optional.
+ * - $widget->operator: The operator for the widget. May be optional.
+ * - $widget->widget: The widget itself.
+ * - $sort_by: The select box to sort the view using an exposed form.
+ * - $sort_order: The select box with the ASC, DESC options to define order. May be optional.
+ * - $items_per_page: The select box with the available items per page. May be optional.
+ * - $offset: A textfield to define the offset of the view. May be optional.
+ * - $reset_button: A button to reset the exposed filter applied. May be optional.
+ * - $button: The submit button for the form.
+ *
+ * @ingroup views_templates
+ */
+?>
+<?php if (!empty($q)): ?>
+  <?php
+    // This ensures that, if clean URLs are off, the 'q' is added first so that
+    // it shows up first in the URL.
+    print $q;
+  ?>
+<?php endif; ?>
+<div class="views-exposed-form">
+  <div class="views-exposed-widgets clearfix">
+    <?php foreach ($widgets as $id => $widget): ?>
+      <div id="<?php print $widget->id; ?>-wrapper" class="views-exposed-widget views-widget-<?php print $id; ?>">
+        <?php if (!empty($widget->label)): ?>
+          <label for="<?php print $widget->id; ?>">
+            <?php print $widget->label; ?>
+          </label>
+        <?php endif; ?>
+        <?php if (!empty($widget->operator)): ?>
+          <div class="views-operator">
+            <?php print $widget->operator; ?>
+          </div>
+        <?php endif; ?>
+        <div class="views-widget">
+          <?php print $widget->widget; ?>
+        </div>
+        <?php if (!empty($widget->description)): ?>
+          <div class="description">
+            <?php print $widget->description; ?>
+          </div>
+        <?php endif; ?>
+      </div>
+    <?php endforeach; ?>
+    <?php if (!empty($sort_by)): ?>
+      <div class="views-exposed-widget views-widget-sort-by">
+        <?php print $sort_by; ?>
+      </div>
+      <div class="views-exposed-widget views-widget-sort-order">
+        <?php print $sort_order; ?>
+      </div>
+    <?php endif; ?>
+    <?php if (!empty($items_per_page)): ?>
+      <div class="views-exposed-widget views-widget-per-page">
+        <?php print $items_per_page; ?>
+      </div>
+    <?php endif; ?>
+    <?php if (!empty($offset)): ?>
+      <div class="views-exposed-widget views-widget-offset">
+        <?php print $offset; ?>
+      </div>
+    <?php endif; ?>
+    <div class="views-exposed-widget views-submit-button">
+      <?php print $button; ?>
+    </div>
+    <?php if (!empty($reset_button)): ?>
+      <div class="views-exposed-widget views-reset-button">
+        <?php print $reset_button; ?>
+      </div>
+    <?php endif; ?>
+  </div>
+</div>
diff --git a/core/modules/views/templates/views-more.html.twig b/core/modules/views/templates/views-more.html.twig
deleted file mode 100644
index 9ab8295..0000000
--- a/core/modules/views/templates/views-more.html.twig
+++ /dev/null
@@ -1,20 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a views "more" link.
- *
- * Available variables:
- * - view: The view object.
- * - more_url: The URL for the views "more" link.
- * - link_text: The text for the views "more" link.
- *
- * @see template_preprocess()
- *
- * @ingroup themeable
- */
-#}
-<div class="more-link">
-  <a href="{{ more_url }}">
-    {{ link_text }}
-  </a>
-</div>
diff --git a/core/modules/views/templates/views-more.tpl.php b/core/modules/views/templates/views-more.tpl.php
new file mode 100644
index 0000000..0b7080b
--- /dev/null
+++ b/core/modules/views/templates/views-more.tpl.php
@@ -0,0 +1,19 @@
+<?php
+
+/**
+ * @file
+ * Theme the more link.
+ *
+ * - $view: The view object.
+ * - $more_url: the url for the more link.
+ * - $link_text: the text for the more link.
+ *
+ * @ingroup views_templates
+ */
+?>
+
+<div class="more-link">
+  <a href="<?php print $more_url ?>">
+    <?php print $link_text; ?>
+  </a>
+</div>
diff --git a/core/modules/views/templates/views-view-field.html.twig b/core/modules/views/templates/views-view-field.html.twig
deleted file mode 100644
index 759eb22..0000000
--- a/core/modules/views/templates/views-view-field.html.twig
+++ /dev/null
@@ -1,28 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a single field in a view.
- *
- * It is not actually used in default views, as this is registered as a theme
- * function which has better performance. For single overrides, the template is
- * perfectly okay.
- *
- * Available variables:
- * - view: The view that the field belongs to.
- * - field: The field handler that can process the input.
- * - row: The raw result of the database query that generated this field.
- * - output: The processed output that will normally be used.
- *
- * When fetching output from the row this construct should be used:
- * data = row[field.field_alias]
- *
- * The above will guarantee that you'll always get the correct data, regardless
- * of any changes in the aliasing that might happen if the view is modified.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_view_field()
- *
- * @ingroup themeable
- */
-#}
-{{ output }}
diff --git a/core/modules/views/templates/views-view-field.tpl.php b/core/modules/views/templates/views-view-field.tpl.php
new file mode 100644
index 0000000..91d92ee
--- /dev/null
+++ b/core/modules/views/templates/views-view-field.tpl.php
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * @file
+ * This template is used to print a single field in a view.
+ *
+ * It is not actually used in default Views, as this is registered as a theme
+ * function which has better performance. For single overrides, the template is
+ * perfectly okay.
+ *
+ * Variables available:
+ * - $view: The view object
+ * - $field: The field handler object that can process the input
+ * - $row: The raw SQL result that can be used
+ * - $output: The processed output that will normally be used.
+ *
+ * When fetching output from the $row, this construct should be used:
+ * $data = $row->{$field->field_alias}
+ *
+ * The above will guarantee that you'll always get the correct data,
+ * regardless of any changes in the aliasing that might happen if
+ * the view is modified.
+ */
+?>
+<?php print $output; ?>
diff --git a/core/modules/views/templates/views-view-grid.html.twig b/core/modules/views/templates/views-view-grid.html.twig
deleted file mode 100644
index 8ba3003..0000000
--- a/core/modules/views/templates/views-view-grid.html.twig
+++ /dev/null
@@ -1,36 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for views to display rows in a grid.
- *
- * Available variables:
- * - attributes: HTML attributes for the table element.
- * - title: The title of this group of rows.
- * - rows: A list of rows. Each row contains a list of columns.
- * - row_classes: HTML classes for each row including the row number and first
- *   or last.
- * - column_classes: HTML classes for each column including the row number and
- *   first or last.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_view_grid()
- *
- * @ingroup themeable
- */
-#}
-{% if title %}
-  <h3>{{ title }}</h3>
-{% endif %}
-<table{{ attributes }}>
-  <tbody>
-    {% for row_number, columns in rows %}
-      <tr{{ row_classes[row_number] }}>
-        {% for column_number, item in columns %}
-          <td{{ column_classes[row_number][column_number] }}>
-            {{ item }}
-          </td>
-        {% endfor %}
-      </tr>
-    {% endfor %}
-  </tbody>
-</table>
diff --git a/core/modules/views/templates/views-view-grid.tpl.php b/core/modules/views/templates/views-view-grid.tpl.php
new file mode 100644
index 0000000..43ba37b
--- /dev/null
+++ b/core/modules/views/templates/views-view-grid.tpl.php
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * @file
+ * Default simple view template to display a rows in a grid.
+ *
+ * - $rows contains a nested array of rows. Each row contains an array of
+ *   columns.
+ *
+ * @ingroup views_templates
+ */
+?>
+<?php if (!empty($title)) : ?>
+  <h3><?php print $title; ?></h3>
+<?php endif; ?>
+<table <?php print $attributes; ?>>
+  <tbody>
+    <?php foreach ($rows as $row_number => $columns): ?>
+      <tr <?php print $row_classes[$row_number]; ?>>
+        <?php foreach ($columns as $column_number => $item): ?>
+          <td <?php print $column_classes[$row_number][$column_number]; ?>>
+            <?php print $item; ?>
+          </td>
+        <?php endforeach; ?>
+      </tr>
+    <?php endforeach; ?>
+  </tbody>
+</table>
diff --git a/core/modules/views/templates/views-view-grouping.html.twig b/core/modules/views/templates/views-view-grouping.html.twig
deleted file mode 100644
index 2375eaf..0000000
--- a/core/modules/views/templates/views-view-grouping.html.twig
+++ /dev/null
@@ -1,23 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a single views grouping.
- *
- * Available variables:
- * - view: The view object.
- * - grouping: The grouping instruction.
- * - grouping_level: A number indicating the hierarchical level of the grouping.
- * - title: The group heading.
- * - content: The content to be grouped.
- * - rows: The rows returned from the view.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_view_grouping()
- *
- * @ingroup themeable
- */
-#}
-<div class="view-grouping">
-  <div class="view-grouping-header">{{ title }}</div>
-  <div class="view-grouping-content">{{ content }}</div>
-</div>
diff --git a/core/modules/views/templates/views-view-grouping.tpl.php b/core/modules/views/templates/views-view-grouping.tpl.php
new file mode 100644
index 0000000..ebf7bc2
--- /dev/null
+++ b/core/modules/views/templates/views-view-grouping.tpl.php
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * @file
+ * This template is used to print a single grouping in a view.
+ *
+ * It is not actually used in default Views, as this is registered as a theme
+ * function which has better performance. For single overrides, the template is
+ * perfectly okay.
+ *
+ * Variables available:
+ * - $view: The view object
+ * - $grouping: The grouping instruction.
+ * - $grouping_level: Integer indicating the hierarchical level of the grouping.
+ * - $rows: The rows contained in this grouping.
+ * - $title: The title of this grouping.
+ * - $content: The processed content output that will normally be used.
+ */
+?>
+<div class="view-grouping">
+  <div class="view-grouping-header"><?php print $title; ?></div>
+  <div class="view-grouping-content">
+    <?php print $content; ?>
+  </div>
+</div>
diff --git a/core/modules/views/templates/views-view-list.html.twig b/core/modules/views/templates/views-view-list.html.twig
deleted file mode 100644
index 5e2d2eb..0000000
--- a/core/modules/views/templates/views-view-list.html.twig
+++ /dev/null
@@ -1,44 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a view template to display a list of rows.
- *
- * Available variables:
- * - rows: A list of rows for this list.
- * - row_classes: The row's HTML attributes correlating with the row's 'id'.
- * - title: The title of this group of rows. May be empty.
- * - list: @todo.
- *   - type: Starting tag will be either a ul or ol.
- *   - attributes: HTML attributes for the list element.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_view_list()
- *
- * @ingroup themeable
- */
-#}
-{% if wrapper_attributes -%}
-  <div{{ wrapper_attributes }}>
-{% endif %}
-  {% if title %}
-    <h3>{{ title }}</h3>
-  {% endif %}
-
-  {% if list.type == 'ul' %}
-    <ul{{ list.attributes }}>
-  {% else %}
-    <ol{{ list.attributes }}>
-  {% endif %}
-
-    {% for id, row in rows %}
-      <li{{ row_classes[id] }}>{{ row }}</li>
-    {% endfor %}
-
-  {% if list.type == 'ul' %}
-    </ul>
-  {% else %}
-    </ol>
-  {% endif %}
-{% if wrapper_attributes -%}
-  </div>
-{% endif %}
diff --git a/core/modules/views/templates/views-view-list.tpl.php b/core/modules/views/templates/views-view-list.tpl.php
new file mode 100644
index 0000000..2c4b9c5
--- /dev/null
+++ b/core/modules/views/templates/views-view-list.tpl.php
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * @file
+ * Default simple view template to display a list of rows.
+ *
+ * - $title : The title of this group of rows.  May be empty.
+ * - $options['type'] will either be ul or ol.
+ * @ingroup views_templates
+ */
+?>
+<?php print $wrapper_prefix; ?>
+  <?php if (!empty($title)) : ?>
+    <h3><?php print $title; ?></h3>
+  <?php endif; ?>
+  <?php print $list_type_prefix; ?>
+    <?php foreach ($rows as $id => $row): ?>
+      <li <?php print $row_classes[$id]; ?>><?php print $row; ?></li>
+    <?php endforeach; ?>
+  <?php print $list_type_suffix; ?>
+<?php print $wrapper_suffix; ?>
diff --git a/core/modules/views/templates/views-view-row-rss.html.twig b/core/modules/views/templates/views-view-row-rss.html.twig
deleted file mode 100644
index 0622e09..0000000
--- a/core/modules/views/templates/views-view-row-rss.html.twig
+++ /dev/null
@@ -1,23 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display an item in a views RSS feed.
- *
- * Available variables:
- * - title: RSS item title.
- * - link: RSS item link.
- * - description: RSS body text.
- * - item_elements: RSS item elements rendered as XML (pubDate, creator, guid).
- *
- * @see template_preprocess()
- * @see template_preprocess_views_view_row_rss()
- *
- * @ingroup themeable
- */
-#}
-  <item>
-    <title>{{ title }}</title>
-    <link>{{ link }}</link>
-    <description>{{ description }}</description>
-    {{ item_elements }}
-  </item>
diff --git a/core/modules/views/templates/views-view-row-rss.tpl.php b/core/modules/views/templates/views-view-row-rss.tpl.php
new file mode 100644
index 0000000..01e0696
--- /dev/null
+++ b/core/modules/views/templates/views-view-row-rss.tpl.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @file
+ * Default view template to display a item in an RSS feed.
+ *
+ * @ingroup views_templates
+ */
+?>
+  <item>
+    <title><?php print $title; ?></title>
+    <link><?php print $link; ?></link>
+    <description><?php print $description; ?></description>
+    <?php print $item_elements; ?>
+  </item>
diff --git a/core/modules/views/templates/views-view-rss.html.twig b/core/modules/views/templates/views-view-rss.html.twig
deleted file mode 100644
index d223b05..0000000
--- a/core/modules/views/templates/views-view-rss.html.twig
+++ /dev/null
@@ -1,31 +0,0 @@
-{#
-/**
- * @file
- * Default template for feed displays that use the RSS style.
- *
- * Available variables:
- * - link: The link to the feed (the view path).
- * - namespaces: The XML namespaces (added automatically).
- * - title: The title of the feed (as set in the view).
- * - description: The feed description (from feed settings).
- * - langcode: The language encoding.
- * - channel_elements: The formatted channel elements.
- * - items: The feed items themselves.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_view_rss()
- *
- * @ingroup themeable
- */
-#}
-<?xml version="1.0" encoding="utf-8" ?>
-<rss version="2.0" xml:base="{{ link }}"{{ namespaces }}>
-  <channel>
-    <title>{{ title }}</title>
-    <link>{{ link }}</link>
-    <description>{{ description }}</description>
-    <language>{{ langcode }}</language>
-    {{ channel_elements }}
-    {{ items }}
-  </channel>
-</rss>
diff --git a/core/modules/views/templates/views-view-rss.tpl.php b/core/modules/views/templates/views-view-rss.tpl.php
new file mode 100644
index 0000000..18ca73e
--- /dev/null
+++ b/core/modules/views/templates/views-view-rss.tpl.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * @file
+ * Default template for feed displays that use the RSS style.
+ *
+ * @ingroup views_templates
+ */
+?>
+<?php print "<?xml"; ?> version="1.0" encoding="utf-8" <?php print "?>"; ?>
+<rss version="2.0" xml:base="<?php print $link; ?>"<?php print $namespaces; ?>>
+  <channel>
+    <title><?php print $title; ?></title>
+    <link><?php print $link; ?></link>
+    <description><?php print $description; ?></description>
+    <language><?php print $langcode; ?></language>
+    <?php print $channel_elements; ?>
+    <?php print $items; ?>
+  </channel>
+</rss>
diff --git a/core/modules/views/templates/views-view-summary-unformatted.html.twig b/core/modules/views/templates/views-view-summary-unformatted.html.twig
deleted file mode 100644
index 77f68a8..0000000
--- a/core/modules/views/templates/views-view-summary-unformatted.html.twig
+++ /dev/null
@@ -1,34 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for unformatted summary links.
- *
- * Available variables:
- * - rows: The rows contained in this view.
- *   - url: The URL to this row's content.
- *   - count: The number of items this summary item represents.
- *   - separator: A separator between each row.
- * - row_classes: HTML attributes for a row, either containing an 'active' class
- *   or no attributes, that correlate to each row by ID.
- * - options: Flags indicating how each row should be displayed. This contains:
- *   - count: A flag indicating whether the row's 'count' should be displayed.
- *   - inline: A flag indicating whether the item should be wrapped in an inline
- *     or block level HTML element.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_view_summary_unformatted()
- *
- * @ingroup themeable
- */
-#}
-{% for id, row in rows  %}
-  {{ options.inline ? '<span' : '<div' }} class="views-summary views-summary-unformatted">
-  {% if row.separator -%}
-    {{ row.separator }}
-  {%- endif %}
-  <a href="{{ row.url }}"{{ row_classes[id] }}>{{ row.link }}</a>
-  {% if options.count %}
-    ({{ row.count }})
-  {% endif %}
-  {{ options.inline ? '</span>' : '</div>' }}
-{% endfor %}
diff --git a/core/modules/views/templates/views-view-summary-unformatted.tpl.php b/core/modules/views/templates/views-view-summary-unformatted.tpl.php
new file mode 100644
index 0000000..2280a71
--- /dev/null
+++ b/core/modules/views/templates/views-view-summary-unformatted.tpl.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * @file
+ * Default simple view template to display a group of summary lines.
+ *
+ * This wraps items in a span if set to inline, or a div if not.
+ *
+ * @ingroup views_templates
+ */
+?>
+<?php foreach ($rows as $id => $row): ?>
+  <?php print (!empty($options['inline']) ? '<span' : '<div') . ' class="views-summary views-summary-unformatted">'; ?>
+    <?php if (!empty($row->separator)): ?><? print $row->separator; ?><?php endif; ?>
+    <a href="<?php print $row->url; ?>"<?php print $row_classes[$id]; ?>><?php print $row->link; ?></a>
+    <?php if (!empty($options['count'])): ?>
+      (<?php print $row->count; ?>)
+    <?php endif; ?>
+  <?php print !empty($options['inline']) ? '</span>' : '</div>'; ?>
+<?php endforeach; ?>
diff --git a/core/modules/views/templates/views-view-summary.html.twig b/core/modules/views/templates/views-view-summary.html.twig
deleted file mode 100644
index cffc2bc..0000000
--- a/core/modules/views/templates/views-view-summary.html.twig
+++ /dev/null
@@ -1,34 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a list of summary lines.
- *
- * Available variables:
- * - rows: The rows contained in this view.
- *   Each row contains:
- *   - url: The summary link URL.
- *   - link: The summary link text.
- *   - count: The number of items under this grouping.
- * - row_classes: HTML classes to apply to each row, indexed by row ID.
- *   This matches the index in rows.
- * - options: Flags indicating how the summary should be displayed.
- *   This contains:
- *   - count: A flag indicating whether the count should be displayed.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_view_summary()
- *
- * @ingroup themeable
- */
-#}
-<div class="item-list">
-  <ul class="views-summary">
-  {% for id, row in rows %}
-    <li><a href="{{ row.url }}"{{ row_classes[id] }}>{{ row.link }}</a>
-      {% if options.count %}
-        ({{ row.count }})
-      {% endif %}
-    </li>
-  {% endfor %}
-  </ul>
-</div>
diff --git a/core/modules/views/templates/views-view-summary.tpl.php b/core/modules/views/templates/views-view-summary.tpl.php
new file mode 100644
index 0000000..ce51e70
--- /dev/null
+++ b/core/modules/views/templates/views-view-summary.tpl.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * @file
+ * Default simple view template to display a list of summary lines.
+ *
+ * @ingroup views_templates
+ */
+?>
+<div class="item-list">
+  <ul class="views-summary">
+  <?php foreach ($rows as $id => $row): ?>
+    <li><a href="<?php print $row->url; ?>"<?php print $row_classes[$id]; ?>><?php print $row->link; ?></a>
+      <?php if (!empty($options['count'])): ?>
+        (<?php print $row->count?>)
+      <?php endif; ?>
+    </li>
+  <?php endforeach; ?>
+  </ul>
+</div>
diff --git a/core/modules/views/templates/views-view-table.html.twig b/core/modules/views/templates/views-view-table.html.twig
deleted file mode 100644
index 50ae9d6..0000000
--- a/core/modules/views/templates/views-view-table.html.twig
+++ /dev/null
@@ -1,54 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for displaying a view as a table.
- *
- * Available variables:
- * - attributes: Remaining HTML attributes for the element.
- *   - class: HTML classes that can be used to style contextually through CSS.
- * - title : The title of this group of rows.
- * - header: Header labels.
- * - header_classes: HTML classes to apply to each header cell, indexed by
- *   the header's key.
- * - rows: Table row items. Rows are keyed by row number, fields within rows
- *   are keyed by field ID.
- *   - field: Table data field ID.
- *   - content: Table data content.
- * - row_classes: HTML classes to apply to each row, indexed by row number.
- *   This matches the index in rows.
- * - field_classes: HTML classes to apply to each row, indexed by row number.
- *   This matches the index in columns and rows.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_view_table()
- *
- * @ingroup themeable
- */
-#}
-<table{{ attributes }}>
-  {% if title is not empty %}
-    <caption>{{ title }}</caption>
-  {% endif %}
-  {% if header %}
-    <thead>
-      <tr>
-        {% for key, field in header %}
-          <th{{ header_classes[key] }} scope="col">
-            {{ field }}
-          </th>
-        {% endfor %}
-      </tr>
-    </thead>
-  {% endif %}
-  <tbody>
-    {% for row_count, row in rows %}
-      <tr{{ row_classes[row_count] }}>
-        {% for field, content in row %}
-          <td{{ field_classes[field][row_count] }}>
-            {{ content }}
-          </td>
-        {% endfor %}
-      </tr>
-    {% endfor %}
-  </tbody>
-</table>
diff --git a/core/modules/views/templates/views-view-table.tpl.php b/core/modules/views/templates/views-view-table.tpl.php
new file mode 100644
index 0000000..4d44d42
--- /dev/null
+++ b/core/modules/views/templates/views-view-table.tpl.php
@@ -0,0 +1,48 @@
+<?php
+
+/**
+ * @file
+ * Template to display a view as a table.
+ *
+ * - $title : The title of this group of rows.  May be empty.
+ * - $header: An array of header labels keyed by field id.
+ * - $header_classes: An array of header classes keyed by field id.
+ * - $fields: An array of CSS IDs to use for each field id.
+ * - $classes: A class or classes to apply to the table, based on settings.
+ * - $row_classes: An array of classes to apply to each row, indexed by row
+ *   number. This matches the index in $rows.
+ * - $rows: An array of row items. Each row is an array of content.
+ *   $rows are keyed by row number, fields within rows are keyed by field ID.
+ * - $field_classes: An array of classes to apply to each field, indexed by
+ *   field id, then row number. This matches the index in $rows.
+ * @ingroup views_templates
+ */
+
+?>
+<table <?php print $attributes; ?>>
+  <?php if (!empty($title)) : ?>
+    <caption><?php print $title; ?></caption>
+  <?php endif; ?>
+  <?php if (!empty($header)) : ?>
+    <thead>
+      <tr>
+        <?php foreach ($header as $field => $label): ?>
+          <th <?php print $header_classes[$field]; ?> scope="col">
+            <?php print $label; ?>
+          </th>
+        <?php endforeach; ?>
+      </tr>
+    </thead>
+  <?php endif; ?>
+  <tbody>
+    <?php foreach ($rows as $row_count => $row): ?>
+      <tr <?php print $row_classes[$row_count]; ?>>
+        <?php foreach ($row as $field => $content): ?>
+          <td <?php print $field_classes[$field][$row_count]; ?>>
+            <?php print $content; ?>
+          </td>
+        <?php endforeach; ?>
+      </tr>
+    <?php endforeach; ?>
+  </tbody>
+</table>
diff --git a/core/modules/views/templates/views-view-unformatted.html.twig b/core/modules/views/templates/views-view-unformatted.html.twig
deleted file mode 100644
index 47a66cf..0000000
--- a/core/modules/views/templates/views-view-unformatted.html.twig
+++ /dev/null
@@ -1,24 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a view of unformatted rows.
- *
- * Available variables:
- * - title: The title of this group of rows. May be empty.
- * - rows: A list of the view's row items.
- * - row_classes: A list of row class attributes keyed by the row's ID.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_view_unformatted()
- *
- * @ingroup themeable
- */
-#}
-{% if title %}
-  <h3>{{ title }}</h3>
-{% endif %}
-{% for id, row in rows %}
-  <div{{ row_classes[id] }}>
-    {{ row }}
-  </div>
-{% endfor %}
diff --git a/core/modules/views/templates/views-view-unformatted.tpl.php b/core/modules/views/templates/views-view-unformatted.tpl.php
new file mode 100644
index 0000000..b7f63b9
--- /dev/null
+++ b/core/modules/views/templates/views-view-unformatted.tpl.php
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * @file
+ * Default simple view template to display a list of rows.
+ *
+ * @ingroup views_templates
+ */
+?>
+<?php if (!empty($title)): ?>
+  <h3><?php print $title; ?></h3>
+<?php endif; ?>
+<?php foreach ($rows as $id => $row): ?>
+  <div <?php print $row_classes[$id]; ?>>
+    <?php print $row; ?>
+  </div>
+<?php endforeach; ?>
diff --git a/core/modules/views/tests/Drupal/Tests/views/UI/ViewsUITest.php b/core/modules/views/tests/Drupal/Tests/views/UI/ViewsUITest.php
index a9862f4..5ae1122 100644
--- a/core/modules/views/tests/Drupal/Tests/views/UI/ViewsUITest.php
+++ b/core/modules/views/tests/Drupal/Tests/views/UI/ViewsUITest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\Tests\UI\ViewsUITest.
  */
 
-namespace Drupal\views\Tests\views\UI;
+namespace Drupal\Tests\views\UI;
 
 use Drupal\Tests\UnitTestCase;
 use Drupal\views_ui\Form\Ajax\RearrangeFilter;
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index 09d8c6e..61826f8 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -168,8 +168,9 @@ function views_theme($existing, $type, $theme, $path) {
   );
 
   $hooks['views_more'] = $base + array(
-    'variables' => array('more_url' => NULL, 'link_text' => 'more', 'view' => NULL),
     'template' => 'views-more',
+    'pattern' => 'views_more__',
+    'variables' => array('more_url' => NULL, 'link_text' => 'more', 'view' => NULL),
   );
 
   return $hooks;
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index 7b47475..e987ffd 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -296,19 +296,8 @@ function template_preprocess_views_view_fields(&$vars) {
 }
 
 /**
- * Prepares variables for views single grouping templates.
- *
- * Default template: views-view-grouping.html.twig.
- *
- * @param array $vars
- *   An associative array containing:
- *   - view: The view object.
- *   - rows: The rows returned from the view.
- *   - grouping_level: Integer indicating the hierarchical level of the
- *     grouping.
- *   - content: The content to be grouped.
- *   - title: The group heading.
-  */
+ * Process a single grouping within a view.
+ */
 function template_preprocess_views_view_grouping(&$vars) {
   $vars['content'] = $vars['view']->style_plugin->render_grouping_sets($vars['rows'], $vars['grouping_level']);
 }
@@ -328,35 +317,21 @@ function theme_views_view_field($vars) {
 }
 
 /**
- * Prepares variables for views field templates.
- *
- * Default template: views-view-field.html.twig.
+ * Process a single field within a view.
  *
- * @param array $vars
- *   An associative array containing:
- *   - field: The field handler object for the current field.
- *   - row: Object representing the raw result of the SQL query for the current
- *     field.
- *   - view: Instance of the ViewExecutable object for the parent view.
+ * This preprocess function isn't normally run, as a function is used by
+ * default, for performance. However, by creating a template, this
+ * preprocess should get picked up.
  */
 function template_preprocess_views_view_field(&$vars) {
   $vars['output'] = $vars['field']->advanced_render($vars['row']);
 }
 
 /**
- * Prepares variables for views summary templates.
- *
- * The summary prints a single record from a row, with fields.
- *
- * Default template: views-view-summary.html.twig.
- *
- * @param array $vars
- *   An associative array containing:
- *   - view: A ViewExecutable object.
- *   - rows: The raw row data.
+ * Preprocess theme function to print a single record from a row, with fields
  */
 function template_preprocess_views_view_summary(&$vars) {
-  $view = $vars['view'];
+  $view     = $vars['view'];
   $argument = $view->argument[$view->build_info['summary_level']];
   $vars['row_classes'] = array();
 
@@ -371,9 +346,8 @@ function template_preprocess_views_view_summary(&$vars) {
     url(current_path()), // could be an alias
   ));
 
-  // Collect all arguments foreach row, to be able to alter them for example
-  // by the validator. This is not done per single argument value, because this
-  // could cause performance problems.
+  // Collect all arguments foreach row, to be able to alter them for example by the validator.
+  // This is not done per single argument value, because this could cause performance problems.
   $row_args = array();
 
   foreach ($vars['rows'] as $id => $row) {
@@ -382,6 +356,7 @@ function template_preprocess_views_view_summary(&$vars) {
   $argument->process_summary_arguments($row_args);
 
   foreach ($vars['rows'] as $id => $row) {
+
     $vars['rows'][$id]->link = $argument->summary_name($row);
     $args = $view->args;
     $args[$argument->position] = $row_args[$id];
@@ -392,6 +367,7 @@ function template_preprocess_views_view_summary(&$vars) {
     }
     $vars['rows'][$id]->url = url($view->getUrl($args, $base_path), $url_options);
     $vars['rows'][$id]->count = intval($row->{$argument->count_alias});
+
     $vars['row_classes'][$id] = array();
     if (isset($active_urls[$vars['rows'][$id]->url])) {
       $vars['row_classes'][$id]['class'][] = 'active';
@@ -401,20 +377,11 @@ function template_preprocess_views_view_summary(&$vars) {
 }
 
 /**
- * Prepares variables for unformatted summary view templates.
- *
- * Default template: views-view-summary-unformatted.html.twig.
- *
- * @param array $vars
- *   An associative array containing:
- *   - view: A ViewExecutable object.
- *   - rows: The raw row data.
- *   - options: An array of options. Each option contains:
- *     - separator: A string to be placed between inline fields to keep them
- *       visually distinct.
+ * Template preprocess theme function to print summary basically
+ * unformatted.
  */
 function template_preprocess_views_view_summary_unformatted(&$vars) {
-  $view = $vars['view'];
+  $view     = $vars['view'];
   $argument = $view->argument[$view->build_info['summary_level']];
   $vars['row_classes'] = array();
 
@@ -426,15 +393,12 @@ function template_preprocess_views_view_summary_unformatted(&$vars) {
 
   $count = 0;
   $active_urls = drupal_map_assoc(array(
-    // Force system path.
-    url(current_path(), array('alias' => TRUE)),
-    // Could be an alias.
-    url(current_path()),
+    url(current_path(), array('alias' => TRUE)), // force system path
+    url(current_path()), // could be an alias
   ));
 
-  // Collect all arguments for each row, to be able to alter them for example
-  // by the validator. This is not done per single argument value, because
-  // this could cause performance problems.
+  // Collect all arguments foreach row, to be able to alter them for example by the validator.
+  // This is not done per single argument value, because this could cause performance problems.
   $row_args = array();
   foreach ($vars['rows'] as $id => $row) {
     $row_args[$id] = $argument->summary_argument($row);
@@ -442,7 +406,7 @@ function template_preprocess_views_view_summary_unformatted(&$vars) {
   $argument->process_summary_arguments($row_args);
 
   foreach ($vars['rows'] as $id => $row) {
-    // Only false on first time.
+    // only false on first time:
     if ($count++) {
       $vars['rows'][$id]->separator = filter_xss_admin($vars['options']['separator']);
     }
@@ -465,52 +429,44 @@ function template_preprocess_views_view_summary_unformatted(&$vars) {
 }
 
 /**
- * Prepares variables for views table templates.
- *
- * Default template: views-view-table.html.twig.
- *
- * @param array $vars
- *   An associative array containing:
- *   - view: A ViewExecutable object.
- *   - rows: The raw row data.
+ * Display a view as a table style.
  */
 function template_preprocess_views_view_table(&$vars) {
-  $view = $vars['view'];
+  $view     = $vars['view'];
 
-  // We need the raw data for this grouping, which is passed in
-  // as $vars['rows'].
+  // We need the raw data for this grouping, which is passed in as $vars['rows'].
   // However, the template also needs to use for the rendered fields.  We
   // therefore swap the raw data out to a new variable and reset $vars['rows']
   // so that it can get rebuilt.
   // Store rows so that they may be used by further preprocess functions.
-  $result = $vars['result'] = $vars['rows'];
+  $result   = $vars['result'] = $vars['rows'];
   $vars['rows'] = array();
   $vars['field_classes'] = array();
   $vars['header'] = array();
 
-  $options = $view->style_plugin->options;
-  $handler = $view->style_plugin;
+  $options  = $view->style_plugin->options;
+  $handler  = $view->style_plugin;
 
   $default_row_class = isset($options['default_row_class']) ? $options['default_row_class'] : TRUE;
   $row_class_special = isset($options['row_class_special']) ? $options['row_class_special'] : TRUE;
 
-  $fields = &$view->field;
-  $columns = $handler->sanitize_columns($options['columns'], $fields);
+  $fields   = &$view->field;
+  $columns  = $handler->sanitize_columns($options['columns'], $fields);
 
-  $active = !empty($handler->active) ? $handler->active : '';
-  $order = !empty($handler->order) ? $handler->order : 'asc';
+  $active   = !empty($handler->active) ? $handler->active : '';
+  $order    = !empty($handler->order) ? $handler->order : 'asc';
 
   // A boolean variable which stores whether the table has a responsive class.
   $responsive = FALSE;
 
-  $query = tablesort_get_query_parameters();
+  $query    = tablesort_get_query_parameters();
   if (isset($view->exposed_raw_input)) {
     $query += $view->exposed_raw_input;
   }
 
   foreach ($columns as $field => $column) {
-    // Create a second variable so we can easily find what fields we have and
-    // what the CSS classes should be.
+    // Create a second variable so we can easily find what fields we have and what the
+    // CSS classes should be.
     $vars['fields'][$field] = drupal_clean_css_identifier($field);
     if ($active == $field) {
       $vars['fields'][$field] .= ' active';
@@ -560,10 +516,11 @@ function template_preprocess_views_view_table(&$vars) {
         $vars['header_classes'][$field]['class'][] = $options['info'][$field]['responsive'];
         $responsive = TRUE;
       }
-      // Add a CSS align class to each field if one was set.
+      // Add a CSS align class to each field if one was set
       if (!empty($options['info'][$field]['align'])) {
         $vars['header_classes'][$field]['class'][] = drupal_clean_css_identifier($options['info'][$field]['align']);
       }
+
       // Add a header label wrapper if one was selected.
       if ($vars['header'][$field]) {
         $element_label_type = $fields[$field]->element_label_type(TRUE, TRUE);
@@ -571,16 +528,17 @@ function template_preprocess_views_view_table(&$vars) {
           $vars['header'][$field] = '<' . $element_label_type . '>' . $vars['header'][$field] . '</' . $element_label_type . '>';
         }
       }
+
     }
 
-    // Add a CSS align class to each field if one was set.
+    // Add a CSS align class to each field if one was set
     if (!empty($options['info'][$field]['align'])) {
       $vars['fields'][$field] .= ' ' . drupal_clean_css_identifier($options['info'][$field]['align']);
     }
 
     // Render each field into its appropriate column.
     foreach ($result as $num => $row) {
-      // Add field classes.
+      // Add field classes
       $vars['field_classes'][$field][$num] = array();
       if ($fields[$field]->options['element_default_classes']) {
         $vars['field_classes'][$field][$num]['class'][] = 'views-field';
@@ -617,12 +575,12 @@ function template_preprocess_views_view_table(&$vars) {
         else {
           $vars['rows'][$num][$column] = '';
         }
+
         $vars['rows'][$num][$column] .= $field_output;
       }
     }
 
-    // Remove columns if the option is hide empty column is checked and the
-    // field is not empty.
+    // Remove columns if the option is hide empty column is checked and the field is not empty.
     if (!empty($options['info'][$field]['empty_column'])) {
       $empty = TRUE;
       foreach ($vars['rows'] as $num => $columns) {
@@ -681,7 +639,7 @@ function template_preprocess_views_view_table(&$vars) {
   $vars['attributes']['class'][] = 'cols-' . count($vars['header']);
 
   if (!empty($handler->options['summary'])) {
-    $vars['attributes']['summary'] = $handler->options['summary'];
+    $vars['attributes_array'] = array('summary' => $handler->options['summary']);
   }
   // If the table has headers and it should react responsively to columns hidden
   // with the classes represented by the constants RESPONSIVE_PRIORITY_MEDIUM
@@ -695,23 +653,17 @@ function template_preprocess_views_view_table(&$vars) {
 }
 
 /**
- * Prepares variables for views grid style templates.
- *
- * Default template: views-view-grid.html.twig.
- *
- * @param array $vars
- *   An associative array containing:
- *   - view: The view object.
- *   - rows: An array of row items. Each row is an array of content.
+ * Display a view as a grid style.
  */
 function template_preprocess_views_view_grid(&$vars) {
-  $view = $vars['view'];
-  $options = $view->style_plugin->options;
-  $handler = $view->style_plugin;
+  $view     = $vars['view'];
+  $result   = $view->result;
+  $options  = $view->style_plugin->options;
+  $handler  = $view->style_plugin;
   $default_row_class = isset($options['default_row_class']) ? $options['default_row_class'] : TRUE;
   $row_class_special = isset($options['row_class_special']) ? $options['row_class_special'] : TRUE;
 
-  $columns = $options['columns'];
+  $columns  = $options['columns'];
   $vars['attributes']['class'][] = 'views-view-grid cols-' . $columns;
 
   $rows = array();
@@ -766,14 +718,14 @@ function template_preprocess_views_view_grid(&$vars) {
       }
     }
     for ($i = 0; $i < count($rows[0]); $i++) {
-      // This should be a string so this is ok.
+      // This should be string so that's okay :)
       if (!isset($rows[count($rows) - 1][$i])) {
         $rows[count($rows) - 1][$i] = '';
       }
     }
   }
 
-  // Apply the row classes.
+  // Apply the row classes
   foreach ($rows as $row_number => $row) {
     $row_classes = array();
     if ($default_row_class) {
@@ -810,19 +762,21 @@ function template_preprocess_views_view_grid(&$vars) {
   }
   $vars['rows'] = $rows;
   if (!empty($handler->options['summary'])) {
-    $vars['attributes']['summary'] = $handler->options['summary'];
+    $vars['attributes_array'] = array('summary' => $handler->options['summary']);
+  }
+  // If the table has headers and it should react responsively to columns hidden
+  // with the classes represented by the constants RESPONSIVE_PRIORITY_MEDIUM
+  // and RESPONSIVE_PRIORITY_LOW, add the tableresponsive behaviors.
+  if (count($vars['header']) && $responsive) {
+    $vars['view']->element['#attached']['library'][] = array('system', 'drupal.tableresponsive');
+    // Add 'responsive-enabled' class to the table to identify it for JS.
+    // This is needed to target tables constructed by this function.
+    $vars['attributes']['class'][] = 'responsive-enabled';
   }
 }
 
 /**
- * Prepares variables for views unformatted rows templates.
- *
- * Default template: views-view-unformatted.html.twig.
- *
- * @param array $vars
- *   An associative array containing:
- *   - view: The view object.
- *   - rows: An array of row items. Each row is an array of content.
+ * Display the simple view of rows one after another
  */
 function template_preprocess_views_view_unformatted(&$vars) {
   $view = $vars['view'];
@@ -862,16 +816,10 @@ function template_preprocess_views_view_unformatted(&$vars) {
 }
 
 /**
- * Prepares variables for Views HTML list templates.
- *
- * Default template: views-view-list.html.twig.
- *
- * @param array $variables
- *   An associative array containing:
- *   - view: A View object.
+ * Display the view as an HTML list element
  */
-function template_preprocess_views_view_list(&$variables) {
-  $handler  = $variables['view']->style_plugin;
+function template_preprocess_views_view_list(&$vars) {
+  $handler  = $vars['view']->style_plugin;
 
   // Fetch classes from handler options.
   $class = explode(' ', $handler->options['class']);
@@ -881,35 +829,33 @@ function template_preprocess_views_view_list(&$variables) {
   $wrapper_class = explode(' ', $handler->options['wrapper_class']);
   $wrapper_class = array_map('drupal_clean_css_identifier', $wrapper_class);
 
+  // Initialize a new attribute class for $class.
+  $attributes = new Attribute(array('class' => $class));
+
   // Initialize a new attribute class for $wrapper_class.
   if ($wrapper_class) {
-    $variables['wrapper_attributes'] = new Attribute(array('class' => $wrapper_class));
+    $wrapper_class = new Attribute(array('class' => $wrapper_class));
+    $vars['wrapper_prefix'] = '<div' . $wrapper_class . '>';
+    $vars['wrapper_suffix'] = '</div>';
   }
 
-  // Initialize a new attribute class for $class.
-  $variables['list']['attributes'] = new Attribute(array('class' => $class));
-  $variables['list']['type'] = $handler->options['type'];
+  $vars['list_type_prefix'] = '<' . $handler->options['type'] . $attributes . '>';
+  $vars['list_type_suffix'] = '</' . $handler->options['type'] . '>';
 
-  template_preprocess_views_view_unformatted($variables);
+  template_preprocess_views_view_unformatted($vars);
 }
 
 /**
- * Prepares variables for RSS feed templates.
- *
- * Default template: views-view-rss.html.twig.
- *
- * @param array $vars
- *   An associative array containing:
- *   - view: A ViewExecutable object.
- *   - rows: The raw row data.
-*/
+ * Preprocess an RSS feed
+ */
 function template_preprocess_views_view_rss(&$vars) {
   global $base_url;
 
-  $view = $vars['view'];
-  $items = $vars['rows'];
+  $view     = &$vars['view'];
+  $options  = &$vars['options'];
+  $items    = &$vars['rows'];
 
-  $style = $view->style_plugin;
+  $style    = &$view->style_plugin;
 
   $config = config('system.site');
 
@@ -929,8 +875,8 @@ function template_preprocess_views_view_rss(&$vars) {
   }
   $vars['title'] = check_plain($title);
 
-  // Figure out which display which has a path we're using for this feed. If
-  // there isn't one, use the global $base_url
+  // Figure out which display which has a path we're using for this feed. If there isn't
+  // one, use the global $base_url
   $link_display_id = $view->display_handler->getLinkDisplay();
   if ($link_display_id && $display = $view->displayHandlers->get($link_display_id)) {
     $path = $view->displayHandlers->get($link_display_id)->getPath();
@@ -943,8 +889,7 @@ function template_preprocess_views_view_rss(&$vars) {
       $url_options['query'] = $view->exposed_raw_input;
     }
 
-    // Compare the link to the default home page; if it's the default home page,
-    // just use $base_url.
+    // Compare the link to the default home page; if it's the default home page, just use $base_url.
     if ($path == $config->get('page.front')) {
       $path = '';
     }
@@ -965,16 +910,12 @@ function template_preprocess_views_view_rss(&$vars) {
 }
 
 /**
- * Prepares variables for views RSS item templates.
- *
- * Default template: views-view-row-rss.html.twig.
- *
- * @param array $vars
- *   An associative array containing:
- *   - row: The raw results rows.
+ * Default theme function for all RSS rows.
  */
 function template_preprocess_views_view_row_rss(&$vars) {
-  $item = $vars['row'];
+  $view     = &$vars['view'];
+  $options  = &$vars['options'];
+  $item     = &$vars['row'];
 
   $vars['title'] = check_plain($item->title);
   $vars['link'] = check_url($item->link);
@@ -983,57 +924,49 @@ function template_preprocess_views_view_row_rss(&$vars) {
 }
 
 /**
- * Prepares variables for views exposed form templates.
- *
- * Default template: views-exposed-form.html.twig.
- *
- * @param array $vars
- *   An associative array containing:
- *   - form: A render element representing the form.
+ * Default theme function for all filter forms.
  */
 function template_preprocess_views_exposed_form(&$vars) {
   $form = &$vars['form'];
 
   // Put all single checkboxes together in the last spot.
-  $checkboxes = array();
+  $checkboxes = '';
 
   if (!empty($form['q'])) {
-    $vars['q'] = $form['q'];
+    $vars['q'] = drupal_render($form['q']);
   }
 
   $vars['widgets'] = array();
   foreach ($form['#info'] as $id => $info) {
     // Set aside checkboxes.
     if (isset($form[$info['value']]['#type']) && $form[$info['value']]['#type'] == 'checkbox') {
-      $checkboxes[] = $form[$info['value']];
+      $checkboxes .= drupal_render($form[$info['value']]);
       continue;
     }
     $widget = new stdClass();
     // set up defaults so that there's always something there.
-    $widget->label = $widget->operator = $widget->widget = $widget->description = '';
+    $widget->label = $widget->operator = $widget->widget = $widget->description = NULL;
 
     $widget->id = isset($form[$info['value']]['#id']) ? $form[$info['value']]['#id'] : '';
 
     if (!empty($info['label'])) {
       $widget->label = check_plain($info['label']);
     }
-    if (!empty($info['operator']) && isset($form[$info['operator']])) {
-      $widget->operator = $form[$info['operator']];
+    if (!empty($info['operator'])) {
+      $widget->operator = drupal_render($form[$info['operator']]);
     }
 
-    $widget->widget = $form[$info['value']];
+    $widget->widget = drupal_render($form[$info['value']]);
 
     if (!empty($info['description'])) {
       $widget->description = check_plain($info['description']);
     }
 
     $vars['widgets'][$id] = $widget;
-    // Unset the widget, so that it doesn't get rendered twice.
-    unset($form[$info['value']]);
   }
 
   // Wrap up all the checkboxes we set aside into a widget.
-  if (!empty($checkboxes)) {
+  if ($checkboxes) {
     $widget = new stdClass();
     // set up defaults so that there's always something there.
     $widget->label = $widget->operator = $widget->widget = NULL;
@@ -1041,6 +974,22 @@ function template_preprocess_views_exposed_form(&$vars) {
     $widget->widget = $checkboxes;
     $vars['widgets']['checkboxes'] = $widget;
   }
+
+  if (isset($form['sort_by'])) {
+    $vars['sort_by'] = drupal_render($form['sort_by']);
+    $vars['sort_order'] = drupal_render($form['sort_order']);
+  }
+  if (isset($form['items_per_page'])) {
+    $vars['items_per_page'] = drupal_render($form['items_per_page']);
+  }
+  if (isset($form['offset'])) {
+    $vars['offset'] = drupal_render($form['offset']);
+  }
+  if (isset($form['reset'])) {
+    $vars['reset_button'] = drupal_render($form['reset']);
+  }
+  // This includes the submit button.
+  $vars['button'] = drupal_render_children($form);
 }
 
 /**
@@ -1150,7 +1099,7 @@ function theme_views_mini_pager($vars) {
  * example, arguments which provide a summary view might change the style to
  * one of the special summary styles.
  *
- * The default style for all views is views-view-unformatted.html.twig.
+ * The default style for all views is views-view-unformatted.tpl.php
  *
  * Many styles will then farm out the actual display of each row to a row
  * style; the default row style is views-view-fields.tpl.php.
@@ -1165,10 +1114,10 @@ function theme_views_mini_pager($vars) {
  * - views-view--foobar.tpl.php
  * - views-view.tpl.php
  *
- * - views-view-unformatted--foobar--page.html.twig
- * - views-view-unformatted--page.html.twig
- * - views-view-unformatted--foobar.html.twig
- * - views-view-unformatted.html.twig
+ * - views-view-unformatted--foobar--page.tpl.php
+ * - views-view-unformatted--page.tpl.php
+ * - views-view-unformatted--foobar.tpl.php
+ * - views-view-unformatted.tpl.php
  *
  * - views-view-fields--foobar--page.tpl.php
  * - views-view-fields--page.tpl.php
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
index 9f3e0b6..90c78e3 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
@@ -590,7 +590,7 @@ public function submitDisplayDelete($form, &$form_state) {
    * @param \Drupal\views_ui\ViewUI $view
    *   The view to regenerate its tab.
    * @param \Drupal\Core\Ajax\AjaxResponse $response
-   *   The response object to add new commands to.
+   *   The response object to add commands to.
    * @param string $display_id
    *   The display ID of the tab to regenerate.
    */
diff --git a/core/modules/views_ui/templates/views-ui-display-tab-bucket.html.twig b/core/modules/views_ui/templates/views-ui-display-tab-bucket.html.twig
deleted file mode 100644
index 1c99ae8..0000000
--- a/core/modules/views_ui/templates/views-ui-display-tab-bucket.html.twig
+++ /dev/null
@@ -1,26 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for each "box" on the display query edit screen.
- *
- * Available variables:
- * - attributes: HTML attributes to apply to the container element.
- * - actions: Action links such as "Add", "And/Or, Rearrange" for the content.
- * - title: The title of the bucket, e.g. "Fields", "Filter Criteria", etc.
- * - content: Content items such as fields or settings in this container.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_ui_display_tab_bucket()
- *
- * @ingroup themeable
- */
-#}
-<div{{ attributes }}>
-  {% if title -%}
-    <h3>{{ title }}</h3>
-  {%- endif %}
-  {{ content }}
-  {% if actions -%}
-    {{ actions }}
-  {%- endif %}
-</div>
diff --git a/core/modules/views_ui/templates/views-ui-display-tab-bucket.tpl.php b/core/modules/views_ui/templates/views-ui-display-tab-bucket.tpl.php
new file mode 100644
index 0000000..1f643ed
--- /dev/null
+++ b/core/modules/views_ui/templates/views-ui-display-tab-bucket.tpl.php
@@ -0,0 +1,16 @@
+<?php
+
+/**
+ * @file
+ * Template for each "box" on the display query edit screen.
+ */
+?>
+<div <?php print $attributes; ?>>
+  <?php if (!empty($title)) : ?>
+    <h3><?php print $title; ?></h3>
+  <?php endif; ?>
+  <?php print $content; ?>
+  <?php if (!empty($actions)) : ?>
+    <?php print $actions; ?>
+  <?php endif; ?>
+</div>
diff --git a/core/modules/views_ui/templates/views-ui-display-tab-setting.html.twig b/core/modules/views_ui/templates/views-ui-display-tab-setting.html.twig
deleted file mode 100644
index 1b44d68..0000000
--- a/core/modules/views_ui/templates/views-ui-display-tab-setting.html.twig
+++ /dev/null
@@ -1,26 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for Views UI display tab settings.
- *
- * Template for each row inside the "boxes" on the display query edit screen.
- *
- * Available variables:
- * - attributes: HTML attributes such as class for the container.
- * - description: The description or label for this setting.
- * - settings_links: A list of links for this setting.
- *
- * @see template_preprocess()
- * @see template_preprocess_views_ui_display_tab_setting()
- *
- * @ingroup themeable
- */
-#}
-<div{{ attributes }}>
-  {% if description -%}
-    <span class="label">{{ description }}</span>
-  {%- endif %}
-  {% if settings_links %}
-    {{ settings_links|join('<span class="label">&nbsp;|&nbsp;</span>') }}
-  {% endif %}
-</div>
diff --git a/core/modules/views_ui/templates/views-ui-display-tab-setting.tpl.php b/core/modules/views_ui/templates/views-ui-display-tab-setting.tpl.php
new file mode 100644
index 0000000..be294b6
--- /dev/null
+++ b/core/modules/views_ui/templates/views-ui-display-tab-setting.tpl.php
@@ -0,0 +1,15 @@
+<?php
+
+/**
+ * @file
+ * Template for each row inside the "boxes" on the display query edit screen.
+ */
+?>
+<div class="views-display-setting <?php print $attributes['class']; ?> <?php print $zebra; ?> clearfix" <?php print $attributes; ?>>
+  <?php if ($description): ?>
+    <span class="label"><?php print $description; ?></span>
+  <?php endif; ?>
+  <?php if ($settings_links): ?>
+    <?php print $settings_links; ?>
+  <?php endif; ?>
+</div>
diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module
index 0d461be..b1666d3 100644
--- a/core/modules/views_ui/views_ui.module
+++ b/core/modules/views_ui/views_ui.module
@@ -31,7 +31,7 @@ function views_ui_menu() {
   );
 
   $items['admin/structure/views/add'] = array(
-    'title' => 'Add new view',
+    'title' => 'Add view',
     'route_name' => 'views_ui.add',
     'type' => MENU_LOCAL_ACTION,
   );
@@ -273,7 +273,7 @@ function views_ui_view_preview_section_handler_links(ViewExecutable $view, $type
     );
   }
   $links[$type . '-add'] = array(
-    'title' => t('Add new'),
+    'title' => t('Add'),
     'href' => "admin/structure/views/nojs/add-item/{$view->storage->id()}/{$display['id']}/$type",
     'attributes' => array('class' => array('views-ajax-link')),
   );
diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc
index 0377ff5..e19cefa 100644
--- a/core/modules/views_ui/views_ui.theme.inc
+++ b/core/modules/views_ui/views_ui.theme.inc
@@ -15,34 +15,14 @@ function theme_views_ui_container($variables) {
   return '<div' . new Attribute($element['#attributes']) . '>' . $element['#children'] . '</div>';
 }
 
-/**
- * Prepares variables for Views UI display tab setting templates.
- *
- * Default template: views-ui-display-tab-setting.html.twig.
- *
- * @param array $variables
- *   An associative array containing:
- *   - link: The setting's primary link.
- *   - settings_links: An array of links for this setting.
- *   - defaulted: A boolean indicating the setting is in its default state.
- *   - overridden: A boolean indicating the setting has been overridden from
- *     the default.
- *   - description: The setting's description.
- *   - description_separator: A boolean indicating a separator colon should be
- *     appended to the setting's description.
- */
 function template_preprocess_views_ui_display_tab_setting(&$variables) {
   static $zebra = 0;
-
-  // Add default class attributes.
-  $variables['attributes']['class'][] = 'views-display-setting';
-  $variables['attributes']['class'][] = ($zebra % 2 === 0 ? 'odd' : 'even');
-  $variables['attributes']['class'][] = 'clearfix';
-
+  $variables['zebra'] = ($zebra % 2 === 0 ? 'odd' : 'even');
   $zebra++;
 
-  // Put the primary link to the left side.
+  // Put the main link to the left side
   array_unshift($variables['settings_links'], $variables['link']);
+  $variables['settings_links'] = implode('<span class="label">&nbsp;|&nbsp;</span>', $variables['settings_links']);
 
   $variables['attributes']['class'][] = 'views-ui-display-tab-setting';
 
@@ -51,7 +31,7 @@ function template_preprocess_views_ui_display_tab_setting(&$variables) {
   }
   if (!empty($variables['overridden'])) {
     $variables['attributes']['class'][] = 'overridden';
-    $variables['attributes']['title'][] = t('Overridden');
+    $variables['attributes_array']['title'][] = t('Overridden');
   }
 
   // Append a colon to the description, if requested.
@@ -60,16 +40,6 @@ function template_preprocess_views_ui_display_tab_setting(&$variables) {
   }
 }
 
-/**
- * Prepares variables for Views UI display tab bucket templates.
- *
- * Default template: views-ui-display-tab-bucket.html.twig.
- *
- * @param array $variables
- *   An associative array containing:
- *   - element: An associative array containing the properties of the element.
- *     Properties used: #name, #overridden, #children, #title, #actions.
- */
 function template_preprocess_views_ui_display_tab_bucket(&$variables) {
   $element = $variables['element'];
 
@@ -80,12 +50,12 @@ function template_preprocess_views_ui_display_tab_bucket(&$variables) {
   }
   if (!empty($element['#overridden'])) {
     $variables['attributes']['class'][] = 'overridden';
-    $variables['attributes']['title'][] = t('Overridden');
+    $variables['attributes_array']['title'][] = t('Overridden');
   }
 
   $variables['content'] = $element['#children'];
   $variables['title'] = $element['#title'];
-  $variables['actions'] = !empty($element['#actions']) ? $element['#actions'] : array();
+  $variables['actions'] = !empty($element['#actions']) ? render($element['#actions']) : '';
 }
 
 /**
diff --git a/core/profiles/standard/config/filter.format.basic_html.yml b/core/profiles/standard/config/filter.format.basic_html.yml
index 8685b20..e97db8d 100644
--- a/core/profiles/standard/config/filter.format.basic_html.yml
+++ b/core/profiles/standard/config/filter.format.basic_html.yml
@@ -9,19 +9,13 @@ filters:
   filter_html:
     module: filter
     status: '1'
-    weight: '-10'
     settings:
       allowed_html: '<a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <h4> <h5> <h6> <p> <span> <img>'
       filter_html_help: '0'
-      filter_html_nofollow: '0'
-  filter_html_image_secure:
+  filter_htmlcorrector:
     module: filter
     status: '1'
-    weight: '9'
-    settings: {  }
-  filter_htmlcorrector:
+  filter_html_image_secure:
     module: filter
     status: '1'
-    weight: '10'
-    settings: {  }
 langcode: und
diff --git a/core/profiles/standard/config/filter.format.full_html.yml b/core/profiles/standard/config/filter.format.full_html.yml
index 204a342..89b232b 100644
--- a/core/profiles/standard/config/filter.format.full_html.yml
+++ b/core/profiles/standard/config/filter.format.full_html.yml
@@ -9,6 +9,4 @@ filters:
   filter_htmlcorrector:
     module: filter
     status: '1'
-    weight: '10'
-    settings: {  }
 langcode: en
diff --git a/core/profiles/standard/config/filter.format.restricted_html.yml b/core/profiles/standard/config/filter.format.restricted_html.yml
index 40203fe..2e14ce2 100644
--- a/core/profiles/standard/config/filter.format.restricted_html.yml
+++ b/core/profiles/standard/config/filter.format.restricted_html.yml
@@ -6,28 +6,18 @@ roles:
   - anonymous
 cache: '1'
 filters:
-  filter_html:
+  filter_url:
     module: filter
     status: '1'
-    weight: '-10'
-    settings:
-      allowed_html: '<a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <h4> <h5> <h6>'
-      filter_html_help: '1'
-      filter_html_nofollow: '0'
-  filter_autop:
+  filter_html:
     module: filter
     status: '1'
-    weight: '0'
-    settings: {  }
-  filter_url:
+    setttings:
+      filter_html_nofollow: '1'
+  filter_autop:
     module: filter
     status: '1'
-    weight: '0'
-    settings:
-      filter_url_length: '72'
   filter_htmlcorrector:
     module: filter
     status: '1'
-    weight: '10'
-    settings: {  }
 langcode: en
diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme
index 0593a3c..6245b4d 100644
--- a/core/themes/bartik/bartik.theme
+++ b/core/themes/bartik/bartik.theme
@@ -40,21 +40,7 @@ function bartik_process_html(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for page.html.twig.
- */
-function bartik_preprocess_page(&$variables) {
-  // Pass the main menu and secondary menu to the template as render arrays.
-  if (!empty($variables['main_menu'])) {
-    $variables['main_menu']['#attributes']['id'] = 'main-menu-links';
-    $variables['main_menu']['#attributes']['class'] = array('links', 'clearfix');
-  }
-  if (!empty($variables['secondary_menu'])) {
-    $variables['secondary_menu']['#attributes']['id'] = 'secondary-menu-links';
-  }
-}
-
-/**
- * Implements hook_process_HOOK() for page.html.twig.
+ * Implements hook_process_HOOK() for page.tpl.php.
  */
 function bartik_process_page(&$variables) {
   $site_config = config('system.site');
@@ -92,7 +78,7 @@ function bartik_process_page(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for maintenance-page.html.twig.
+ * Implements hook_preprocess_HOOK() for maintenance-page.tpl.php.
  */
 function bartik_preprocess_maintenance_page(&$variables) {
   // By default, site_name is set to Drupal if no db connection is available
@@ -106,7 +92,7 @@ function bartik_preprocess_maintenance_page(&$variables) {
 }
 
 /**
- * Implements hook_process_HOOK() for maintenance-page.html.twig.
+ * Implements hook_process_HOOK() for maintenance-page.tpl.php.
  */
 function bartik_process_maintenance_page(&$variables) {
   $site_config = config('system.site');
@@ -125,17 +111,6 @@ function bartik_process_maintenance_page(&$variables) {
 }
 
 /**
- * Implements hook_preprocess_HOOK() for node.html.twig.
- */
-function bartik_preprocess_node(&$variables) {
-  // Remove the "Add new comment" link on teasers or when the comment form is
-  // displayed on the page.
-  if ($variables['teaser'] || !empty($variables['content']['comments']['comment_form'])) {
-    unset($variables['content']['links']['comment']['#links']['comment-add']);
-  }
-}
-
-/**
  * Implements theme_menu_tree().
  */
 function bartik_menu_tree($variables) {
diff --git a/core/themes/bartik/templates/comment-wrapper.tpl.php b/core/themes/bartik/templates/comment-wrapper.tpl.php
new file mode 100644
index 0000000..fd8dfa7
--- /dev/null
+++ b/core/themes/bartik/templates/comment-wrapper.tpl.php
@@ -0,0 +1,48 @@
+<?php
+
+/**
+ * @file
+ * Bartik's theme implementation to provide an HTML container for comments.
+ *
+ * Available variables:
+ * - $content: The array of content-related elements for the node. Use
+ *   render($content) to print them all, or
+ *   print a subset such as render($content['comment_form']).
+ * - $attributes: An instance of Attributes class that can be manipulated as an
+ *    array and printed as a string.
+ *    It includes the 'class' information, which includes:
+ *   - comment-wrapper: The current template type, i.e., "theming hook".
+ * - $title_prefix (array): An array containing additional output populated by
+ *   modules, intended to be displayed in front of the main title tag that
+ *   appears in the template.
+ * - $title_suffix (array): An array containing additional output populated by
+ *   modules, intended to be displayed after the main title tag that appears in
+ *   the template.
+ *
+ * The following variables are provided for contextual information.
+ * - $node: Node entity the comments are attached to.
+ * The constants below the variables show the possible values and should be
+ * used for comparison.
+ * - $display_mode
+ *   - COMMENT_MODE_FLAT
+ *   - COMMENT_MODE_THREADED
+ *
+ * @see template_preprocess_comment_wrapper()
+ *
+ * @ingroup themeable
+ */
+?>
+<section id="comments" <?php print $attributes; ?>>
+  <?php if ($content['comments'] && $node->type != 'forum'): ?>
+    <?php print render($title_prefix); ?>
+    <h2 class="title"><?php print t('Comments'); ?></h2>
+    <?php print render($title_suffix); ?>
+  <?php endif; ?>
+
+  <?php print render($content['comments']); ?>
+
+  <?php if ($content['comment_form']): ?>
+    <h2 class="title comment-form"><?php print t('Add new comment'); ?></h2>
+    <?php print render($content['comment_form']); ?>
+  <?php endif; ?>
+</section>
diff --git a/core/themes/bartik/templates/comment.html.twig b/core/themes/bartik/templates/comment.html.twig
deleted file mode 100644
index 48fd391..0000000
--- a/core/themes/bartik/templates/comment.html.twig
+++ /dev/null
@@ -1,130 +0,0 @@
-{#
-/**
- * @file
- * Bartik's theme implementation for comments.
- *
- * Available variables:
- * - author: Comment author. Can be a link or plain text.
- * - content: The content-related items for the comment display. Use
- *   {{ content }} to print them all, or print a subset such as
- *   {{ content.field_example }}. Use hide(content.field_example) to temporarily
- *   suppress the printing of a given element.
- * - created: Formatted date and time for when the comment was created.
- *   Preprocess functions can reformat it by calling format_date() with the
- *   desired parameters on the 'comment.created' variable.
- * - changed: Formatted date and time for when the comment was last changed.
- *   Preprocess functions can reformat it by calling format_date() with the
- *   desired parameters on the 'comment.changed' variable.
- * - new: New comment marker.
- * - permalink: Comment permalink.
- * - submitted: Submission information created from author and created
- *   during template_preprocess_comment().
- * - user_picture: The comment author's profile picture.
- * - signature: The comment author's signature.
- * - status: Comment status. Possible values are:
- *   unpublished, published, or preview.
- * - title: Comment title, linked to the comment.
- * - attributes.class: List of classes that can be used to style contextually
- *   through CSS. The default values can be one or more of the following:
- *   - comment: The current template type; e.g., 'theming hook'.
- *   - by-anonymous: Comment by an unregistered user.
- *   - by-node-author: Comment by the author of the parent node.
- *   - preview: When previewing a new or edited comment.
- *   The following applies only to viewers who are registered users:
- *   - unpublished: An unpublished comment visible only to administrators.
- *   - by-viewer: Comment by the user currently viewing the page.
- *   - new: New comment since the last visit.
- * - title_prefix: Additional output populated by modules, intended to be
- *   displayed in front of the main title tag that appears in the template.
- * - title_suffix: Additional output populated by modules, intended to be
- *   displayed after the main title tag that appears in the template.
- * - content_attributes: List of classes for the styling of the comment content.
- *
- * These variables are provided to give context about the parent comment (if
- * any):
- * - comment_parent: Full parent comment entity (if any).
- * - parent_author: Equivalent to author for the parent comment.
- * - parent_created: Equivalent to created for the parent comment.
- * - parent_changed: Equivalent to changed for the parent comment.
- * - parent_title: Equivalent to title for the parent comment.
- * - parent_permalink: Equivalent to permalink for the parent comment.
- * - parent: A text string of parent comment submission information created from
- *   'parent_author' and 'parent_created' during template_preprocess_comment().
- *   This information is presented to help screen readers follow lengthy
- *   discussion threads. You can hide this from sighted users using the class
- *   element-invisible.
- *
- * These two variables are provided for context:
- * - comment: Full comment object.
- * - node: Node entity the comments are attached to.
- *
- * @see template_preprocess()
- * @see template_preprocess_comment()
- *
- * @ingroup themeable
- */
-#}
-<article class="{{ attributes.class }} clearfix"{{ attributes }} role="article">
-
-  <header class="comment-header">
-
-    <div class="attribution">
-      {{ user_picture }}
-
-      <div class="submitted">
-        <p class="commenter-name">
-          {{ author }}
-        </p>
-        <p class="comment-time">
-          {{ created }}
-        </p>
-        <p class="comment-permalink">
-          {{ permalink }}
-        </p>
-        {#
-          // Indicate the semantic relationship between parent and child comments
-          // for accessibility. The list is difficult to navigate in a screen
-          // reader without this information.
-        #}
-        {% if parent %}
-        <p class="comment-parent element-invisible">
-          {{ parent }}
-        </p>
-        {% endif %}
-      </div>
-    </div> <!-- /.attribution -->
-
-    <div class="comment-text">
-      <div class="comment-arrow"></div>
-
-      {% if new %}
-        <span class="new">{{ new }}</span>
-      {% endif %}
-
-      {{ title_prefix }}
-      <h3{{ title_attributes }}>{{ title }}</h3>
-      {{ title_suffix }}
-    </div> <!-- /.comment-text -->
-
-  </header> <!-- /.comment-header -->
-
-  <div{{ content_attributes }}>
-    {# We hide the links now so that we can render them later. #}
-    {% hide(content.links) %}
-    {{ content }}
-
-  </div> <!-- /.content -->
-
-  <footer class="comment-footer">
-    {% if signature %}
-    <div class="user-signature clearfix">
-      {{ signature }}
-    </div>
-    {% endif %}
-
-    <nav>
-      {{ content.links }}
-    </nav>
-  </footer> <!-- /.comment-footer -->
-
-</article>
diff --git a/core/themes/bartik/templates/comment.tpl.php b/core/themes/bartik/templates/comment.tpl.php
new file mode 100644
index 0000000..a8c4924
--- /dev/null
+++ b/core/themes/bartik/templates/comment.tpl.php
@@ -0,0 +1,135 @@
+<?php
+
+/**
+ * @file
+ * Bartik's theme implementation for comments.
+ *
+ * Available variables:
+ * - $author: Comment author. Can be a link or plain text.
+ * - $content: An array of comment items. Use render($content) to print them
+ *   all, or print a subset such as render($content['field_example']). Use
+ *   hide($content['field_example']) to temporarily suppress the printing of a
+ *   given element.
+ * - $created: Formatted date and time for when the comment was created.
+ *   Preprocess functions can reformat it by calling format_date() with the
+ *   desired parameters on the $comment->created variable.
+ * - $changed: Formatted date and time for when the comment was last changed.
+ *   Preprocess functions can reformat it by calling format_date() with the
+ *   desired parameters on the $comment->changed variable.
+ * - $new: New comment marker.
+ * - $permalink: Comment permalink.
+ * - $submitted: Submission information created from $author and $created
+ *   during template_preprocess_comment().
+ * - $signature: Authors signature.
+ * - $status: Comment status. Possible values are:
+ *   unpublished, published, or preview.
+ * - $title: Linked title.
+ * - $attributes: An instance of Attributes class that can be manipulated as an
+ *    array and printed as a string.
+ *    It includes the 'class' information, which includes:
+ *   - comment: The current template type; e.g., 'theming hook'.
+ *   - by-anonymous: Comment by an unregistered user.
+ *   - by-node-author: Comment by the author of the parent node.
+ *   - preview: When previewing a new or edited comment.
+ *   The following applies only to viewers who are registered users:
+ *   - unpublished: An unpublished comment visible only to administrators.
+ *   - by-viewer: Comment by the user currently viewing the page.
+ *   - new: New comment since the last visit.
+ * - $title_prefix (array): An array containing additional output populated by
+ *   modules, intended to be displayed in front of the main title tag that
+ *   appears in the template.
+ * - $title_suffix (array): An array containing additional output populated by
+ *   modules, intended to be displayed after the main title tag that appears in
+ *   the template.
+ *
+ * These variables are provided to give context about the parent comment (if
+ * any):
+ * - $comment_parent: Full parent comment object (if any).
+ * - $parent_author: Equivalent to $author for the parent comment.
+ * - $parent_created: Equivalent to $created for the parent comment.
+ * - $parent_changed: Equivalent to $changed for the parent comment.
+ * - $parent_title: Equivalent to $title for the parent comment.
+ * - $parent_permalink: Equivalent to $permalink for the parent comment.
+ * - $parent: A text string of parent comment submission information created
+ *   from $parent_author and $parent_created during
+ *   template_preprocess_comment(). This information is presented to help
+ *   screen readers follow lengthy discussion threads. You can hide this from
+ *   sighted users using the class element-invisible.
+ *
+ * These two variables are provided for context:
+ * - $comment: Full comment object.
+ * - $node: Node entity the comments are attached to.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_comment()
+ * @see template_process()
+ * @see theme_comment()
+ *
+ * @ingroup themeable
+ */
+?>
+<article class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?> role="article">
+
+  <header class="comment-header">
+
+    <div class="attribution">
+      <?php print render($user_picture); ?>
+
+      <div class="submitted">
+        <p class="commenter-name">
+          <?php print $author; ?>
+        </p>
+        <p class="comment-time">
+          <?php print $created; ?>
+        </p>
+        <p class="comment-permalink">
+          <?php print $permalink; ?>
+        </p>
+        <?php
+          // Indicate the semantic relationship between parent and child comments
+          // for accessibility. The list is difficult to navigate in a screen
+          // reader without this information.
+          if ($parent):
+        ?>
+        <p class="comment-parent element-invisible">
+          <?php print $parent; ?>
+        </p>
+        <?php endif; ?>
+      </div>
+    </div> <!-- /.attribution -->
+
+    <div class="comment-text">
+      <div class="comment-arrow"></div>
+
+      <?php if ($new): ?>
+        <span class="new"><?php print $new; ?></span>
+      <?php endif; ?>
+
+      <?php print render($title_prefix); ?>
+      <h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
+      <?php print render($title_suffix); ?>
+    </div> <!-- /.comment-text -->
+
+  </header> <!-- /.comment-header -->
+
+  <div class="content"<?php print $content_attributes; ?>>
+    <?php
+      // We hide the comments and links now so that we can render them later.
+      hide($content['links']);
+      print render($content);
+    ?>
+  </div> <!-- /.content -->
+
+  <footer class="comment-footer">
+    <?php if ($signature): ?>
+      <div class="user-signature clearfix">
+        <?php print $signature; ?>
+      </div>
+    <?php endif; ?>
+
+    <nav>
+      <?php print render($content['links']); ?>
+    </nav>
+  </footer> <!-- /.comment-footer -->
+
+</article>
diff --git a/core/themes/bartik/templates/maintenance-page.html.twig b/core/themes/bartik/templates/maintenance-page.html.twig
deleted file mode 100644
index 2d49784..0000000
--- a/core/themes/bartik/templates/maintenance-page.html.twig
+++ /dev/null
@@ -1,66 +0,0 @@
-{#
-/**
- * @file
- * Bartik's theme implementation to display a single Drupal page while offline.
- *
- * All of the available variables are mirrored in page.html.twig.
- *
- * @see template_preprocess()
- * @see template_preprocess_maintenance_page()
- * @see bartik_process_maintenance_page()
- *
- * @ingroup themeable
- */
- #}
-<!DOCTYPE html>
-<html lang="{{ language.langcode }}" dir="{{ language.dir }}">
-<head>
-  {{ head }}
-  <title>{{ head_title }}</title>
-  {{ styles }}
-  {{ scripts }}
-</head>
-<body class="{{ attributes.class }}"{{ attributes }}>
-
-  <div id="skip-link">
-    <a href="#main-content" class="element-invisible element-focusable">{{ 'Skip to main content'|t }}</a>
-  </div>
-
-  <div id="page-wrapper"><div id="page">
-
-    <header id="header" role="banner"><div class="section clearfix">
-      {% if site_name or site_slogan %}
-        <div id="name-and-slogan"{{ hide_site_name and hide_site_slogan ? ' class="element-invisible"' }}>
-          {% if site_name %}
-            <div id="site-name"{{ hide_site_name ? ' class="element-invisible"' }}>
-              <strong>
-                <a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home"><span>{{ site_name }}</span></a>
-              </strong>
-            </div>
-          {% endif %}
-          {% if site_slogan %}
-            <div id="site-slogan"{{ hide_site_slogan ? ' class="element-invisible"' }}>
-              {{ site_slogan }}
-            </div>
-          {% endif %}
-        </div> <!-- /#name-and-slogan -->
-      {% endif %}
-    </div></header> <!-- /.section, /#header -->
-
-    <div id="main-wrapper"><div id="main" class="clearfix">
-      <main id="content" class="column" role="main"><section class="section">
-        <a id="main-content"></a>
-        {% if title %}<h1 class="title" id="page-title">{{ title }}</h1>{% endif %}
-        {{ content }}
-        {% if messages %}
-          <div id="messages"><div class="section clearfix">
-            {{ messages }}
-          </div></div> <!-- /.section, /#messages -->
-        {% endif %}
-      </section></main> <!-- /.section, /#content -->
-    </div></div> <!-- /#main, /#main-wrapper -->
-
-  </div></div> <!-- /#page, /#page-wrapper -->
-
-</body>
-</html>
diff --git a/core/themes/bartik/templates/maintenance-page.tpl.php b/core/themes/bartik/templates/maintenance-page.tpl.php
new file mode 100644
index 0000000..8e56378
--- /dev/null
+++ b/core/themes/bartik/templates/maintenance-page.tpl.php
@@ -0,0 +1,67 @@
+<?php
+
+/**
+ * @file
+ * Bartik's theme implementation to display a single Drupal page while offline.
+ *
+ * All of the available variables are mirrored in page.tpl.php.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_maintenance_page()
+ * @see bartik_process_maintenance_page()
+ *
+ * @ingroup themeable
+ */
+?>
+<!DOCTYPE html>
+<html lang="<?php print $language->langcode; ?>" dir="<?php print $language->dir; ?>">
+<head>
+  <?php print $head; ?>
+  <title><?php print $head_title; ?></title>
+  <?php print $styles; ?>
+  <?php print $scripts; ?>
+</head>
+<body class="<?php print $attributes['class']; ?>" <?php print $attributes;?>>
+
+  <div id="skip-link">
+    <a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?></a>
+  </div>
+
+  <div id="page-wrapper"><div id="page">
+
+    <header id="header" role="banner"><div class="section clearfix">
+      <?php if ($site_name || $site_slogan): ?>
+        <div id="name-and-slogan"<?php if ($hide_site_name && $hide_site_slogan) { print ' class="element-invisible"'; } ?>>
+          <?php if ($site_name): ?>
+            <div id="site-name"<?php if ($hide_site_name) { print ' class="element-invisible"'; } ?>>
+              <strong>
+                <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
+              </strong>
+            </div>
+          <?php endif; ?>
+          <?php if ($site_slogan): ?>
+            <div id="site-slogan"<?php if ($hide_site_slogan) { print ' class="element-invisible"'; } ?>>
+              <?php print $site_slogan; ?>
+            </div>
+          <?php endif; ?>
+        </div> <!-- /#name-and-slogan -->
+      <?php endif; ?>
+    </div></header> <!-- /.section, /#header -->
+
+    <div id="main-wrapper"><div id="main" class="clearfix">
+      <main id="content" class="column" role="main"><section class="section">
+        <a id="main-content"></a>
+        <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
+        <?php print $content; ?>
+        <?php if ($messages): ?>
+          <div id="messages"><div class="section clearfix">
+            <?php print $messages; ?>
+          </div></div> <!-- /.section, /#messages -->
+        <?php endif; ?>
+      </section></main> <!-- /.section, /#content -->
+    </div></div> <!-- /#main, /#main-wrapper -->
+
+  </div></div> <!-- /#page, /#page-wrapper -->
+
+</body>
+</html>
diff --git a/core/themes/bartik/templates/node.html.twig b/core/themes/bartik/templates/node.html.twig
deleted file mode 100644
index 68a4a93..0000000
--- a/core/themes/bartik/templates/node.html.twig
+++ /dev/null
@@ -1,115 +0,0 @@
-{#
-/**
- * @file
- * Bartik's theme implementation to display a node.
- *
- * Available variables:
- * - node: Full node entity.
- *   - type: The type of the node, for example, "page" or "article".
- *   - uid: The user ID of the node author.
- *   - created: Formatted creation date. Preprocess functions can reformat it by
- *     calling format_date() with the desired parameters on
- *     $variables['node']->created.
- *   - promote: Whether the node is promoted to the front page.
- *   - sticky: Whether the node is 'sticky'. Sticky nodes are ordered above
- *     other non-sticky nodes in teaser listings
- *   - status: Whether the node is published.
- *   - comment: A value representing the comment status of the current node. May
- *     be one of the following:
- *     - 0: The comment form and any existing comments are hidden.
- *     - 1: Comments are closed. No new comments may be posted, but existing
- *       comments are displayed.
- *     - 2: Comments are open on this node.
- *   - comment_count: Number of comments attached to the node.
- * - label: The title of the node.
- * - content: All node items. Use {{ content }} to print them all,
- *   or print a subset such as {{ content.field_example }}. Use
- *   {% hide(content.field_example) %} to temporarily suppress the printing
- *   of a given element.
- * - user_picture: The node author's picture from user-picture.html.twig.
- * - date: Formatted creation date. Preprocess functions can reformat it by
- *   calling format_date() with the desired parameters on
- *   $variables['created'].
- * - name: Themed username of node author output from theme_username().
- * - node_url: Direct URL of the current node.
- * - display_submitted: Whether submission information should be displayed.
- * - submitted: Submission information created from name and date during
- *   template_preprocess_node().
- * - attributes: HTML attributes for the containing element.
- *   The attributes.class element may contain one or more of the following
- *   classes:
- *   - node: The current template type (also known as a "theming hook").
- *   - node-[type]: The current node type. For example, if the node is a
- *     "Article" it would result in "node-article". Note that the machine
- *     name will often be in a short form of the human readable label.
- *   - view-mode-[view_mode]: The View Mode of the node; for example, a teaser
- *     would result in: "view-mode-teaser", and full: "view-mode-full".
- *   - preview: Whether a node is in preview mode.
- *   The following are controlled through the node publishing options.
- *   - promoted: Appears on nodes promoted to the front page.
- *   - sticky: Appears on nodes ordered above other non-sticky nodes in teaser
- *     listings.
- *   - unpublished: Appears on unpublished nodes visible only to site admins.
- * - title_prefix: Additional output populated by modules, intended to be
- *   displayed in front of the main title tag that appears in the template.
- * - title_suffix: Additional output populated by modules, intended to be
- *   displayed after the main title tag that appears in the template.
- * - view_mode: View mode; for example, "teaser" or "full".
- * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'.
- * - page: Flag for the full page state. Will be true if view_mode is 'full'.
- * - readmore: Flag for more state. Will be true if the teaser content of the
- *   node cannot hold the main body content.
- * - is_front: Flag for front. Will be true when presented on the front page.
- * - logged_in: Flag for authenticated user status. Will be true when the
- *   current user is a logged-in member.
- * - is_admin: Flag for admin user status. Will be true when the current user
- *   is an administrator.
- *
- * In field variables, each field instance attached to the node a corresponding
- * variable is defined; for example, 'node.body' becomes 'body'. When needing to
- * access a field's raw values, developers/themers are strongly encouraged to
- * use these variables. Otherwise they will have to explicitly specify the
- * desired field language; for example, 'node.body.en', thus overriding any
- * language negotiation rule that may have been applied previously.
- *
- * @see template_preprocess()
- * @see template_preprocess_node()
- *
- * @ingroup themeable
- */
-#}
-<article id="node-{{ node.nid }}" class="{{ attributes.class}} clearfix"{{ attributes }} role="article">
-
-  <header>
-    {{ title_prefix }}
-    {% if not page %}
-      <h2{{ title_attributes }}>
-        <a href="{{ node_url }}">{{ label }}</a>
-      </h2>
-    {% endif %}
-    {{ title_suffix }}
-
-    {% if display_submitted %}
-      <div class="meta submitted">
-        {{ user_picture }}
-        {{ submitted }}
-      </div>
-    {% endif %}
-  </header>
-
-  <div class="content clearfix"{{ content_attributes }}>
-    {# We hide the comments and links now so that we can render them later. #}
-    {% hide(content.comments) %}
-    {% hide(content.links) %}
-    {{ content }}
-  </div>
-
-  {% if content.links %}
-    <footer class="link-wrapper">
-      {{ content.links }}
-    </footer>
-  {% endif %}
-
-  {{ content.comments }}
-
-</article>
diff --git a/core/themes/bartik/templates/node.tpl.php b/core/themes/bartik/templates/node.tpl.php
new file mode 100644
index 0000000..868d101
--- /dev/null
+++ b/core/themes/bartik/templates/node.tpl.php
@@ -0,0 +1,121 @@
+<?php
+
+/**
+ * @file
+ * Bartik's theme implementation to display a node.
+ *
+ * Available variables:
+ * - $label: the (sanitized) title of the node.
+ * - $content: An array of node items. Use render($content) to print them all,
+ *   or print a subset such as render($content['field_example']). Use
+ *   hide($content['field_example']) to temporarily suppress the printing of a
+ *   given element.
+ * - $user_picture: The node author's picture. Use render() when printing.
+ * - $date: Formatted creation date. Preprocess functions can reformat it by
+ *   calling format_date() with the desired parameters on the $created variable.
+ * - $name: Themed username of node author output from theme_username().
+ * - $node_url: Direct URL of the current node.
+ * - $display_submitted: Whether submission information should be displayed.
+ * - $submitted: Submission information created from $name and $date during
+ *   template_preprocess_node().
+ * - $attributes: An instance of Attributes class that can be manipulated as an
+ *    array and printed as a string.
+ *    It includes the 'class' information, which includes:
+ *   - node: The current template type; for example, "theming hook".
+ *   - node-[type]: The current node type. For example, if the node is a
+ *     "Article" it would result in "node-article". Note that the machine
+ *     name will often be in a short form of the human readable label.
+ *   - view-mode-[view_mode]: The View Mode of the node; for example, "teaser"
+ *     or "full".
+ *   - preview: Nodes in preview mode.
+ *   The following are controlled through the node publishing options.
+ *   - promoted: Nodes promoted to the front page.
+ *   - sticky: Nodes ordered above other non-sticky nodes in teaser
+ *     listings.
+ *   - unpublished: Unpublished nodes visible only to administrators.
+ * - $title_prefix (array): An array containing additional output populated by
+ *   modules, intended to be displayed in front of the main title tag that
+ *   appears in the template.
+ * - $title_suffix (array): An array containing additional output populated by
+ *   modules, intended to be displayed after the main title tag that appears in
+ *   the template.
+ *
+ * Other variables:
+ * - $node: Full node entity. Contains data that may not be safe.
+ * - $type: Node type; for example, page, article, etc.
+ * - $comment_count: Number of comments attached to the node.
+ * - $uid: User ID of the node author.
+ * - $created: Time the node was published formatted in Unix timestamp.
+ *
+ * Node status variables:
+ * - $view_mode: View mode; for example, "teaser" or "full".
+ * - $teaser: Flag for the teaser state (shortcut for $view_mode == 'teaser').
+ * - $page: Flag for the full page state.
+ * - $promote: Flag for front page promotion state.
+ * - $sticky: Flags for sticky post setting.
+ * - $status: Flag for published status.
+ * - $comment: State of comment settings for the node.
+ * - $is_front: Flags true when presented in the front page.
+ * - $logged_in: Flags true when the current user is a logged-in member.
+ * - $is_admin: Flags true when the current user is an administrator.
+ *
+ * Field variables: For each field instance attached to the node a
+ * corresponding variable is defined; for example, $node->body becomes $body.
+ * When needing to access a field's raw values, developers/themers are strongly
+ * encouraged to use these variables. Otherwise they will have to explicitly
+ * specify the desired field language; for example, $node->body['en'], thus
+ * overriding any language negotiation rule that was previously applied.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_node()
+ * @see template_process()
+ *
+ * @ingroup themeable
+ */
+?>
+<article id="node-<?php print $node->nid; ?>" class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?> role="article">
+
+  <header>
+    <?php print render($title_prefix); ?>
+    <?php if (!$page): ?>
+      <h2<?php print $title_attributes; ?>>
+        <a href="<?php print $node_url; ?>"><?php print $label; ?></a>
+      </h2>
+    <?php endif; ?>
+    <?php print render($title_suffix); ?>
+
+    <?php if ($display_submitted): ?>
+      <div class="meta submitted">
+        <?php print render($user_picture); ?>
+        <?php print $submitted; ?>
+      </div>
+    <?php endif; ?>
+  </header>
+
+  <div class="content clearfix"<?php print $content_attributes; ?>>
+    <?php
+      // We hide the comments and links now so that we can render them later.
+      hide($content['comments']);
+      hide($content['links']);
+      print render($content);
+    ?>
+  </div>
+
+  <?php
+    // Remove the "Add comment" link on the teaser page or if the comment
+    // form is being displayed on the same page.
+    if ($teaser || !empty($content['comments']['comment_form'])) {
+      unset($content['links']['comment']['#links']['comment-add']);
+    }
+    // Only display the footer if there are links.
+    $links = render($content['links']);
+    if ($links):
+  ?>
+    <footer class="link-wrapper">
+      <?php print $links; ?>
+    </footer>
+  <?php endif; ?>
+
+  <?php print render($content['comments']); ?>
+
+</article>
diff --git a/core/themes/bartik/templates/page.html.twig b/core/themes/bartik/templates/page.html.twig
deleted file mode 100644
index 1af8907..0000000
--- a/core/themes/bartik/templates/page.html.twig
+++ /dev/null
@@ -1,216 +0,0 @@
-{#
-/**
- * @file
- * Bartik's theme implementation to display a single page.
- *
- * The doctype, html, head and body tags are not in this template. Instead they
- * can be found in the html.html.twig template normally located in the
- * core/modules/system directory.
- *
- * Available variables:
- *
- * General utility variables:
- * - base_path: The base URL path of the Drupal installation. Will usually be
- *   "/" unless you have installed Drupal in a sub-directory.
- * - is_front: A flag indicating if the current page is the front page.
- * - logged_in: A flag indicating if the user is registered and signed in.
- * - is_admin: A flag indicating if the user has permission to access
- *   administration pages.
- *
- * Site identity:
- * - front_page: The URL of the front page. Use this instead of base_path when
- *   linking to the front page. This includes the language domain or prefix.
- * - logo: The url of the logo image, as defined in theme settings.
- * - site_name: The name of the site. This is empty when displaying the site
- *   name has been disabled in the theme settings.
- * - site_slogan: The slogan of the site. This is empty when displaying the site
- *   slogan has been disabled in theme settings.
- * - hide_site_name: A flag indicating if the site name has been toggled off on
- *   the theme settings page. If hidden, the "element-invisible" class is added
- *   to make the site name visually hidden, but still accessible.
- * - hide_site_slogan: A flag indicating if the site slogan has been toggled off
- *   on the theme settings page. If hidden, the "element-invisible" class is
- *   added to make the site slogan visually hidden, but still accessible.
- *
- * Navigation:
- * - main_menu: The Main menu links for the site, if they have been configured.
- * - secondary_menu: The Secondary menu links for the site, if they have been
- *   configured.
- * - breadcrumb: The breadcrumb trail for the current page.
- *
- * Page content (in order of occurrence in the default page.html.twig):
- * - title_prefix: Additional output populated by modules, intended to be
- *   displayed in front of the main title tag that appears in the template.
- * - title: The page title, for use in the actual content.
- * - title_suffix: Additional output populated by modules, intended to be
- *   displayed after the main title tag that appears in the template.
- * - messages: Status and error messages. Should be displayed prominently.
- * - tabs: Tabs linking to any sub-pages beneath the current page (e.g., the
- *   view and edit tabs when displaying a node).
- * - action_links: Actions local to the page, such as "Add menu" on the menu
- *   administration interface.
- * - feed_icons: All feed icons for the current page.
- * - node: Fully loaded node, if there is an automatically-loaded node
- *   associated with the page and the node ID is the second argument in the
- *   page's path (e.g. node/12345 and node/12345/revisions, but not
- *   comment/reply/12345).
- *
- * Regions:
- * - page.header: Items for the header region.
- * - page.featured: Items for the featured region.
- * - page.highlighted: Items for the highlighted content region.
- * - page.help: Dynamic help text, mostly for admin pages.
- * - page.content: The main content of the current page.
- * - page.sidebar_first: Items for the first sidebar.
- * - page.sidebar_second: Items for the second sidebar.
- * - page.triptych_first: Items for the first triptych.
- * - page.triptych_middle: Items for the middle triptych.
- * - page.triptych_last: Items for the last triptych.
- * - page.footer_firstcolumn: Items for the first footer column.
- * - page.footer_secondcolumn: Items for the second footer column.
- * - page.footer_thirdcolumn: Items for the third footer column.
- * - page.footer_fourthcolumn: Items for the fourth footer column.
- * - page.footer: Items for the footer region.
- *
- * @see template_preprocess()
- * @see template_preprocess_page()
- * @see bartik_preprocess_page()
- * @see template_process()
- * @see template_process_page()
- * @see bartik_process_page()
- * @see html.html.twig
- *
- * @ingroup themeable
- */
-#}
-<div id="page-wrapper"><div id="page">
-
-  <header id="header" class="{{ secondary_menu ? 'with-secondary-menu' : 'without-secondary-menu' }}" role="banner"><div class="section clearfix">
-   {% if secondary_menu %}
-      <nav id="secondary-menu" class="navigation" role="navigation">
-        {{ secondary_menu }}
-      </nav> <!-- /#secondary-menu -->
-    {% endif %}
-
-    {% if logo %}
-      <a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home" id="logo">
-        <img src="{{ logo }}" alt="{{ 'Home'|t }}" />
-      </a>
-    {% endif %}
-
-    {% if site_name or site_slogan %}
-      <div id="name-and-slogan"{% if hide_site_name and hide_site_slogan %} class="element-invisible"{% endif %}>
-        {% if site_name %}
-          {% if title %}
-            <div id="site-name"{% if hide_site_name %} class="element-invisible"{% endif %}>
-              <strong>
-                <a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home"><span>{{ site_name }}</span></a>
-              </strong>
-            </div>
-          {# Use h1 when the content title is empty #}
-          {% else %}
-            <h1 id="site-name"{% if hide_site_name %} class="element-invisible" {% endif %}>
-              <a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home"><span>{{ site_name }}</span></a>
-            </h1>
-          {% endif %}
-        {% endif %}
-
-        {% if site_slogan %}
-          <div id="site-slogan"{% if hide_site_slogan %} class="element-invisible"{% endif %}>
-            {{ site_slogan }}
-          </div>
-        {% endif %}
-      </div><!-- /#name-and-slogan -->
-    {% endif %}
-
-    {{ page.header }}
-
-    {% if main_menu %}
-      <nav id ="main-menu" class="navigation" role="navigation">
-        {{ main_menu }}
-      </nav> <!-- /#main-menu -->
-    {% endif %}
-  </div></header> <!-- /.section, /#header-->
-
-  {% if messages %}
-    <div id="messages"><div class="section clearfix">
-      {{ messages }}
-    </div></div> <!-- /.section, /#messages -->
-  {% endif %}
-
-  {% if page.featured %}
-    <aside id="featured"><div class="section clearfix">
-      {{ page.featured }}
-    </div></aside> <!-- /.section, /#featured -->
-  {% endif %}
-
-  <div id="main-wrapper" class="clearfix"><div id="main" class="clearfix">
-    {{ breadcrumb }}
-
-    <main id="content" class="column" role="main"><section class="section">
-      {% if page.highlighted %}<div id="highlighted">{{ page.highlighted }}</div>{% endif %}
-      <a id="main-content"></a>
-      {{ title_prefix }}
-        {% if title %}
-          <h1 class="title" id="page-title">
-            {{ title }}
-          </h1>
-        {% endif %}
-      {{ title_suffix }}
-        {% if tabs %}
-          <nav class="tabs" role="navigation">
-            {{ tabs }}
-          </nav>
-        {% endif %}
-      {{ page.help }}
-        {% if action_links %}
-          <ul class="action-links">
-            {{ action_links }}
-          </ul>
-        {% endif %}
-      {{ page.content }}
-      {{ feed_icons }}
-    </section></main> <!-- /.section, /#content -->
-
-    {% if page.sidebar_first %}
-      <div id="sidebar-first" class="column sidebar"><aside class="section">
-        {{ page.sidebar_first }}
-      </aside></div><!-- /.section, /#sidebar-first -->
-    {% endif %}
-
-    {% if page.sidebar_second %}
-      <div id="sidebar-second" class="column sidebar"><aside class="section">
-        {{ page.sidebar_second }}
-      </aside></div><!-- /.section, /#sidebar-second -->
-    {% endif %}
-
-  </div></div><!-- /#main, /#main-wrapper -->
-
-  {% if page.triptych_first or page.triptych_middle or page.triptych_last %}
-    <div id="triptych-wrapper"><aside id="triptych" class="clearfix">
-      {{ page.triptych_first }}
-      {{ page.triptych_middle }}
-      {{ page.triptych_last }}
-    </aside></div><!-- /#triptych, /#triptych-wrapper -->
-  {% endif %}
-
-  <div id="footer-wrapper"><footer class="section">
-
-    {% if page.footer_firstcolumn or page.footer_secondcolumn or page.footer_thirdcolumn or page.footer_fourthcolumn %}
-      <div id="footer-columns" class="clearfix">
-        {{ page.footer_firstcolumn }}
-        {{ page.footer_secondcolumn }}
-        {{ page.footer_thirdcolumn }}
-        {{ page.footer_fourthcolumn }}
-      </div><!-- /#footer-columns -->
-    {% endif %}
-
-    {% if page.footer %}
-      <div id="footer" role="contentinfo" class="clearfix">
-        {{ page.footer }}
-      </div> <!-- /#footer -->
-   {% endif %}
-
-  </footer></div> <!-- /.section, /#footer-wrapper -->
-
-</div></div> <!-- /#page, /#page-wrapper -->
diff --git a/core/themes/bartik/templates/page.tpl.php b/core/themes/bartik/templates/page.tpl.php
new file mode 100644
index 0000000..8b31e55
--- /dev/null
+++ b/core/themes/bartik/templates/page.tpl.php
@@ -0,0 +1,249 @@
+<?php
+
+/**
+ * @file
+ * Bartik's theme implementation to display a single Drupal page.
+ *
+ * The doctype, html, head, and body tags are not in this template. Instead
+ * they can be found in the html.tpl.php template normally located in the
+ * core/modules/system directory.
+ *
+ * Available variables:
+ *
+ * General utility variables:
+ * - $base_path: The base URL path of the Drupal installation. At the very
+ *   least, this will always default to /.
+ * - $directory: The directory the template is located in, e.g. modules/system
+ *   or themes/bartik.
+ * - $is_front: TRUE if the current page is the front page.
+ * - $logged_in: TRUE if the user is registered and signed in.
+ * - $is_admin: TRUE if the user has permission to access administration pages.
+ *
+ * Site identity:
+ * - $front_page: The URL of the front page. Use this instead of $base_path,
+ *   when linking to the front page. This includes the language domain or
+ *   prefix.
+ * - $logo: The path to the logo image, as defined in theme configuration.
+ * - $site_name: The name of the site, empty when display has been disabled
+ *   in theme settings.
+ * - $site_slogan: The slogan of the site, empty when display has been disabled
+ *   in theme settings.
+ * - $hide_site_name: TRUE if the site name has been toggled off on the theme
+ *   settings page. If hidden, the "element-invisible" class is added to make
+ *   the site name visually hidden, but still accessible.
+ * - $hide_site_slogan: TRUE if the site slogan has been toggled off on the
+ *   theme settings page. If hidden, the "element-invisible" class is added to
+ *   make the site slogan visually hidden, but still accessible.
+ *
+ * Navigation:
+ * - $main_menu (array): An array containing the Main menu links for the
+ *   site, if they have been configured.
+ * - $secondary_menu (array): An array containing the Secondary menu links for
+ *   the site, if they have been configured.
+ * - $breadcrumb: The breadcrumb trail for the current page.
+ *
+ * Page content (in order of occurrence in the default page.tpl.php):
+ * - $title_prefix (array): An array containing additional output populated by
+ *   modules, intended to be displayed in front of the main title tag that
+ *   appears in the template.
+ * - $title: The page title, for use in the actual HTML content.
+ * - $title_suffix (array): An array containing additional output populated by
+ *   modules, intended to be displayed after the main title tag that appears in
+ *   the template.
+ * - $messages: HTML for status and error messages. Should be displayed
+ *   prominently.
+ * - $tabs (array): Tabs linking to any sub-pages beneath the current page
+ *   (e.g., the view and edit tabs when displaying a node).
+ * - $action_links (array): Actions local to the page, such as 'Add menu' on
+ *   the menu administration interface.
+ * - $feed_icons: A string of all feed icons for the current page.
+ * - $node: The node entity, if there is an automatically-loaded node
+ *   associated with the page, and the node ID is the second argument
+ *   in the page's path (e.g. node/12345 and node/12345/revisions, but not
+ *   comment/reply/12345).
+ *
+ * Regions:
+ * - $page['header']: Items for the header region.
+ * - $page['featured']: Items for the featured region.
+ * - $page['highlighted']: Items for the highlighted content region.
+ * - $page['help']: Dynamic help text, mostly for admin pages.
+ * - $page['content']: The main content of the current page.
+ * - $page['sidebar_first']: Items for the first sidebar.
+ * - $page['triptych_first']: Items for the first triptych.
+ * - $page['triptych_middle']: Items for the middle triptych.
+ * - $page['triptych_last']: Items for the last triptych.
+ * - $page['footer_firstcolumn']: Items for the first footer column.
+ * - $page['footer_secondcolumn']: Items for the second footer column.
+ * - $page['footer_thirdcolumn']: Items for the third footer column.
+ * - $page['footer_fourthcolumn']: Items for the fourth footer column.
+ * - $page['footer']: Items for the footer region.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_page()
+ * @see template_process()
+ * @see bartik_process_page()
+ * @see html.tpl.php
+ *
+ * @ingroup themeable
+ */
+?>
+<div id="page-wrapper"><div id="page">
+
+  <header id="header" class="<?php print $secondary_menu ? 'with-secondary-menu': 'without-secondary-menu'; ?>" role="banner"><div class="section clearfix">
+    <?php if ($secondary_menu): ?>
+      <nav id="secondary-menu" class="navigation" role="navigation">
+        <?php print theme('links__system_secondary_menu', array(
+          'links' => $secondary_menu,
+          'attributes' => array(
+            'id' => 'secondary-menu-links',
+            'class' => array('links', 'inline', 'clearfix'),
+          ),
+          'heading' => array(
+            'text' => t('Secondary menu'),
+            'level' => 'h2',
+            'class' => array('element-invisible'),
+          ),
+        )); ?>
+      </nav> <!-- /#secondary-menu -->
+    <?php endif; ?>
+
+
+    <?php if ($logo): ?>
+      <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
+        <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
+      </a>
+    <?php endif; ?>
+
+    <?php if ($site_name || $site_slogan): ?>
+      <div id="name-and-slogan"<?php if ($hide_site_name && $hide_site_slogan) { print ' class="element-invisible"'; } ?>>
+
+        <?php if ($site_name): ?>
+          <?php if ($title): ?>
+            <div id="site-name"<?php if ($hide_site_name) { print ' class="element-invisible"'; } ?>>
+              <strong>
+                <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
+              </strong>
+            </div>
+          <?php else: /* Use h1 when the content title is empty */ ?>
+            <h1 id="site-name"<?php if ($hide_site_name) { print ' class="element-invisible"'; } ?>>
+              <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
+            </h1>
+          <?php endif; ?>
+        <?php endif; ?>
+
+        <?php if ($site_slogan): ?>
+          <div id="site-slogan"<?php if ($hide_site_slogan) { print ' class="element-invisible"'; } ?>>
+            <?php print $site_slogan; ?>
+          </div>
+        <?php endif; ?>
+
+      </div> <!-- /#name-and-slogan -->
+    <?php endif; ?>
+
+    <?php print render($page['header']); ?>
+
+    <?php if ($main_menu): ?>
+      <nav id="main-menu" class="navigation" role="navigation">
+        <?php print theme('links__system_main_menu', array(
+          'links' => $main_menu,
+          'attributes' => array(
+            'id' => 'main-menu-links',
+            'class' => array('links', 'clearfix'),
+          ),
+          'heading' => array(
+            'text' => t('Main menu'),
+            'level' => 'h2',
+            'class' => array('element-invisible'),
+          ),
+        )); ?>
+      </nav> <!-- /#main-menu -->
+    <?php endif; ?>
+
+
+
+  </div></header> <!-- /.section, /#header -->
+
+  <?php if ($messages): ?>
+    <div id="messages"><div class="section clearfix">
+      <?php print $messages; ?>
+    </div></div> <!-- /.section, /#messages -->
+  <?php endif; ?>
+
+  <?php if ($page['featured']): ?>
+    <aside id="featured"><div class="section clearfix">
+      <?php print render($page['featured']); ?>
+    </div></aside> <!-- /.section, /#featured -->
+  <?php endif; ?>
+
+  <div id="main-wrapper" class="clearfix"><div id="main" class="clearfix">
+
+    <?php print $breadcrumb; ?>
+
+    <main id="content" class="column" role="main"><section class="section">
+      <?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
+      <a id="main-content"></a>
+      <?php print render($title_prefix); ?>
+      <?php if ($title): ?>
+        <h1 class="title" id="page-title">
+          <?php print $title; ?>
+        </h1>
+      <?php endif; ?>
+      <?php print render($title_suffix); ?>
+      <?php if ($tabs): ?>
+        <nav class="tabs" role="navigation">
+          <?php print render($tabs); ?>
+        </nav>
+      <?php endif; ?>
+      <?php print render($page['help']); ?>
+      <?php if ($action_links): ?>
+        <ul class="action-links">
+          <?php print render($action_links); ?>
+        </ul>
+      <?php endif; ?>
+      <?php print render($page['content']); ?>
+      <?php print $feed_icons; ?>
+
+    </section></main> <!-- /.section, /#content -->
+
+    <?php if ($page['sidebar_first']): ?>
+      <div id="sidebar-first" class="column sidebar"><aside class="section">
+        <?php print render($page['sidebar_first']); ?>
+      </aside></div> <!-- /.section, /#sidebar-first -->
+    <?php endif; ?>
+
+    <?php if ($page['sidebar_second']): ?>
+      <div id="sidebar-second" class="column sidebar"><aside class="section">
+        <?php print render($page['sidebar_second']); ?>
+      </aside></div> <!-- /.section, /#sidebar-second -->
+    <?php endif; ?>
+
+  </div></div> <!-- /#main, /#main-wrapper -->
+
+  <?php if ($page['triptych_first'] || $page['triptych_middle'] || $page['triptych_last']): ?>
+    <div id="triptych-wrapper"><aside id="triptych" class="clearfix">
+      <?php print render($page['triptych_first']); ?>
+      <?php print render($page['triptych_middle']); ?>
+      <?php print render($page['triptych_last']); ?>
+    </aside></div> <!-- /#triptych, /#triptych-wrapper -->
+  <?php endif; ?>
+
+  <div id="footer-wrapper"><footer class="section">
+
+    <?php if ($page['footer_firstcolumn'] || $page['footer_secondcolumn'] || $page['footer_thirdcolumn'] || $page['footer_fourthcolumn']): ?>
+      <div id="footer-columns" class="clearfix">
+        <?php print render($page['footer_firstcolumn']); ?>
+        <?php print render($page['footer_secondcolumn']); ?>
+        <?php print render($page['footer_thirdcolumn']); ?>
+        <?php print render($page['footer_fourthcolumn']); ?>
+      </div> <!-- /#footer-columns -->
+    <?php endif; ?>
+
+    <?php if ($page['footer']): ?>
+      <div id="footer" role="contentinfo" class="clearfix">
+        <?php print render($page['footer']); ?>
+      </div> <!-- /#footer -->
+    <?php endif; ?>
+
+  </footer></div> <!-- /.section, /#footer-wrapper -->
+
+</div></div> <!-- /#page, /#page-wrapper -->
diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme
index 0360b6e..61212fe 100644
--- a/core/themes/seven/seven.theme
+++ b/core/themes/seven/seven.theme
@@ -6,12 +6,12 @@
  */
 
 /**
- * Implements hook_preprocess_HOOK() for maintenance-page.html.twig.
+ * Implements hook_preprocess_HOOK() for maintenance-page.tpl.php.
  */
 function seven_preprocess_maintenance_page(&$vars) {
   // While markup for normal pages is split into page.tpl.php and html.tpl.php,
   // the markup for the maintenance page is all in the single
-  // maintenance-page.html.twig template. So, to have what's done in
+  // maintenance-page.tpl.php template. So, to have what's done in
   // seven_preprocess_html() also happen on the maintenance page, it has to be
   // called here.
   seven_preprocess_html($vars);
diff --git a/core/themes/seven/templates/maintenance-page.html.twig b/core/themes/seven/templates/maintenance-page.html.twig
deleted file mode 100644
index 02af912..0000000
--- a/core/themes/seven/templates/maintenance-page.html.twig
+++ /dev/null
@@ -1,57 +0,0 @@
-{#
-/**
- * @file
- * Seven's theme implementation to display a single Drupal page while offline.
- *
- * All of the available variables are mirrored in page.html.twig.
- *
- * @see template_preprocess()
- * @see template_preprocess_maintenance_page()
- * @see seven_preprocess_maintenance_page()
- *
- * @ingroup themeable
- */
-#}
-<!DOCTYPE html>
-<html lang="{{ language.langcode }}" dir="{{ language.dir }}">
-  <head>
-    <title>{{ head_title }}</title>
-    {{ head }}
-    {{ styles }}
-    {{ scripts }}
-  </head>
-  <body{{ attributes }}>
-
-  {{ page_top }}
-
-  <header id="branding">
-    {% if title %}<h1 class="page-title">{{ title }}</h1>{% endif %}
-  </header>
-
-  <div id="page">
-    <div id="sidebar-first" class="sidebar">
-      {% if logo %}
-        <img id="logo" src="{{ logo }}" alt="{{ site_name }}" />
-      {% endif %}
-      {{ sidebar_first }}
-    </div>
-
-    <main id="content" class="clearfix">
-      {% if messages %}
-        <div id="console">{{ messages }}</div>
-      {% endif %}
-      {% if help %}
-        <div id="help">
-          {{ help }}
-        </div>
-      {% endif %}
-      {{ content }}
-    </main>
-  </div>
-
-  <footer role="contentinfo">
-    {{ page_bottom }}
-  </footer>
-
-  </body>
-</html>
diff --git a/core/themes/seven/templates/maintenance-page.tpl.php b/core/themes/seven/templates/maintenance-page.tpl.php
new file mode 100644
index 0000000..fff11d8
--- /dev/null
+++ b/core/themes/seven/templates/maintenance-page.tpl.php
@@ -0,0 +1,62 @@
+<?php
+
+/**
+ * @file
+ * Seven's theme implementation to display a single Drupal page while offline.
+ *
+ * All of the available variables are mirrored in page.tpl.php.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_maintenance_page()
+ * @see seven_preprocess_maintenance_page()
+ *
+ * @ingroup themeable
+ */
+?>
+<!DOCTYPE html>
+<html lang="<?php print $language->langcode ?>" dir="<?php print $language->dir ?>">
+  <head>
+    <title><?php print $head_title; ?></title>
+    <?php print $head; ?>
+    <?php print $styles; ?>
+    <?php print $scripts; ?>
+  </head>
+  <body class="<?php print $attributes['class']; ?>">
+
+  <?php print $page_top; ?>
+
+  <header id="branding">
+    <?php if ($title): ?><h1 class="page-title"><?php print $title; ?></h1><?php endif; ?>
+  </header>
+
+  <div id="page">
+
+    <div id="sidebar-first" class="sidebar">
+      <?php if ($logo): ?>
+        <img id="logo" src="<?php print $logo ?>" alt="<?php print $site_name ?>" />
+      <?php endif; ?>
+      <?php if ($sidebar_first): ?>
+        <?php print $sidebar_first ?>
+      <?php endif; ?>
+    </div>
+
+    <main id="content" class="clearfix">
+      <?php if ($messages): ?>
+        <div id="console"><?php print $messages; ?></div>
+      <?php endif; ?>
+      <?php if ($help): ?>
+        <div id="help">
+          <?php print $help; ?>
+        </div>
+      <?php endif; ?>
+      <?php print $content; ?>
+    </main>
+
+  </div>
+
+  <footer role="contentinfo">
+    <?php print $page_bottom; ?>
+  </footer>
+
+  </body>
+</html>
diff --git a/core/themes/seven/templates/page.html.twig b/core/themes/seven/templates/page.html.twig
deleted file mode 100644
index 7020706..0000000
--- a/core/themes/seven/templates/page.html.twig
+++ /dev/null
@@ -1,110 +0,0 @@
-{#
-/**
- * @file
- * Seven's theme implementation to display a single Drupal page.
- *
- * The doctype, html, head, and body tags are not in this template. Instead
- * they can be found in the html.html.twig template normally located in the
- * core/modules/system directory.
- *
- * Available variables:
- *
- * General utility variables:
- * - base_path: The base URL path of the Drupal installation. Will usually be
- *   "/" unless you have installed Drupal in a sub-directory.
- * - is_front: A flag indicating if the current page is the front page.
- * - logged_in: A flag indicating if the user is registered and signed in.
- * - is_admin: A flag indicating if the user has permission to access
- *   administration pages.
- *
- * Site identity:
- * - front_page: The URL of the front page. Use this instead of base_path when
- *   linking to the front page. This includes the language domain or prefix.
- * - logo: The url of the logo image, as defined in theme settings.
- * - site_name: The name of the site. This is empty when displaying the site
- *   name has been disabled in the theme settings.
- * - site_slogan: The slogan of the site. This is empty when displaying the site
- *   slogan has been disabled in theme settings.
- *
- * Navigation:
- * - main_menu: The Main menu links for the site, if they have been configured.
- * - secondary_menu: The Secondary menu links for the site, if they have been
- *   configured.
- * - breadcrumb: The breadcrumb trail for the current page.
- *
- * Page content (in order of occurrence in the default page.html.twig):
- * - title_prefix: Additional output populated by modules, intended to be
- *   displayed in front of the main title tag that appears in the template.
- * - title: The page title, for use in the actual content.
- * - title_suffix: Additional output populated by modules, intended to be
- *   displayed after the main title tag that appears in the template.
- * - messages: Status and error messages. Should be displayed prominently.
- * - tabs: Tabs linking to any sub-pages beneath the current page (e.g., the
- *   view and edit tabs when displaying a node).
- * - action_links: Actions local to the page, such as "Add menu" on the menu
- *   administration interface.
- * - feed_icons: All feed icons for the current page.
- * - node: Fully loaded node, if there is an automatically-loaded node
- *   associated with the page and the node ID is the second argument in the
- *   page's path (e.g. node/12345 and node/12345/revisions, but not
- *   comment/reply/12345).
- *
- * Regions:
- * - page.header: Items for the header region.
- * - page.highlighted: Items for the highlighted content region.
- * - page.help: Dynamic help text, mostly for admin pages.
- * - page.content: The main content of the current page.
- * - page.sidebar_first: Items for the first sidebar.
- * - page.sidebar_second: Items for the second sidebar.
- * - page.footer: Items for the footer region.
- *
- * @see template_preprocess()
- * @see template_preprocess_page()
- * @see seven_preprocess_page()
- * @see template_process()
- * @see template_process_page()
- * @see html.html.twig
- *
- * @ingroup themeable
- */
-#}
-  <header id="branding" class="clearfix" role="navigation">
-    {{ breadcrumb }}
-    {{ title_prefix }}
-    {% if title %}
-      <h1 class="page-title">{{ title }}</h1>
-    {% endif %}
-    {{ title_suffix }}
-    {% if primary_local_tasks %}
-      <div role="tab">{{ primary_local_tasks }}</div>
-    {% endif %}
-  </header>
-
-  <div id="page">
-    {% if secondary_local_tasks %}
-      <div class="tabs-secondary clearfix" role="navigation">{{ secondary_local_tasks }}</div>
-    {% endif %}
-
-    <main id="content" class="clearfix" role="main">
-      <div class="element-invisible"><a id="main-content"></a></div>
-      {% if messages %}
-        <div id="console" class="clearfix">{{ messages }}</div>
-      {% endif %}
-      {% if page.help %}
-        <div id="help">
-          {{ page.help }}
-        </div>
-      {% endif %}
-      {% if action_links %}
-        <ul class="action-links">
-          {{ action_links }}
-        </ul>
-      {% endif %}
-      {{ page.content }}
-    </main>
-
-    <footer id="footer" role="contentinfo">
-      {{ feed_icons }}
-    </footer>
-
-  </div>
diff --git a/core/themes/seven/templates/page.tpl.php b/core/themes/seven/templates/page.tpl.php
new file mode 100644
index 0000000..d1a290c
--- /dev/null
+++ b/core/themes/seven/templates/page.tpl.php
@@ -0,0 +1,54 @@
+<?php
+
+/**
+ * @file
+ * Seven's theme implementation to display a single Drupal page.
+ *
+ * The doctype, html, head, and body tags are not in this template. Instead
+ * they can be found in the html.tpl.php template normally located in the
+ * core/modules/system directory.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_page()
+ * @see template_process()
+ * @see seven_preprocess_page()
+ *
+ * @ingroup themeable
+ */
+?>
+  <header id="branding" class="clearfix" role="navigation">
+    <?php print $breadcrumb; ?>
+    <?php print render($title_prefix); ?>
+    <?php if ($title): ?>
+      <h1 class="page-title"><?php print $title; ?></h1>
+    <?php endif; ?>
+    <?php print render($title_suffix); ?>
+    <?php if ($primary_local_tasks): ?>
+      <?php print '<div role="tab">' . render($primary_local_tasks) . '</div>'; ?>
+    <?php endif; ?>
+  </header>
+
+  <div id="page">
+    <?php if ($secondary_local_tasks): ?>
+      <div class="tabs-secondary clearfix" role="navigation"><?php print render($secondary_local_tasks); ?></div>
+    <?php endif; ?>
+
+    <main id="content" class="clearfix" role="main">
+      <div class="element-invisible"><a id="main-content"></a></div>
+      <?php if ($messages): ?>
+        <div id="console" class="clearfix"><?php print $messages; ?></div>
+      <?php endif; ?>
+      <?php if ($page['help']): ?>
+        <div id="help">
+          <?php print render($page['help']); ?>
+        </div>
+      <?php endif; ?>
+      <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
+      <?php print render($page['content']); ?>
+    </main>
+
+    <footer id="footer" role="contentinfo">
+      <?php print $feed_icons; ?>
+    </footer>
+
+  </div>
diff --git a/core/vendor/twig/twig/doc/advanced.rst b/core/vendor/twig/twig/doc/advanced.rst
index 06ad771..443d234 100644
--- a/core/vendor/twig/twig/doc/advanced.rst
+++ b/core/vendor/twig/twig/doc/advanced.rst
@@ -640,7 +640,7 @@ responsible for parsing the tag and compiling it to PHP.
 Operators
 ~~~~~~~~~
 
-The ``getOperators()`` methods allows to add new operators. Here is how to add
+The ``getOperators()`` methods allows to add operators. Here is how to add
 ``!``, ``||``, and ``&&`` operators::
 
     class Project_Twig_Extension extends Twig_Extension
@@ -664,7 +664,7 @@ The ``getOperators()`` methods allows to add new operators. Here is how to add
 Tests
 ~~~~~
 
-The ``getTests()`` methods allows to add new test functions::
+The ``getTests()`` methods allows to add test functions::
 
     class Project_Twig_Extension extends Twig_Extension
     {
diff --git a/core/vendor/twig/twig/doc/api.rst b/core/vendor/twig/twig/doc/api.rst
index dbba705..3e6ed8b 100644
--- a/core/vendor/twig/twig/doc/api.rst
+++ b/core/vendor/twig/twig/doc/api.rst
@@ -299,7 +299,7 @@ is still fresh, given the last modification time, or ``false`` otherwise.
 Using Extensions
 ----------------
 
-Twig extensions are packages that add new features to Twig. Using an
+Twig extensions are packages that add features to Twig. Using an
 extension is as simple as using the ``addExtension()`` method::
 
     $twig->addExtension(new Twig_Extension_Sandbox());
