diff --git a/core/core.services.yml b/core/core.services.yml
index f371585..4e28f55 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -211,12 +211,17 @@ services:
   plugin.manager.menu.local_task:
     class: Drupal\Core\Menu\LocalTaskManager
     arguments: ['@controller_resolver', '@request', '@router.route_provider', '@module_handler', '@cache.cache', '@language_manager', '@access_manager', '@current_user']
+    scope: request
   plugin.manager.menu.contextual_link:
     class: Drupal\Core\Menu\ContextualLinkManager
     arguments: ['@controller_resolver', '@module_handler', '@cache.cache', '@language_manager', '@access_manager', '@current_user']
   request:
     class: Symfony\Component\HttpFoundation\Request
-    synthetic: true
+    # @TODO the synthetic setting must be uncommented whenever drupal_session_initialize()
+    # is run after there is a request and the following two lines should be removed.
+    factory_class: Symfony\Component\HttpFoundation\Request
+    factory_method: createFromGlobals
+    #synthetic: true
   event_dispatcher:
     class: Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher
     arguments: ['@service_container']
@@ -360,10 +365,6 @@ services:
     tags:
       - { name: event_subscriber }
     arguments: ['@settings']
-  ajax_response_subscriber:
-    class: Drupal\Core\EventSubscriber\AjaxResponseSubscriber
-    tags:
-      - { name: event_subscriber }
   route_enhancer.authentication:
     class: Drupal\Core\Routing\Enhancer\AuthenticationEnhancer
     calls:
@@ -435,6 +436,7 @@ services:
       - [setCurrentUser, ['@?current_user']]
     tags:
       - { name: event_subscriber }
+    scope: request
   access_route_subscriber:
     class: Drupal\Core\EventSubscriber\AccessRouteSubscriber
     tags:
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index f414d53..109ff24 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1552,7 +1552,7 @@ function watchdog($type, $message, array $variables = NULL, $severity = WATCHDOG
       $log_entry['referer'] = $request->headers->get('Referer', '');
       $log_entry['ip'] = $request->getClientIP();
     }
-    catch (DependencyInjectionRuntimeException $e) {
+    catch (\InvalidArgumentException $e) {
       // We are not in a request context.
     }
 
@@ -1718,18 +1718,9 @@ function drupal_set_title($title = NULL, $output = Title::CHECK_PLAIN) {
  *   The user session object.
  */
 function drupal_anonymous_user() {
-  try {
-    $request = \Drupal::request();
-    $hostname = $request->getClientIP();
-  }
-  catch (DependencyInjectionRuntimeException $e) {
-    // We are not in a request context.
-    $hostname = '';
-  }
-
   $values = array(
     'uid' => 0,
-    'hostname' => $hostname,
+    'hostname' => \Drupal::request()->getClientIP(),
     'roles' => array(DRUPAL_ANONYMOUS_RID),
   );
   return new UserSession($values);
@@ -1870,13 +1861,10 @@ function drupal_handle_request($test_only = FALSE) {
   // @todo Remove this once everything in the bootstrap has been
   //   converted to services in the DIC.
   $kernel->boot();
+  drupal_bootstrap(DRUPAL_BOOTSTRAP_CODE);
 
   // Create a request object from the HttpFoundation.
   $request = Request::createFromGlobals();
-  \Drupal::getContainer()->set('request', $request);
-
-  drupal_bootstrap(DRUPAL_BOOTSTRAP_CODE);
-
   $response = $kernel->handle($request)->prepare($request)->send();
 
   $kernel->terminate($request, $response);
@@ -2006,8 +1994,6 @@ function _drupal_bootstrap_kernel() {
   if (!\Drupal::getContainer()) {
     $kernel = new DrupalKernel('prod', drupal_classloader());
     $kernel->boot();
-    $request = Request::createFromGlobals();
-    \Drupal::getContainer()->set('request', $request);
   }
 }
 
diff --git a/core/includes/common.inc b/core/includes/common.inc
index fc46b9b..138c11a 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -399,15 +399,14 @@ function drupal_add_feed($url = NULL, $title = '') {
   if (isset($url)) {
     $stored_feed_links[$url] = theme('feed_icon', array('url' => $url, 'title' => $title));
 
-    $build['#attached']['drupal_add_html_head_link'][][] = array(
+    drupal_add_html_head_link(array(
       'rel' => 'alternate',
       'type' => 'application/rss+xml',
       'title' => $title,
       // Force the URL to be absolute, for consistency with other <link> tags
       // output by Drupal.
       'href' => url($url, array('absolute' => TRUE)),
-    );
-    drupal_render($build);
+    ));
   }
   return $stored_feed_links;
 }
diff --git a/core/includes/install.inc b/core/includes/install.inc
index f6848c9..4e70be4 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -625,19 +625,10 @@ function drupal_install_system() {
   // Create tables.
   drupal_install_schema('system');
 
-  if (!\Drupal::getContainer()->has('kernel')) {
-    // Immediately boot a kernel to have real services ready. If there's already
-    // an initialized request object in the pre-kernel container, persist it in
-    // the post-kernel container.
-    if (\Drupal::getContainer()->initialized('request')) {
-      $request = \Drupal::request();
-    }
+  if (!drupal_container()->has('kernel')) {
+    // Immediately boot a kernel to have real services ready.
     $kernel = new DrupalKernel('install', drupal_classloader(), FALSE);
     $kernel->boot();
-    if (isset($request)) {
-      \Drupal::getContainer()->set('request', $request);
-    }
-
   }
 
   $system_path = drupal_get_path('module', 'system');
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 98be6de..07fda79 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -363,11 +363,17 @@ function list_themes($refresh = FALSE) {
     $list = 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.
-    try {
-      $themes = system_list('theme');
+    if (!defined('MAINTENANCE_MODE')) {
+      try {
+        $themes = system_list('theme');
+      }
+      catch (Exception $e) {
+        // If the database is not available, rebuild the theme data.
+        $themes = _system_rebuild_theme_data();
+      }
     }
-    catch (Exception $e) {
-      // If the database is not available, rebuild the theme data.
+    else {
+      // Scan the installation when the database should not be read.
       $themes = _system_rebuild_theme_data();
     }
 
@@ -1268,14 +1274,8 @@ function template_preprocess_status_messages(&$variables) {
  *     is used as its CSS class. Each link should be itself an array, with the
  *     following elements:
  *     - title: The link text.
- *     - route_name: (optional) The name of the route to link to. If omitted
- *       (and if 'href' is omitted as well), the 'title' is shown as
- *       a plain text item in the links list.
- *     - route_parameters: (optional) An array of route parameters for the link.
- *     - href: (optional) The link URL. It is preferred to use 'route_name' and
- *       'route parameters' for internal links. Use 'href' for links to external
- *       URLs. If omitted (and if 'route_name' is omitted as well), the 'title'
- *       is shown as a plain text item in the links list.
+ *     - href: The link URL. If omitted, the 'title' is shown as a plain text
+ *       item in the links list.
  *     - html: (optional) Whether or not 'title' is HTML. If set, the title
  *       will not be passed through
  *       \Drupal\Component\Utility\String::checkPlain().
@@ -2221,12 +2221,7 @@ function template_preprocess_html(&$variables) {
   if (theme_get_setting('features.favicon')) {
     $favicon = theme_get_setting('favicon.url');
     $type = theme_get_setting('favicon.mimetype');
-    $build['#attached']['drupal_add_html_head_link'][][] = array(
-      'rel' => 'shortcut icon',
-      'href' => Url::stripDangerousProtocols($favicon),
-      'type' => $type,
-    );
-    drupal_render($build);
+    drupal_add_html_head_link(array('rel' => 'shortcut icon', 'href' => Url::stripDangerousProtocols($favicon), 'type' => $type));
   }
 
   $site_config = \Drupal::config('system.site');
@@ -2509,12 +2504,7 @@ function template_preprocess_maintenance_page(&$variables) {
   if (theme_get_setting('features.favicon')) {
     $favicon = theme_get_setting('favicon.url');
     $type = theme_get_setting('favicon.mimetype');
-    $build['#attached']['drupal_add_html_head_link'][][] = array(
-      'rel' => 'shortcut icon',
-      'href' => Url::stripDangerousProtocols($favicon),
-      'type' => $type,
-    );
-    drupal_render($build);
+    drupal_add_html_head_link(array('rel' => 'shortcut icon', 'href' => Url::stripDangerousProtocols($favicon), 'type' => $type));
   }
 
   // Get all region content set with drupal_add_region_content().
diff --git a/core/lib/Drupal/Component/Plugin/PluginBag.php b/core/lib/Drupal/Component/Plugin/PluginBag.php
index 8ab051a..23d2d26 100644
--- a/core/lib/Drupal/Component/Plugin/PluginBag.php
+++ b/core/lib/Drupal/Component/Plugin/PluginBag.php
@@ -9,6 +9,9 @@
 
 /**
  * Defines an object which stores multiple plugin instances to lazy load them.
+ *
+ * The \ArrayAccess implementation is only for backwards compatibility, it is
+ * deprecated and should not be used by new code.
  */
 abstract class PluginBag implements \Iterator, \Countable {
 
@@ -27,7 +30,7 @@
   protected $instanceIDs = array();
 
   /**
-   * Initializes and stores a plugin.
+   * Initializes a plugin and stores the result in $this->pluginInstances.
    *
    * @param string $instance_id
    *   The ID of the plugin instance to initialize.
@@ -82,7 +85,7 @@ public function set($instance_id, $value) {
   /**
    * Removes an initialized plugin.
    *
-   * The plugin can still be used; it will be reinitialized.
+   * The plugin can still be used, it will be reinitialized.
    *
    * @param string $instance_id
    *   The ID of the plugin instance to remove.
@@ -92,7 +95,7 @@ public function remove($instance_id) {
   }
 
   /**
-   * Adds an instance ID to the available instance IDs.
+   * Adds an instance ID to the array of available instance IDs.
    *
    * @param string $id
    *   The ID of the plugin instance to add.
@@ -114,7 +117,7 @@ public function getInstanceIds() {
   }
 
   /**
-   * Sets all instance IDs.
+   * Sets the instance IDs property.
    *
    * @param array $instance_ids
    *   An associative array of instance IDs.
@@ -135,28 +138,28 @@ public function removeInstanceId($instance_id) {
   }
 
   /**
-   * {@inheritdoc}
+   * Implements \Iterator::current().
    */
   public function current() {
     return $this->get($this->key());
   }
 
   /**
-   * {@inheritdoc}
+   * Implements \Iterator::next().
    */
   public function next() {
     next($this->instanceIDs);
   }
 
   /**
-   * {@inheritdoc}
+   * Implements \Iterator::key().
    */
   public function key() {
     return key($this->instanceIDs);
   }
 
   /**
-   * {@inheritdoc}
+   * Implements \Iterator::valid().
    */
   public function valid() {
     $key = key($this->instanceIDs);
@@ -164,14 +167,14 @@ public function valid() {
   }
 
   /**
-   * {@inheritdoc}
+   * Implements \Iterator::rewind().
    */
   public function rewind() {
     reset($this->instanceIDs);
   }
 
   /**
-   * {@inheritdoc}
+   * Implements \Countable::count().
    */
   public function count() {
     return count($this->instanceIDs);
diff --git a/core/lib/Drupal/Core/Ajax/AjaxResponse.php b/core/lib/Drupal/Core/Ajax/AjaxResponse.php
index 6619a56..44d146a 100644
--- a/core/lib/Drupal/Core/Ajax/AjaxResponse.php
+++ b/core/lib/Drupal/Core/Ajax/AjaxResponse.php
@@ -9,7 +9,6 @@
 
 use Symfony\Component\HttpFoundation\JsonResponse;
 use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\Response;
 
 /**
  * JSON response object for AJAX requests.
@@ -47,25 +46,17 @@ public function addCommand($command, $prepend = FALSE) {
   }
 
   /**
-   * {@inheritdoc}
-   *
    * Sets the response's data to be the array of AJAX commands.
-   */
-  public function prepare(Request $request) {
-    $this->prepareResponse($request);
-    return $this;
-  }
-
-  /**
-   * Sets the rendered AJAX right before the response is prepared.
    *
-   * @param \Symfony\Component\HttpFoundation\Request $request
-   *   The request object.
+   * @param Request $request
+   *   A request object.
+   *
+   * @return Response
+   *   The current response.
    */
-  public function prepareResponse(Request $request) {
-    if ($this->data == '{}') {
-      $this->setData($this->ajaxRender($request));
-    }
+  public function prepare(Request $request) {
+    $this->setData($this->ajaxRender($request));
+    return parent::prepare($request);
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Config/FileStorage.php b/core/lib/Drupal/Core/Config/FileStorage.php
index bf178c5..2ac9cee 100644
--- a/core/lib/Drupal/Core/Config/FileStorage.php
+++ b/core/lib/Drupal/Core/Config/FileStorage.php
@@ -204,11 +204,14 @@ public function listAll($prefix = '') {
       throw new StorageException($this->directory . '/ not found.');
     }
     $extension = '.' . static::getFileExtension();
-    $files = glob($this->directory . '/' . $prefix . '*' . $extension);
-    $clean_name = function ($value) use ($extension) {
-      return basename($value, $extension);
-    };
-    return array_map($clean_name, $files);
+    $files = new \GlobIterator($this->directory . '/' . $prefix . '*' . $extension);
+
+    $names = array();
+    foreach ($files as $file) {
+      $names[] = $file->getBasename($extension);
+    }
+
+    return $names;
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php
index e8442ea..20d20fc 100644
--- a/core/lib/Drupal/Core/Config/InstallStorage.php
+++ b/core/lib/Drupal/Core/Config/InstallStorage.php
@@ -134,10 +134,9 @@ public function getComponentNames($type, array $list) {
     foreach ($list as $name) {
       $directory = $this->getComponentFolder($type, $name);
       if (file_exists($directory)) {
-        $files = glob($directory . '/*' . $extension);
-        foreach ($files as $filename) {
-          $name = basename($filename, $extension);
-          $folders[$name] = $directory;
+        $files = new \GlobIterator($directory . '/*' . $extension);
+        foreach ($files as $file) {
+          $folders[$file->getBasename($extension)] = $directory;
         }
       }
     }
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 8d6e28c..3e97607 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -369,17 +369,10 @@ protected function getKernelParameters() {
   protected function initializeContainer() {
     $this->containerNeedsDumping = FALSE;
     $persist = $this->getServicesToPersist();
-    // The request service requires custom persisting logic, since it is also
-    // potentially scoped. During Drupal installation, there is a request
-    // service without a request scope.
-    $request_scope = FALSE;
-    if (isset($this->container)) {
-      if ($this->container->isScopeActive('request')) {
-        $request_scope = TRUE;
-      }
-      if ($this->container->initialized('request')) {
-        $request = $this->container->get('request');
-      }
+    // If we are rebuilding the kernel and we are in a request scope, store
+    // request info so we can add them back after the rebuild.
+    if (isset($this->container) && $this->container->hasScope('request')) {
+      $request = $this->container->get('request');
     }
     $this->container = NULL;
     $class = $this->getClassName();
@@ -452,10 +445,8 @@ protected function initializeContainer() {
     // Set the class loader which was registered as a synthetic service.
     $this->container->set('class_loader', $this->classLoader);
     // If we have a request set it back to the new container.
-    if ($request_scope) {
-      $this->container->enterScope('request');
-    }
     if (isset($request)) {
+      $this->container->enterScope('request');
       $this->container->set('request', $request);
     }
     \Drupal::setContainer($this->container);
diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php
index 3dbbb39..604bf5d 100644
--- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php
+++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php
@@ -225,11 +225,16 @@ class EntityType extends Plugin {
   public $bundle_keys;
 
   /**
-   * The name of the entity type which provides bundles.
+   * The base router path for the entity type's field administration page.
+   *
+   * If the entity type has a bundle, include {bundle} in the path.
+   *
+   * For example, the node entity type specifies
+   * "admin/structure/types/manage/{bundle}" as its base field admin path.
    *
    * @var string (optional)
    */
-  public $bundle_entity_type = 'bundle';
+  public $route_base_path;
 
   /**
    * Link templates using the URI template syntax.
diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index 221d4ee..5fc2d16 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -301,9 +301,9 @@ public function getAdminPath($entity_type, $bundle) {
     $admin_path = '';
     $entity_info = $this->getDefinition($entity_type);
     // Check for an entity type's admin base path.
-    if (isset($entity_info['links']['admin-form'])) {
-      $route_parameters[$entity_info['bundle_entity_type']] = $bundle;
-      $admin_path = \Drupal::urlGenerator()->getPathFromRoute($entity_info['links']['admin-form'], $route_parameters);
+    if (isset($entity_info['route_base_path'])) {
+      // Replace any dynamic 'bundle' portion of the path with the actual bundle.
+      $admin_path = str_replace('{bundle}', $bundle, $entity_info['route_base_path']);
     }
 
     return $admin_path;
@@ -313,11 +313,10 @@ public function getAdminPath($entity_type, $bundle) {
    * {@inheritdoc}
    */
   public function getAdminRouteInfo($entity_type, $bundle) {
-    $entity_info = $this->getDefinition($entity_type);
     return array(
       'route_name' => "field_ui.overview_$entity_type",
       'route_parameters' => array(
-        $entity_info['bundle_entity_type'] => $bundle,
+        'bundle' => $bundle,
       )
     );
   }
diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
index e89966a..d561f53 100644
--- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
@@ -164,11 +164,6 @@ public function getViewBuilder($entity_type);
    *
    * @return string
    *   The administration path for an entity type bundle, if it exists.
-   *
-   * @deprecated since version 8.0
-   *   System paths should not be used - use route names and parameters.
-   *
-   * @see self::getAdminRouteInfo()
    */
   public function getAdminPath($entity_type, $bundle);
 
diff --git a/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php
deleted file mode 100644
index cf4dca1..0000000
--- a/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\EventSubscriber\AjaxResponseSubscriber.
- */
-
-namespace Drupal\Core\EventSubscriber;
-
-use Drupal\Core\Ajax\AjaxResponse;
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
-use Symfony\Component\HttpKernel\HttpKernelInterface;
-use Symfony\Component\HttpKernel\KernelEvents;
-
-class AjaxResponseSubscriber implements EventSubscriberInterface {
-
-  /**
-   * Renders the ajax commands right before preparing the result.
-   *
-   * @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
-   *   The response event, which contains the possible AjaxResponse object.
-   */
-  public function onResponse(FilterResponseEvent $event) {
-    $response = $event->getResponse();
-    if ($response instanceof AjaxResponse) {
-      $response->prepareResponse($event->getRequest());
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getSubscribedEvents() {
-    $events[KernelEvents::RESPONSE][] = array('onResponse', -100);
-
-    return $events;
-  }
-
-}
diff --git a/core/modules/action/action.views.inc b/core/modules/action/action.views.inc
index b38eead..9bdb3d3 100644
--- a/core/modules/action/action.views.inc
+++ b/core/modules/action/action.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provides views data for action.module.
+ * Provides views data and handlers for action.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/modules/aggregator/aggregator.views.inc b/core/modules/aggregator/aggregator.views.inc
index 28e6b28..5d87034 100644
--- a/core/modules/aggregator/aggregator.views.inc
+++ b/core/modules/aggregator/aggregator.views.inc
@@ -3,6 +3,8 @@
 /**
  * @file
  * Provides views data for aggregator.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php
index 055bfea..a83352b 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php
@@ -36,10 +36,10 @@
  *   admin_permission = "administer blocks",
  *   base_table = "custom_block",
  *   revision_table = "custom_block_revision",
+ *   route_base_path = "admin/structure/block/custom-blocks/manage/{bundle}",
  *   links = {
  *     "canonical" = "custom_block.edit",
- *     "edit-form" = "custom_block.edit",
- *     "admin-form" = "custom_block.type_edit"
+ *     "edit-form" = "custom_block.edit"
  *   },
  *   fieldable = TRUE,
  *   translatable = TRUE,
@@ -52,8 +52,7 @@
  *   },
  *   bundle_keys = {
  *     "bundle" = "type"
- *   },
- *   bundle_entity_type = "custom_block_type"
+ *   }
  * )
  */
 class CustomBlock extends ContentEntityBase implements CustomBlockInterface {
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index c9fccf5..cd7d714 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -696,43 +696,28 @@ function template_preprocess_book_navigation(&$variables) {
   if ($book_link['mlid']) {
     $variables['tree'] = book_children($book_link);
 
-    $build = array();
-
     if ($prev = book_prev($book_link)) {
       $prev_href = url($prev['href']);
-      $build['#attached']['drupal_add_html_head_link'][][] = array(
-        'rel' => 'prev',
-        'href' => $prev_href,
-      );
+      drupal_add_html_head_link(array('rel' => 'prev', 'href' => $prev_href));
       $variables['prev_url'] = $prev_href;
       $variables['prev_title'] = check_plain($prev['title']);
     }
 
     if ($book_link['plid'] && $parent = book_link_load($book_link['plid'])) {
       $parent_href = url($parent['link_path']);
-      $build['#attached']['drupal_add_html_head_link'][][] = array(
-        'rel' => 'up',
-        'href' => $parent_href,
-      );
+      drupal_add_html_head_link(array('rel' => 'up', 'href' => $parent_href));
       $variables['parent_url'] = $parent_href;
       $variables['parent_title'] = check_plain($parent['title']);
     }
 
     if ($next = book_next($book_link)) {
       $next_href = url($next['href']);
-      $build['#attached']['drupal_add_html_head_link'][][] = array(
-        'rel' => 'next',
-        'href' => $next_href,
-      );
+      drupal_add_html_head_link(array('rel' => 'next', 'href' => $next_href));
       $variables['next_url'] = $next_href;
       $variables['next_title'] = check_plain($next['title']);
     }
   }
 
-  if (!empty($build)) {
-    drupal_render($build);
-  }
-
   $variables['has_links'] = FALSE;
   // Link variables to filter for values and set state of the flag variable.
   $links = array('prev_url', 'prev_title', 'parent_url', 'parent_title', 'next_url', 'next_title');
diff --git a/core/modules/breakpoint/breakpoint.install b/core/modules/breakpoint/breakpoint.install
new file mode 100644
index 0000000..7ee2603
--- /dev/null
+++ b/core/modules/breakpoint/breakpoint.install
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * @file
+ * Enable, install, update and uninstall functions for the breakpoint module.
+ */
+
+/**
+ * Implements hook_install().
+ *
+ * Import breakpoints from all enabled themes.
+ */
+function breakpoint_install() {
+  // Import breakpoints from enabled themes.
+  $themes = array_filter(list_themes(), function ($theme) {return $theme->status;});
+  _breakpoint_theme_enabled(array_keys($themes));
+
+  // Import breakpoints from modules.
+  _breakpoint_modules_installed(array_keys(\Drupal::moduleHandler()->getModuleList()));
+}
diff --git a/core/modules/breakpoint/breakpoint.module b/core/modules/breakpoint/breakpoint.module
index a2450f9..d502691 100644
--- a/core/modules/breakpoint/breakpoint.module
+++ b/core/modules/breakpoint/breakpoint.module
@@ -34,6 +34,20 @@ function breakpoint_help($path, $arg) {
 }
 
 /**
+ * Implements hook_themes_enabled().
+ *
+ * @param array $theme_list
+ *   An array of theme names.
+ *
+ * @see _breakpoint_theme_enabled()
+ *
+ * @todo: This should be removed if https://drupal.org/node/1813110 is resolved.
+ */
+function breakpoint_themes_enabled($theme_list) {
+  _breakpoint_theme_enabled($theme_list);
+}
+
+/**
  * Implements hook_themes_disabled().
  *
  * @param array $theme_list
@@ -48,6 +62,20 @@ function breakpoint_themes_disabled($theme_list) {
 }
 
 /**
+ * Implements hook_modules_installed().
+ *
+ * @param array $modules
+ *   An array of the modules that were enabled.
+ *
+ * @see _breakpoint_modules_enabled()
+ *
+ * @todo: This should be removed if https://drupal.org/node/1813110 is resolved.
+ */
+function breakpoint_modules_installed($modules) {
+  _breakpoint_modules_installed($modules);
+}
+
+/**
  * Implements hook_modules_uninstalled().
  *
  * @param array $modules
@@ -62,6 +90,91 @@ function breakpoint_modules_uninstalled($modules) {
 }
 
 /**
+ * Import breakpoints from all new enabled themes.
+ *
+ * @param array $theme_list
+ *   An array of theme names.
+ */
+function _breakpoint_theme_enabled($theme_list) {
+  $themes = list_themes();
+  foreach ($theme_list as $theme_key) {
+    $media_queries = breakpoint_get_theme_media_queries($theme_key);
+    _breakpoint_import_media_queries($theme_key, $themes[$theme_key]->info['name'], Breakpoint::SOURCE_TYPE_THEME, $media_queries);
+    // Import custom groups.
+    _breakpoint_import_breakpoint_groups($theme_key, Breakpoint::SOURCE_TYPE_THEME);
+  }
+}
+
+/**
+ * Import breakpoints from all new installed modules.
+ *
+ * @param array $modules
+ *   An array of the modules that were installed.
+ */
+function _breakpoint_modules_installed($modules) {
+  foreach ($modules as $module) {
+    $media_queries = breakpoint_get_module_media_queries($module);
+    _breakpoint_import_media_queries($module, $module, Breakpoint::SOURCE_TYPE_MODULE, $media_queries);
+    // Import custom groups.
+    _breakpoint_import_breakpoint_groups($module, Breakpoint::SOURCE_TYPE_MODULE);
+  }
+}
+
+/**
+ * Import media queries from a theme or module and create a default group.
+ *
+ * @param string $group_name
+ *   Machine readable name of the breakpoint group.
+ * @param string $label
+ *   Human readable name of the breakpoint group.
+ * @param string $source_type
+ *   Either Breakpoint::SOURCE_TYPE_THEME or Breakpoint::SOURCE_TYPE_MODULE.
+ * @param array $media_queries
+ *   An array of breakpoints in the form $breakpoint['name'] = 'media query'.
+ */
+function _breakpoint_import_media_queries($group_name, $label, $source_type, $media_queries) {
+  if (!empty($media_queries)) {
+    // Create a new breakpoint group if it doesn't exist.
+    $breakpoint_group = _breakpoint_group_create_or_load($group_name, $label, $group_name, $source_type);
+
+    // Load all media queries, create a breakpoint for each one and add them
+    // to this breakpoint group.
+    foreach ($media_queries as $name => $media_query) {
+      $breakpoint_group->addBreakpointFromMediaQuery($name, $media_query);
+    }
+
+    $breakpoint_group->save();
+  }
+}
+
+/**
+ * Import breakpoint groups from theme or module.
+ *
+ * @param string $source
+ *   The theme or module name
+ * @param string $source_type
+ *   Either Breakpoint::SOURCE_TYPE_THEME or Breakpoint::SOURCE_TYPE_MODULE.
+ */
+function _breakpoint_import_breakpoint_groups($source, $source_type) {
+  $breakpoint_groups = \Drupal::config($source . '.breakpoint_groups');
+  if ($breakpoint_groups) {
+    foreach ($breakpoint_groups->get() as $group_name => $data) {
+      // Breakpoints is mandatory, extra check since this is coming from config.
+      if (isset($data['breakpoints']) && !empty($data['breakpoints'])) {
+        // Create a new breakpoint group if it doesn't exist.
+        $breakpoint_group = _breakpoint_group_create_or_load($group_name, isset($data['label']) ? $data['label'] : $group_name, $source, $source_type);
+        // Add the breakpoints.
+        $breakpoint_group->addBreakpoints($data['breakpoints']);
+        $breakpoint_group->save();
+      }
+      else {
+        throw new \Exception('Illegal config file detected.');
+      }
+    }
+  }
+}
+
+/**
  * Remove breakpoints from all disabled themes or uninstalled modules.
  *
  * The source type has to match the original source type, otherwise the group
@@ -133,6 +246,65 @@ function _breakpoint_delete_breakpoint_groups($group_id, $source_type) {
 }
 
 /**
+ * Get a list of available breakpoints from a specified theme.
+ *
+ * @param string $theme_key
+ *   The name of the theme.
+ *
+ * @return array
+ *   An array of breakpoints in the form $breakpoint['name'] = 'media query'.
+ */
+function breakpoint_get_theme_media_queries($theme_key) {
+  $themes = list_themes();
+  if (!isset($themes[$theme_key])) {
+    throw new \Exception('Illegal theme_key passed.');
+  }
+
+  $config = \Drupal::config($theme_key . '.breakpoints');
+  if ($config) {
+    return $config->get();
+  }
+  return array();
+}
+
+/**
+ * Get a list of available breakpoints from a specified module.
+ *
+ * @param string $module
+ *   The name of the module.
+ *
+ * @return array
+ *   An array of breakpoints in the form $breakpoint['name'] = 'media query'.
+ */
+function breakpoint_get_module_media_queries($module) {
+  if (!\Drupal::moduleHandler()->moduleExists($module)) {
+    throw new \Exception('Illegal module name passed.');
+  }
+
+  $config = \Drupal::config($module . '.breakpoints');
+  if ($config) {
+    return $config->get();
+  }
+  return array();
+}
+
+/**
+ * Load one breakpoint group by its identifier.
+ *
+ * @param string $id
+ *   The id of the breakpoint group to load.
+ *
+ * @return \Drupal\breakpoint\Entity\BreakpointGroup|null
+ *   The breakpoint group, or NULL if there is no entity with the given id.
+ *
+ * @todo Remove this in a follow-up issue.
+ * @see http://drupal.org/node/1798214
+ */
+function breakpoint_group_load($id) {
+  return entity_load('breakpoint_group', $id);
+}
+
+/**
  * Load one breakpoint by its identifier.
  *
  * @param int $id
@@ -179,3 +351,36 @@ function breakpoint_select_options() {
   asort($options);
   return $options;
 }
+
+/**
+ * Helper function to easily create/load a breakpoint group.
+ *
+ * @param string $name
+ *   Machine readable name of the breakpoint group.
+ * @param string $label
+ *   Human readable name of the breakpoint group.
+ * @param string $source
+ *   Machine readable name of the defining theme or module.
+ * @param string $source_type
+ *   Either Breakpoint::SOURCE_TYPE_THEME or Breakpoint::SOURCE_TYPE_MODULE.
+ *
+ * @return \Drupal\breakpoint\Entity\BreakpointGroup
+ *
+ * @see _breakpoint_import_media_queries()
+ * @see _breakpoint_import_breakpoint_groups()
+ */
+function _breakpoint_group_create_or_load($name, $label, $source, $source_type) {
+  // Try loading the breakpoint group.
+  $breakpoint_group = entity_load('breakpoint_group', $source_type . '.' . $source . '.' . $name);
+  // Create a new breakpoint group if it doesn't exist.
+  if (!$breakpoint_group) {
+    // Build a new breakpoint group.
+    $breakpoint_group = entity_create('breakpoint_group', array(
+      'name' => $name,
+      'label' => $label,
+      'source' => $source,
+      'sourceType' => $source_type,
+    ));
+  }
+  return $breakpoint_group;
+}
diff --git a/core/modules/breakpoint/config/breakpoint.settings.yml b/core/modules/breakpoint/config/breakpoint.settings.yml
new file mode 100644
index 0000000..542675f
--- /dev/null
+++ b/core/modules/breakpoint/config/breakpoint.settings.yml
@@ -0,0 +1,4 @@
+multipliers:
+  - 1x
+  - 1.5x
+  - 2x
diff --git a/core/modules/breakpoint/config/schema/breakpoint.schema.yml b/core/modules/breakpoint/config/schema/breakpoint.schema.yml
index a2a5d7d..0f4184e 100644
--- a/core/modules/breakpoint/config/schema/breakpoint.schema.yml
+++ b/core/modules/breakpoint/config/schema/breakpoint.schema.yml
@@ -1,4 +1,16 @@
 # Schema for the configuration files of the Breakpoint module.
+
+breakpoint.settings:
+  type: mapping
+  label: 'Breakpoint settings'
+  mapping:
+    multipliers:
+      type: sequence
+      label: 'Assigning resolution multipliers to breakpoints'
+      sequence:
+        - type: string
+          label: 'Multiplier'
+
 breakpoint.breakpoint.*.*.*:
   type: mapping
   label: 'Defines the Breakpoint entity'
diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/BreakpointGroupInterface.php b/core/modules/breakpoint/lib/Drupal/breakpoint/BreakpointGroupInterface.php
index 3bb877b..59833ff 100644
--- a/core/modules/breakpoint/lib/Drupal/breakpoint/BreakpointGroupInterface.php
+++ b/core/modules/breakpoint/lib/Drupal/breakpoint/BreakpointGroupInterface.php
@@ -41,30 +41,8 @@ public function addBreakpointFromMediaQuery($name, $media_query);
    * The breakpoint name is either the machine_name or the ID of a breakpoint.
    *
    * @param array $breakpoints
-   *   Array containing breakpoint objects
-   *
-   * @return \Drupal\breakpoint\Entity\BreakpointGroup
-   *   The breakpoint group object.
+   *   Array containing breakpoints keyed by their ID.
    */
   public function addBreakpoints($breakpoints);
 
-  /**
-   * Gets the array of breakpoints for the breakpoint group.
-   *
-   * @return array
-   *   The array of breakpoints for the breakpoint group.
-   */
-  public function getBreakpoints();
-
-  /**
-   * Gets a breakpoint from the breakpoint group by ID.
-   *
-   * @param string $id
-   *   The breakpoint ID to get.
-   *
-   * @return \Drupal\breakpoint\Entity\Breakpoint|boolean
-   *   The breakpoint or FALSE if not in the Breakpoint group.
-   */
-  public function getBreakpointById($id);
-
 }
diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php
index 61c1ea6..5f32b5e 100644
--- a/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php
+++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Entity/BreakpointGroup.php
@@ -62,24 +62,14 @@ class BreakpointGroup extends ConfigEntityBase implements BreakpointGroupInterfa
   public $label;
 
   /**
-   * The breakpoint group breakpoint IDs.
-   *
-   * @var array
-   *   Array containing all breakpoints IDs of this group.
-   *
-   * @see \Drupal\breakpoint\Entity\Breakpoint
-   */
-  protected $breakpoint_ids = array();
-
-  /**
    * The breakpoint group breakpoints.
    *
    * @var array
-   *   Array containing all breakpoints objects of this group.
+   *   Array containing all breakpoints of this group.
    *
    * @see \Drupal\breakpoint\Entity\Breakpoint
    */
-  protected $breakpoints = array();
+  public $breakpoints = array();
 
   /**
    * The breakpoint group source: theme or module name. Use 'user' for
@@ -107,6 +97,7 @@ class BreakpointGroup extends ConfigEntityBase implements BreakpointGroupInterfa
    */
   public function __construct(array $values, $entity_type) {
     parent::__construct($values, $entity_type);
+    $this->loadAllBreakpoints();
   }
 
   /**
@@ -120,7 +111,10 @@ public function save() {
     if (empty($this->id)) {
       $this->id = $this->sourceType . '.' . $this->source . '.' . $this->name;
     }
+    // Only save the keys, but return the full objects.
+    $this->breakpoints = array_keys($this->breakpoints);
     parent::save();
+    $this->loadAllBreakpoints();
   }
 
   /**
@@ -162,70 +156,47 @@ public function addBreakpointFromMediaQuery($name, $media_query) {
         'mediaQuery' => $media_query,
         'source' => $this->name,
         'sourceType' => $this->sourceType,
-        'weight' => count($this->breakpoint_ids),
+        'weight' => count($this->breakpoints),
       ));
       $breakpoint->save();
     }
-    return $this->addBreakpoints(array($breakpoint));
+    $this->breakpoints[$breakpoint->id()] = $breakpoint;
   }
 
   /**
    * {@inheritdoc}
    */
   public function addBreakpoints($breakpoints) {
-    foreach ($breakpoints as $breakpoint) {
-      // Add breakpoint to group.
-      $this->breakpoints[$breakpoint->id()] = $breakpoint;
-      $this->breakpoint_ids[] = $breakpoint->id();
-    }
-    return $this;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getBreakpoints() {
-    if (empty($this->breakpoints)) {
-      foreach ($this->breakpoint_ids as $breakpoint_id) {
-        $breakpoint = breakpoint_load($breakpoint_id);
-        if ($breakpoint) {
-          $this->breakpoints[$breakpoint_id] = $breakpoint;
-        }
+    foreach ($breakpoints as $breakpoint_name) {
+      // Check if breakpoint exists, assume $breakpoint_name is a machine name.
+      $breakpoint = entity_load('breakpoint', $this->sourceType . '.' . $this->source . '.' . $breakpoint_name);
+      // If the breakpoint doesn't exist, assume $breakpoint_name is an id.
+      if (!$breakpoint) {
+        $breakpoint = entity_load('breakpoint', $breakpoint_name);
+      }
+      // If the breakpoint doesn't exists, do not add it.
+      if ($breakpoint) {
+        // Add breakpoint to group.
+        $this->breakpoints[$breakpoint->id()] = $breakpoint;
       }
     }
-    return $this->breakpoints;
   }
 
   /**
-   * {@inheritdoc}
-   */
-  public function getBreakpointById($id) {
-    $breakpoints = $this->getBreakpoints();
-    if (isset($breakpoints[$id])) {
-      return $breakpoints[$id];
+   * Loads all breakpoints, remove non-existing ones.
+   *
+   * @return array
+   *   Array containing breakpoints keyed by their id.
+   */
+  protected function loadAllBreakpoints() {
+    $breakpoints = $this->breakpoints;
+    $this->breakpoints = array();
+    foreach ($breakpoints as $breakpoint_id) {
+      $breakpoint = breakpoint_load($breakpoint_id);
+      if ($breakpoint) {
+        $this->breakpoints[$breakpoint_id] = $breakpoint;
+      }
     }
-    return FALSE;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function getExportProperties() {
-    $names = array(
-      'id',
-      'uuid',
-      'name',
-      'label',
-      'breakpoint_ids',
-      'source',
-      'sourceType',
-      'status',
-      'langcode',
-    );
-    $properties = array();
-    foreach ($names as $name) {
-      $properties[$name] = $this->get($name);
-    }
-    return $properties;
-  }
 }
diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointGroupCRUDTest.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointGroupCRUDTest.php
index e9eeb00..bd5a2a8 100644
--- a/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointGroupCRUDTest.php
+++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointGroupCRUDTest.php
@@ -50,7 +50,8 @@ public function testBreakpointGroupCRUD() {
     $this->verifyBreakpointGroup($group);
 
     // Update the breakpoint group.
-    $group->addBreakpoints($breakpoints)->save();
+    $group->breakpoints = array_keys($breakpoints);
+    $group->save();
     $this->verifyBreakpointGroup($group);
 
     // Delete the breakpoint group.
diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointGroupTestBase.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointGroupTestBase.php
index 95141e3..0f7e471 100644
--- a/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointGroupTestBase.php
+++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointGroupTestBase.php
@@ -33,6 +33,7 @@ public function verifyBreakpointGroup(BreakpointGroup $group, BreakpointGroup $c
       'label',
       'id',
       'name',
+      'breakpoints',
       'sourceType',
     );
 
@@ -57,8 +58,5 @@ public function verifyBreakpointGroup(BreakpointGroup $group, BreakpointGroup $c
         $this->assertEqual($compare_set->{$property}, $group->{$property}, format_string('breakpoint_group_load: Proper %property: %property1 == %property2 for breakpoint group %group.', $t_args), 'Breakpoint API');
       }
     }
-
-    // Ensure that the breakpoint group has the expected breakpoints.
-    $this->assertEqual(array_keys($compare_set->getBreakpoints()), array_keys($group->getBreakpoints()));
   }
 }
diff --git a/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointThemeTest.php b/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointThemeTest.php
index ed88881..e00af05 100644
--- a/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointThemeTest.php
+++ b/core/modules/breakpoint/lib/Drupal/breakpoint/Tests/BreakpointThemeTest.php
@@ -47,14 +47,12 @@ public function testThemeBreakpoints() {
       'sourceType' => Breakpoint::SOURCE_TYPE_THEME,
       'id' => Breakpoint::SOURCE_TYPE_THEME . '.breakpoint_test_theme.breakpoint_test_theme',
     ));
-    $breakpoint_group_obj->addBreakpoints(entity_load_multiple('breakpoint',
-      array(
-        'theme.breakpoint_test_theme.mobile',
-        'theme.breakpoint_test_theme.narrow',
-        'theme.breakpoint_test_theme.wide',
-        'theme.breakpoint_test_theme.tv',
-      )
-    ));
+    $breakpoint_group_obj->breakpoints = array(
+      'theme.breakpoint_test_theme.mobile' => array(),
+      'theme.breakpoint_test_theme.narrow' => array(),
+      'theme.breakpoint_test_theme.wide' => array(),
+      'theme.breakpoint_test_theme.tv' => array(),
+    );
 
     // Verify we can load this breakpoint defined by the theme.
     $this->verifyBreakpointGroup($breakpoint_group_obj);
@@ -76,13 +74,11 @@ public function testThemeBreakpointGroup() {
       'source' => 'breakpoint_test_theme',
       'id' => Breakpoint::SOURCE_TYPE_THEME . '.breakpoint_test_theme.test',
     ));
-    $breakpoint_group_obj->addBreakpoints(entity_load_multiple('breakpoint',
-      array(
-        'theme.breakpoint_test_theme.mobile',
-        'theme.breakpoint_test_theme.narrow',
-        'theme.breakpoint_test_theme.wide',
-      )
-    ));
+    $breakpoint_group_obj->breakpoints = array(
+      'theme.breakpoint_test_theme.mobile' => array('1.5x', '2.x'),
+      'theme.breakpoint_test_theme.narrow' => array(),
+      'theme.breakpoint_test_theme.wide' => array(),
+    );
 
     // Verify we can load this breakpoint defined by the theme.
     $this->verifyBreakpointGroup($breakpoint_group_obj);
@@ -92,4 +88,39 @@ public function testThemeBreakpointGroup() {
     $this->assertFalse(entity_load('breakpoint_group', $breakpoint_group_obj->id()), 'breakpoint_group_load: Loading a deleted breakpoint group returns false.', 'Breakpoint API');
   }
 
+  /**
+   * Test the breakpoints defined by the custom group in the module.
+   */
+  public function testThemeBreakpointGroupModule() {
+    // Call the import manually, since the testbot needs to enable the module
+    // first, otherwise the theme isn't detected.
+    _breakpoint_import_breakpoint_groups('breakpoint_theme_test', Breakpoint::SOURCE_TYPE_MODULE);
+
+    // Verify the breakpoint group 'module_test' was created by
+    // breakpoint_theme_test module.
+    $breakpoint_group_obj = entity_create('breakpoint_group', array(
+      'label' => 'Test Module',
+      'name' => 'module_test',
+      'sourceType' => Breakpoint::SOURCE_TYPE_MODULE,
+      'source' => 'breakpoint_theme_test',
+      'id' => Breakpoint::SOURCE_TYPE_MODULE . '.breakpoint_theme_test.module_test',
+    ));
+    $breakpoint_group_obj->breakpoints = array(
+      'theme.breakpoint_test_theme.mobile' => array(),
+      'theme.breakpoint_test_theme.narrow' => array(),
+      'theme.breakpoint_test_theme.wide' => array(),
+    );
+
+    // Verify we can load this breakpoint defined by the theme.
+    $this->verifyBreakpointGroup($breakpoint_group_obj);
+
+    // Disable the test theme and verify the breakpoint group still exists.
+    theme_disable(array('breakpoint_test_theme'));
+    $this->assertTrue(entity_load('breakpoint_group', $breakpoint_group_obj->id()), 'Breakpoint group still exists if theme is disabled.');
+
+    // Uninstall the test module and verify the breakpoint group is deleted.
+    module_uninstall(array('breakpoint_theme_test'));
+    $this->assertFalse(entity_load('breakpoint_group', $breakpoint_group_obj->id()), 'Breakpoint group is removed if module is uninstalled.');
+  }
+
 }
diff --git a/core/modules/breakpoint/tests/config/breakpoint_theme_test.breakpoint_groups.yml b/core/modules/breakpoint/tests/config/breakpoint_theme_test.breakpoint_groups.yml
new file mode 100644
index 0000000..4e3e6f0
--- /dev/null
+++ b/core/modules/breakpoint/tests/config/breakpoint_theme_test.breakpoint_groups.yml
@@ -0,0 +1,6 @@
+module_test:
+  label: Test Module
+  breakpoints:
+    - theme.breakpoint_test_theme.mobile
+    - theme.breakpoint_test_theme.narrow
+    - theme.breakpoint_test_theme.wide
diff --git a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.mobile.yml b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.mobile.yml
deleted file mode 100644
index 3f30595..0000000
--- a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.mobile.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: theme.breakpoint_test_theme.mobile
-uuid: 3ae8bfe6-496b-478c-a811-17424038f49c
-name: mobile
-label: mobile
-mediaQuery: '(min-width: 0px)'
-source: breakpoint_test_theme
-sourceType: theme
-weight: 0
-multipliers:
-  1x: 1x
-status: true
-langcode: en
diff --git a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.narrow.yml b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.narrow.yml
deleted file mode 100644
index e0773e3..0000000
--- a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.narrow.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: theme.breakpoint_test_theme.narrow
-uuid: 1d791b4a-7ccf-4c93-a800-c2bc2594cc62
-name: narrow
-label: narrow
-mediaQuery: '(min-width: 560px)'
-source: breakpoint_test_theme
-sourceType: theme
-weight: 1
-multipliers:
-  1x: 1x
-status: true
-langcode: en
diff --git a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.tv.yml b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.tv.yml
deleted file mode 100644
index 9f4d189..0000000
--- a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.tv.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: theme.breakpoint_test_theme.tv
-uuid: e0ffa737-0570-4891-9809-9bce925673ca
-name: tv
-label: tv
-mediaQuery: 'only screen and (min-width: 3456px)'
-source: breakpoint_test_theme
-sourceType: theme
-weight: 3
-multipliers:
-  1x: 1x
-status: true
-langcode: en
diff --git a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.wide.yml b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.wide.yml
deleted file mode 100644
index 112a8e6..0000000
--- a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint.theme.breakpoint_test_theme.wide.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: theme.breakpoint_test_theme.wide
-uuid: 1561574d-99f8-48a6-b304-4e2b617673b2
-name: wide
-label: wide
-mediaQuery: '(min-width: 851px)'
-source: breakpoint_test_theme
-sourceType: theme
-weight: 2
-multipliers:
-  1x: 1x
-status: true
-langcode: en
diff --git a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint_group.theme.breakpoint_test_theme.breakpoint_test_theme.yml b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint_group.theme.breakpoint_test_theme.breakpoint_test_theme.yml
deleted file mode 100644
index 62ac756..0000000
--- a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint_group.theme.breakpoint_test_theme.breakpoint_test_theme.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-id: theme.breakpoint_test_theme.breakpoint_test_theme
-uuid: 94b96e6e-a032-4b29-8100-efd5bf854fd1
-name: breakpoint_test_theme
-label: 'Breakpoint test theme'
-breakpoint_ids:
-  - theme.breakpoint_test_theme.mobile
-  - theme.breakpoint_test_theme.narrow
-  - theme.breakpoint_test_theme.wide
-  - theme.breakpoint_test_theme.tv
-source: breakpoint_test_theme
-sourceType: theme
-status: true
-langcode: en
diff --git a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint_group.theme.breakpoint_test_theme.test.yml b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint_group.theme.breakpoint_test_theme.test.yml
deleted file mode 100644
index e185e7f..0000000
--- a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint.breakpoint_group.theme.breakpoint_test_theme.test.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: theme.breakpoint_test_theme.test
-uuid: fcc25180-7e18-4149-8962-98d706faa59a
-name: test
-label: 'Test Theme'
-breakpoint_ids:
-  - theme.breakpoint_test_theme.mobile
-  - theme.breakpoint_test_theme.narrow
-  - theme.breakpoint_test_theme.wide
-source: breakpoint_test_theme
-sourceType: theme
-status: true
-langcode: en
diff --git a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint_test_theme.breakpoint_groups.yml b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint_test_theme.breakpoint_groups.yml
new file mode 100644
index 0000000..bde92d8
--- /dev/null
+++ b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint_test_theme.breakpoint_groups.yml
@@ -0,0 +1,6 @@
+test:
+  label: Test Theme
+  breakpoints:
+    - mobile
+    - narrow
+    - wide
diff --git a/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint_test_theme.breakpoints.yml b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint_test_theme.breakpoints.yml
new file mode 100644
index 0000000..534fbf5
--- /dev/null
+++ b/core/modules/breakpoint/tests/themes/breakpoint_test_theme/config/breakpoint_test_theme.breakpoints.yml
@@ -0,0 +1,4 @@
+mobile: '(min-width: 0px)'
+narrow: '(min-width: 560px)'
+wide: '(min-width: 851px)'
+tv: 'only screen and (min-width: 3456px)'
diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/Editor/CKEditor.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/Editor/CKEditor.php
index bc0dc61..3eefd37 100644
--- a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/Editor/CKEditor.php
+++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/Editor/CKEditor.php
@@ -320,9 +320,9 @@ public function getLangcodes() {
     if (empty($langcodes)) {
       $langcodes = array();
       // Collect languages included with CKEditor based on file listing.
-      $ckeditor_languages = glob(DRUPAL_ROOT . '/core/assets/vendor/ckeditor/lang/*.js');
-      foreach ($ckeditor_languages as $language_filename) {
-        $langcode = basename($language_filename, '.js');
+      $ckeditor_languages = new \GlobIterator(DRUPAL_ROOT . '/core/assets/vendor/ckeditor/lang/*.js');
+      foreach ($ckeditor_languages as $language_file) {
+        $langcode = $language_file->getBasename('.js');
         $langcodes[$langcode] = $langcode;
       }
       cache('ckeditor.languages')->set('langcodes', $langcodes);
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index fa38bfb..9f8b282 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -1731,20 +1731,3 @@ function comment_library_info() {
   );
   return $libraries;
 }
-
-/**
- * #post_render_cache callback; replaces the placeholder with the comment form.
- *
- * @param array $context
- *   An array with the following keys:
- *   - entity_type: an entity type
- *   - entity_id: an entity ID
- *   - field_name: a comment field name
- *
- * @return array $element
- *   The updated $element.
- */
-function comment_replace_form_placeholder(array $context) {
-  $entity = entity_load($context['entity_type'], $context['entity_id']);
-  return comment_add($entity, $context['field_name']);
-}
diff --git a/core/modules/comment/comment.views.inc b/core/modules/comment/comment.views.inc
index ed8f85a..663704b 100644
--- a/core/modules/comment/comment.views.inc
+++ b/core/modules/comment/comment.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data for comment.module.
+ * Provide views data and handlers for comment.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
index cf96a59..4d22fbf 100644
--- a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
+++ b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php
@@ -36,6 +36,7 @@
  *   fieldable = TRUE,
  *   translatable = TRUE,
  *   render_cache = FALSE,
+ *   route_base_path = "admin/structure/comments/manage/{bundle}",
  *   entity_keys = {
  *     "id" = "cid",
  *     "bundle" = "field_id",
@@ -47,8 +48,7 @@
  *   },
  *   links = {
  *     "canonical" = "comment.permalink",
- *     "edit-form" = "comment.edit_page",
- *     "admin-form" = "comment.bundle"
+ *     "edit-form" = "comment.edit_page"
  *   }
  * )
  */
@@ -216,10 +216,10 @@ public function id() {
   public function preSave(EntityStorageControllerInterface $storage_controller) {
     parent::preSave($storage_controller);
 
-    $user = \Drupal::currentUser();
+    global $user;
 
     if (!isset($this->status->value)) {
-      $this->status->value = $user->hasPermission('skip comment approval') ? COMMENT_PUBLISHED : COMMENT_NOT_PUBLISHED;
+      $this->status->value = user_access('skip comment approval') ? COMMENT_PUBLISHED : COMMENT_NOT_PUBLISHED;
     }
     if ($this->isNew()) {
       // Add the comment to database. This next section builds the thread field.
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
index be1b6db..ff0e346 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldFormatter/CommentDefaultFormatter.php
@@ -138,24 +138,7 @@ public function viewElements(FieldItemListInterface $items) {
       if ($status == COMMENT_OPEN && $comment_settings['form_location'] == COMMENT_FORM_BELOW) {
         // Only show the add comment form if the user has permission.
         if ($this->currentUser->hasPermission('post comments')) {
-          // All users in the "anonymous" role can use the same form: it is fine
-          // for this form to be stored in the render cache.
-          if ($this->currentUser->isAnonymous()) {
-            $output['comment_form'] = comment_add($entity, $field_name);
-          }
-          // All other users need a user-specific form, which would break the
-          // render cache: hence use a #post_render_cache callback.
-          else {
-            $output['comment_form'] = array(
-              '#type' => 'render_cache_placeholder',
-              '#callback' => 'comment_replace_form_placeholder',
-              '#context' => array(
-                'entity_type' => $entity->entityType(),
-                'entity_id' => $entity->id(),
-                'field_name' => $field_name
-              ),
-            );
-          }
+          $output['comment_form'] = comment_add($entity, $field_name);
         }
       }
 
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentNonNodeTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentNonNodeTest.php
index f7cfd76..80e4855 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentNonNodeTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentNonNodeTest.php
@@ -229,11 +229,11 @@ function testCommentFunctionality() {
     ));
     $this->drupalLogin($limited_user);
     // Test that default field exists.
-    $this->drupalGet('entity_test/structure/entity_test/fields');
+    $this->drupalGet('admin/structure/entity-test/manage/entity_test/fields');
     $this->assertText(t('Comment settings'));
-    $this->assertLinkByHref('entity_test/structure/entity_test/fields/entity_test.entity_test.comment');
+    $this->assertLinkByHref('admin/structure/entity-test/manage/entity_test/fields/entity_test.entity_test.comment');
     // Test widget hidden option is not visible when there's no comments.
-    $this->drupalGet('entity_test/structure/entity_test/entity-test/fields/entity_test.entity_test.comment');
+    $this->drupalGet('admin/structure/entity-test/manage/entity_test/entity-test/fields/entity_test.entity_test.comment');
     $this->assertNoField('edit-default-value-input-comment-und-0-status-0');
 
     $this->drupalLogin($this->admin_user);
@@ -343,20 +343,20 @@ function testCommentFunctionality() {
       'administer entity_test content',
     ));
     $this->drupalLogin($limited_user);
-    $this->drupalGet('entity_test/structure/entity_test/fields/entity_test.entity_test.comment');
+    $this->drupalGet('admin/structure/entity-test/manage/entity_test/fields/entity_test.entity_test.comment');
     $this->assertNoFieldChecked('edit-default-value-input-comment-0-status-0');
     $this->assertNoFieldChecked('edit-default-value-input-comment-0-status-1');
     $this->assertFieldChecked('edit-default-value-input-comment-0-status-2');
     // Test comment option change in field settings.
     $edit = array('default_value_input[comment][0][status]' => COMMENT_CLOSED);
     $this->drupalPostForm(NULL, $edit, t('Save settings'));
-    $this->drupalGet('entity_test/structure/entity_test/fields/entity_test.entity_test.comment');
+    $this->drupalGet('admin/structure/entity-test/manage/entity_test/fields/entity_test.entity_test.comment');
     $this->assertNoFieldChecked('edit-default-value-input-comment-0-status-0');
     $this->assertFieldChecked('edit-default-value-input-comment-0-status-1');
     $this->assertNoFieldChecked('edit-default-value-input-comment-0-status-2');
 
     // Add a new comment field.
-    $this->drupalGet('entity_test/structure/entity_test/fields');
+    $this->drupalGet('admin/structure/entity-test/manage/entity_test/fields');
     $edit = array(
       'fields[_add_new_field][label]' => 'Foobar',
       'fields[_add_new_field][field_name]' => 'foobar',
diff --git a/core/modules/config_translation/lib/Drupal/config_translation/ConfigFieldInstanceMapper.php b/core/modules/config_translation/lib/Drupal/config_translation/ConfigFieldInstanceMapper.php
index be497e4..ce4f1be 100644
--- a/core/modules/config_translation/lib/Drupal/config_translation/ConfigFieldInstanceMapper.php
+++ b/core/modules/config_translation/lib/Drupal/config_translation/ConfigFieldInstanceMapper.php
@@ -23,10 +23,13 @@ class ConfigFieldInstanceMapper extends ConfigEntityMapper {
    */
   public function getBaseRouteParameters() {
     $parameters = parent::getBaseRouteParameters();
-    $base_entity_info = $this->entityManager->getDefinition($this->pluginDefinition['base_entity_type']);
+    // @todo All core content entity path placeholders can be fully filled in
+    //   with an additional {bundle} value in their paths, but a more
+    //   predictable solution would be ideal. See
+    //   https://drupal.org/node/2134871
     // @todo Field instances have no method to return the bundle the instance is
     //   attached to. See https://drupal.org/node/2134861
-    $parameters[$base_entity_info['bundle_entity_type']] = $this->entity->bundle;
+    $parameters['bundle'] = $this->entity->bundle;
     return $parameters;
   }
 
diff --git a/core/modules/contact/contact.local_tasks.yml b/core/modules/contact/contact.local_tasks.yml
deleted file mode 100644
index 91bb65d..0000000
--- a/core/modules/contact/contact.local_tasks.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-contact.category_edit:
-  title: 'Edit'
-  route_name: contact.category_edit
-  tab_root_id: contact.category_edit
diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module
index 58e343e..66a80ec 100644
--- a/core/modules/contact/contact.module
+++ b/core/modules/contact/contact.module
@@ -67,6 +67,10 @@ function contact_menu() {
     'title' => 'Edit contact category',
     'route_name' => 'contact.category_edit',
   );
+  $items['admin/structure/contact/manage/%contact_category/edit'] = array(
+    'title' => 'Edit',
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+  );
 
   $items['contact'] = array(
     'title' => 'Contact',
diff --git a/core/modules/contact/contact.views.inc b/core/modules/contact/contact.views.inc
index 1560362..6795b0e 100644
--- a/core/modules/contact/contact.views.inc
+++ b/core/modules/contact/contact.views.inc
@@ -3,6 +3,8 @@
 /**
  * @file
  * Provide views data for contact.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/modules/contact/lib/Drupal/contact/Entity/Message.php b/core/modules/contact/lib/Drupal/contact/Entity/Message.php
index aaaa64e..9e424fa 100644
--- a/core/modules/contact/lib/Drupal/contact/Entity/Message.php
+++ b/core/modules/contact/lib/Drupal/contact/Entity/Message.php
@@ -26,13 +26,10 @@
  *   entity_keys = {
  *     "bundle" = "category"
  *   },
- *   bundle_entity_type = "contact_category",
+ *   route_base_path = "admin/structure/contact/manage/{bundle}",
  *   fieldable = TRUE,
  *   bundle_keys = {
  *     "bundle" = "id"
- *   },
- *   links = {
- *     "admin-form" = "contact.category_edit"
  *   }
  * )
  */
diff --git a/core/modules/contextual/contextual.views.inc b/core/modules/contextual/contextual.views.inc
index 528b3bb..ea8088a 100644
--- a/core/modules/contextual/contextual.views.inc
+++ b/core/modules/contextual/contextual.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data for contextual.module.
+ * Provide views data and handlers for contextual.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/modules/contextual/css/contextual.theme.css b/core/modules/contextual/css/contextual.theme.css
index 7475a1d..be6d44a 100644
--- a/core/modules/contextual/css/contextual.theme.css
+++ b/core/modules/contextual/css/contextual.theme.css
@@ -91,7 +91,9 @@
 }
 .contextual-region .contextual .contextual-links a {
   background-color: #fff;
-  color: #333;
+  /* This is an unfortunately necessary use of !important to prevent white
+   * links on a white background or some similar illegible combination. */
+  color: #333 !important;
   display: block;
   font-family: sans-serif;
   font-size: small;
diff --git a/core/modules/dblog/dblog.views.inc b/core/modules/dblog/dblog.views.inc
index 90be37c..2198783 100644
--- a/core/modules/dblog/dblog.views.inc
+++ b/core/modules/dblog/dblog.views.inc
@@ -3,6 +3,8 @@
 /**
  * @file
  * Provide views data for dblog.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/modules/field/field.views.inc b/core/modules/field/field.views.inc
index ae87873..b2f33c1 100644
--- a/core/modules/field/field.views.inc
+++ b/core/modules/field/field.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide Views data for field.module.
+ * Provide Views data and handlers for field.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 use Drupal\Component\Utility\NestedArray;
diff --git a/core/modules/field_ui/field_ui.local_tasks.yml b/core/modules/field_ui/field_ui.local_tasks.yml
index 1330c2d..e690491 100644
--- a/core/modules/field_ui/field_ui.local_tasks.yml
+++ b/core/modules/field_ui/field_ui.local_tasks.yml
@@ -2,6 +2,3 @@ field_ui.list:
   title: Entities
   route_name: field_ui.list
   tab_root_id: field_ui.list
-field_ui.fields:
-  class: \Drupal\Core\Menu\LocalTaskDefault
-  derivative: \Drupal\field_ui\Plugin\Derivative\FieldUiLocalTask
diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module
index eefc199..f9d90c6 100644
--- a/core/modules/field_ui/field_ui.module
+++ b/core/modules/field_ui/field_ui.module
@@ -7,7 +7,6 @@
 
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\entity\EntityViewModeInterface;
-use Drupal\field_ui\Plugin\Derivative\FieldUiLocalTask;
 
 /**
  * Implements hook_help().
@@ -62,6 +61,94 @@ function field_ui_menu() {
     'type' => MENU_NORMAL_ITEM,
   );
 
+  // Create tabs for all possible bundles.
+  foreach (entity_get_info() as $entity_type => $entity_info) {
+    if ($entity_info['fieldable'] && isset($entity_info['route_base_path'])) {
+      // Extract path information from the entity type.
+      $path = $entity_info['route_base_path'];
+      $default_path = preg_replace('/{' . DRUPAL_PHP_FUNCTION_PATTERN . '}/', '%', $path);
+      // This is the position of the %field_ui_instance placeholder in the
+      // items below.
+      $field_position = count(explode('/', $path)) + 1;
+
+      $items["$path/fields"] = array(
+        'title' => 'Manage fields',
+        'type' => MENU_LOCAL_TASK,
+        'route_name' => "field_ui.overview_$entity_type",
+        'weight' => 1,
+      );
+      $items["$path/fields/%"] = array(
+        'title callback' => 'entity_page_label',
+        'title arguments' => array($field_position),
+        'route_name' => "field_ui.instance_edit_$entity_type",
+      );
+      $items["$default_path/fields/%/edit"] = array(
+        'title' => 'Edit',
+        'type' => MENU_DEFAULT_LOCAL_TASK,
+      );
+      $items["$path/fields/%/field"] = array(
+        'title' => 'Field settings',
+        'type' => MENU_LOCAL_TASK,
+        'route_name' => "field_ui.field_edit_$entity_type",
+      );
+      $items["$path/fields/%/delete"] = array(
+        'title' => 'Delete',
+        'type' => MENU_VISIBLE_IN_BREADCRUMB,
+        'route_name' => "field_ui.delete_$entity_type",
+        'weight' => 10,
+      );
+
+      // 'Manage form display' tab.
+      $items["$path/form-display"] = array(
+        'title' => 'Manage form display',
+        'type' => MENU_LOCAL_TASK,
+        'route_name' => "field_ui.form_display_overview_$entity_type",
+        'weight' => 2,
+      );
+
+      // 'Manage display' tab.
+      $items["$path/display"] = array(
+        'title' => 'Manage display',
+        'type' => MENU_LOCAL_TASK,
+        'route_name' => "field_ui.display_overview_$entity_type",
+        'weight' => 3,
+      );
+
+      // View and form modes secondary tabs.
+      // The same base $path for the menu item (with a placeholder) can be
+      // used for all bundles of a given entity type; but depending on
+      // administrator settings, each bundle has a different set of view
+      // modes available for customisation. So we define menu items for all
+      // view modes, and use a route requirement to determine which ones are
+      // actually visible for a given bundle.
+      $items["$default_path/form-display/default"] = array(
+        'title' => t('Default'),
+        'type' => MENU_DEFAULT_LOCAL_TASK,
+      );
+      $items["$default_path/display/default"] = array(
+        'title' => t('Default'),
+        'type' => MENU_DEFAULT_LOCAL_TASK,
+      );
+      $weight = 0;
+      foreach (entity_get_form_modes($entity_type) as $form_mode => $form_mode_info) {
+        $items["$path/form-display/$form_mode"] = array(
+          'title' => $form_mode_info['label'],
+          'type' => MENU_LOCAL_TASK,
+          'weight' => $weight++,
+          'route_name' => "field_ui.form_display_overview_$entity_type" . '_' . $form_mode,
+        );
+      }
+      $weight = 0;
+      foreach (entity_get_view_modes($entity_type) as $view_mode => $view_mode_info) {
+        $items["$path/display/$view_mode"] = array(
+          'title' => $view_mode_info['label'],
+          'type' => MENU_LOCAL_TASK,
+          'weight' => $weight++,
+          'route_name' => "field_ui.display_overview_$entity_type" . '_' . $view_mode,
+        );
+      }
+    }
+  }
   return $items;
 }
 
@@ -247,7 +334,12 @@ function field_ui_entity_operation_alter(array &$operations, EntityInterface $en
  */
 function field_ui_form_node_type_form_submit($form, &$form_state) {
   if ($form_state['triggering_element']['#parents'][0] === 'save_continue') {
-    $form_state['redirect_route'] = \Drupal::entityManager()->getAdminRouteInfo('node', $form_state['values']['type']);
+    $form_state['redirect_route'] = array(
+      'route_name' => 'field_ui.overview_node',
+      'route_parameters' => array(
+        'bundle' => $form_state['values']['type'],
+      ),
+    );
   }
 }
 
@@ -370,11 +462,3 @@ function theme_field_ui_table($variables) {
   return drupal_render($table);
 }
 
-/**
- * Implements hook_local_tasks_alter().
- */
-function field_ui_local_tasks_alter(&$local_tasks) {
-  $container = \Drupal::getContainer();
-  $local_task = FieldUiLocalTask::create($container, 'field_ui.fields');
-  $local_task->alterLocalTasks($local_tasks);
-}
diff --git a/core/modules/field_ui/field_ui.services.yml b/core/modules/field_ui/field_ui.services.yml
index 10752b0..2ab3051 100644
--- a/core/modules/field_ui/field_ui.services.yml
+++ b/core/modules/field_ui/field_ui.services.yml
@@ -1,16 +1,14 @@
 services:
   field_ui.subscriber:
     class: Drupal\field_ui\Routing\RouteSubscriber
-    arguments: ['@entity.manager', '@router.route_provider']
+    arguments: ['@entity.manager']
     tags:
      - { name: event_subscriber }
   access_check.field_ui.view_mode:
     class: Drupal\field_ui\Access\ViewModeAccessCheck
-    arguments: ['@entity.manager']
     tags:
      - { name: access_check }
   access_check.field_ui.form_mode:
     class: Drupal\field_ui\Access\FormModeAccessCheck
-    arguments: ['@entity.manager']
     tags:
      - { name: access_check }
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Access/FormModeAccessCheck.php b/core/modules/field_ui/lib/Drupal/field_ui/Access/FormModeAccessCheck.php
index 3322c9e..92e3790 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Access/FormModeAccessCheck.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Access/FormModeAccessCheck.php
@@ -8,7 +8,6 @@
 namespace Drupal\field_ui\Access;
 
 use Drupal\Core\Access\StaticAccessCheckInterface;
-use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Session\AccountInterface;
 use Symfony\Component\Routing\Route;
 use Symfony\Component\HttpFoundation\Request;
@@ -19,23 +18,6 @@
 class FormModeAccessCheck implements StaticAccessCheckInterface {
 
   /**
-   * The entity manager.
-   *
-   * @var \Drupal\Core\Entity\EntityManagerInterface
-   */
-  protected $entityManager;
-
-  /**
-   * Creates a new FormModeAccessCheck.
-   *
-   * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
-   *   The entity manager.
-   */
-  public function __construct(EntityManagerInterface $entity_manager) {
-    $this->entityManager = $entity_manager;
-  }
-
-  /**
    * {@inheritdoc}
    */
   public function appliesTo() {
@@ -47,19 +29,17 @@ public function appliesTo() {
    */
   public function access(Route $route, Request $request, AccountInterface $account) {
     if ($entity_type = $request->attributes->get('entity_type')) {
-      $form_mode = $request->attributes->get('form_mode_name');
+      $bundle = $request->attributes->get('bundle');
+      $form_mode = $request->attributes->get('mode');
 
-      if (!($bundle = $request->attributes->get('bundle'))) {
-        $entity_info = $this->entityManager->getDefinition($entity_type);
-        $bundle = $request->attributes->get('_raw_variables')->get($entity_info['bundle_entity_type']);
-      }
-
-      $visibility = FALSE;
-      if (!$form_mode || $form_mode == 'default') {
+      if ($form_mode == 'default') {
         $visibility = TRUE;
       }
-      elseif ($entity_display = $this->entityManager->getStorageController('entity_form_display')->load($entity_type . '.' . $bundle . '.' . $form_mode)) {
-        $visibility = $entity_display->status();
+      elseif ($entity_form_display = entity_load('entity_form_display', $entity_type . '.' . $bundle . '.' . $form_mode)) {
+        $visibility = $entity_form_display->status();
+      }
+      else {
+        $visibility = FALSE;
       }
 
       if ($visibility) {
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Access/ViewModeAccessCheck.php b/core/modules/field_ui/lib/Drupal/field_ui/Access/ViewModeAccessCheck.php
index 5e69daf..2fe350b 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Access/ViewModeAccessCheck.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Access/ViewModeAccessCheck.php
@@ -8,7 +8,6 @@
 namespace Drupal\field_ui\Access;
 
 use Drupal\Core\Access\StaticAccessCheckInterface;
-use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Session\AccountInterface;
 use Symfony\Component\Routing\Route;
 use Symfony\Component\HttpFoundation\Request;
@@ -19,23 +18,6 @@
 class ViewModeAccessCheck implements StaticAccessCheckInterface {
 
   /**
-   * The entity manager.
-   *
-   * @var \Drupal\Core\Entity\EntityManagerInterface
-   */
-  protected $entityManager;
-
-  /**
-   * Creates a new ViewModeAccessCheck.
-   *
-   * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
-   *   The entity manager.
-   */
-  public function __construct(EntityManagerInterface $entity_manager) {
-    $this->entityManager = $entity_manager;
-  }
-
-  /**
    * {@inheritdoc}
    */
   public function appliesTo() {
@@ -47,20 +29,18 @@ public function appliesTo() {
    */
   public function access(Route $route, Request $request, AccountInterface $account) {
     if ($entity_type = $request->attributes->get('entity_type')) {
-      $view_mode = $request->attributes->get('view_mode_name');
+      $bundle = $request->attributes->get('bundle');
+      $view_mode = $request->attributes->get('mode');
 
-      if (!($bundle = $request->attributes->get('bundle'))) {
-        $entity_info = $this->entityManager->getDefinition($entity_type);
-        $bundle = $request->attributes->get('_raw_variables')->get($entity_info['bundle_entity_type']);
-      }
-
-      $visibility = FALSE;
-      if (!$view_mode || $view_mode == 'default') {
+      if ($view_mode == 'default') {
         $visibility = TRUE;
       }
-      elseif ($entity_display = $this->entityManager->getStorageController('entity_display')->load($entity_type . '.' . $bundle . '.' . $view_mode)) {
+      elseif ($entity_display = entity_load('entity_display', $entity_type . '.' . $bundle . '.' . $view_mode)) {
         $visibility = $entity_display->status();
       }
+      else {
+        $visibility = FALSE;
+      }
 
       if ($visibility) {
         $permission = $route->getRequirement('_field_ui_view_mode_access');
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 870df32..0d68e77 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
@@ -38,17 +38,6 @@ public function getFormId() {
   /**
    * {@inheritdoc}
    */
-  public function buildForm(array $form, array &$form_state, $entity_type = NULL, $bundle = NULL) {
-    if ($this->getRequest()->attributes->has('view_mode_name')) {
-      $this->mode = $this->getRequest()->attributes->get('view_mode_name');
-    }
-
-    return parent::buildForm($form, $form_state, $entity_type, $bundle);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
   protected function buildFieldRow($field_id, FieldInstanceInterface $instance, EntityDisplayBaseInterface $entity_display, array $form, array &$form_state) {
     $field_row = parent::buildFieldRow($field_id, $instance, $entity_display, $form, $form_state);
     $display_options = $entity_display->getComponent($field_id);
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php
index 06a4bdc..c25bd43 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverviewBase.php
@@ -82,12 +82,10 @@ public function getRegions() {
   /**
    * {@inheritdoc}
    */
-  public function buildForm(array $form, array &$form_state, $entity_type = NULL, $bundle = NULL) {
+  public function buildForm(array $form, array &$form_state, $entity_type = NULL, $bundle = NULL, $mode = NULL) {
     parent::buildForm($form, $form_state, $entity_type, $bundle);
 
-    if (empty($this->mode)) {
-      $this->mode = 'default';
-    }
+    $this->mode = (isset($mode) ? $mode : 'default');
 
     // Gather type information.
     $instances = field_info_instances($this->entity_type, $this->bundle);
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php
index f51256b..7e37efb 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php
@@ -79,7 +79,12 @@ public function submit(array $form, array &$form_state) {
       drupal_set_message($this->t('There was a problem removing the %field from the %type content type.', array('%field' => $this->entity->label(), '%type' => $bundle_label)), 'error');
     }
 
-    $form_state['redirect_route'] = $this->entityManager->getAdminRouteInfo($this->entity->entity_type, $this->entity->bundle);
+    $form_state['redirect_route'] = array(
+      'route_name' => 'field_ui.overview_' . $this->entity->entity_type,
+      'route_parameters' => array(
+        'bundle' => $this->entity->bundle,
+      )
+    );
 
     // Fields are purged on cron. However field module prevents disabling modules
     // when field types they provided are used in a field until it is fully
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php
index 8d9ce26..062dd40 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldEditForm.php
@@ -206,7 +206,12 @@ public function submitForm(array &$form, array &$form_state) {
         $form_state['redirect'] = $next_destination;
       }
       else {
-        $form_state['redirect_route'] = $this->entityManager->getAdminRouteInfo($this->instance->entity_type, $this->instance->bundle);
+        $form_state['redirect_route'] = array(
+          'route_name' => 'field_ui.overview_' . $this->instance->entity_type,
+          'route_parameters' => array(
+            'bundle' => $this->instance->bundle,
+          )
+        );
       }
     }
     catch (\Exception $e) {
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php
index 8a7650f..7b50745 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldInstanceEditForm.php
@@ -193,7 +193,12 @@ public function submitForm(array &$form, array &$form_state) {
       $form_state['redirect'] = $next_destination;
     }
     else {
-      $form_state['redirect_route'] = $this->entityManager->getAdminRouteInfo($this->instance->entity_type, $this->instance->bundle);
+      $form_state['redirect_route'] = array(
+        'route_name' => 'field_ui.overview_' . $this->instance->entity_type,
+        'route_parameters' => array(
+          'bundle' => $this->instance->bundle,
+        )
+      );
     }
   }
 
@@ -207,11 +212,10 @@ public function delete(array &$form, array &$form_state) {
       $destination = drupal_get_destination();
       $request->query->remove('destination');
     }
-    $entity_info = $this->entityManager->getDefinition($this->instance->entity_type);
     $form_state['redirect_route'] = array(
       'route_name' => 'field_ui.delete_' . $this->instance->entity_type,
       'route_parameters' => array(
-        $entity_info['bundle_entity_type'] => $this->instance->bundle,
+        'bundle' => $this->instance->bundle,
         'field_instance' => $this->instance->id(),
       ),
       'options' => array(
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php
index 0c4877c..a1e8d8b 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php
@@ -38,17 +38,6 @@ public function getFormId() {
   /**
    * {@inheritdoc}
    */
-  public function buildForm(array $form, array &$form_state, $entity_type = NULL, $bundle = NULL) {
-    if ($this->getRequest()->attributes->has('form_mode_name')) {
-      $this->mode = $this->getRequest()->attributes->get('form_mode_name');
-    }
-
-    return parent::buildForm($form, $form_state, $entity_type, $bundle);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
   protected function buildFieldRow($field_id, FieldInstanceInterface $instance, EntityDisplayBaseInterface $entity_display, array $form, array &$form_state) {
     $field_row = parent::buildFieldRow($field_id, $instance, $entity_display, $form, $form_state);
 
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php b/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php
index aad6599..c7db86e 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php
@@ -74,16 +74,10 @@ public static function create(ContainerInterface $container) {
    * {@inheritdoc}
    */
   public function buildForm(array $form, array &$form_state, $entity_type = NULL, $bundle = NULL) {
-    if (!isset($form_state['bundle'])) {
-      if (!$bundle) {
-        $entity_info = $this->entityManager->getDefinition($entity_type);
-        $bundle = $this->getRequest()->attributes->get('_raw_variables')->get($entity_info['bundle_entity_type']);
-      }
-      $form_state['bundle'] = $bundle;
-    }
+    $entity_info = $this->entityManager->getDefinition($entity_type);
 
     $this->entity_type = $entity_type;
-    $this->bundle = $form_state['bundle'];
+    $this->bundle = $bundle;
     $this->adminPath = $this->entityManager->getAdminPath($this->entity_type, $this->bundle);
 
     // When displaying the form, make sure the list of fields is up-to-date.
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Plugin/Derivative/FieldUiLocalTask.php b/core/modules/field_ui/lib/Drupal/field_ui/Plugin/Derivative/FieldUiLocalTask.php
deleted file mode 100644
index a75a495..0000000
--- a/core/modules/field_ui/lib/Drupal/field_ui/Plugin/Derivative/FieldUiLocalTask.php
+++ /dev/null
@@ -1,234 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\field_ui\Plugin\Derivative\FieldUiLocalTask.
- */
-
-namespace Drupal\field_ui\Plugin\Derivative;
-
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
-use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
-use Drupal\Core\Routing\RouteProviderInterface;
-use Drupal\Core\StringTranslation\TranslationInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-
-/**
- * Provides local task definitions for all entity bundles.
- */
-class FieldUiLocalTask extends DerivativeBase implements ContainerDerivativeInterface {
-
-  /**
-   * The route provider.
-   *
-   * @var \Drupal\Core\Routing\RouteProviderInterface
-   */
-  protected $routeProvider;
-
-  /**
-   * The entity manager
-   *
-   * @var \Drupal\Core\Entity\EntityManagerInterface
-   */
-  protected $entityManager;
-
-  /**
-   * The translation manager service.
-   *
-   * @var \Drupal\Core\StringTranslation\TranslationInterface
-   */
-  protected $translationManager;
-
-  /**
-   * Creates an FieldUiLocalTask object.
-   *
-   * @param \Drupal\Core\Routing\RouteProviderInterface $route_provider
-   *   The route provider.
-   * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
-   *   The entity manager.
-   * @param \Drupal\Core\StringTranslation\TranslationInterface $translation_manager
-   *   The translation manager.
-   */
-  public function __construct(RouteProviderInterface $route_provider, EntityManagerInterface $entity_manager, TranslationInterface $translation_manager) {
-    $this->routeProvider = $route_provider;
-    $this->entityManager = $entity_manager;
-    $this->translationManager = $translation_manager;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function create(ContainerInterface $container, $base_plugin_id) {
-    return new static(
-      $container->get('router.route_provider'),
-      $container->get('entity.manager'),
-      $container->get('string_translation')
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getDerivativeDefinitions(array $base_plugin_definition) {
-    $this->derivatives = array();
-
-    foreach ($this->entityManager->getDefinitions() as $entity_type => $entity_info) {
-      if ($entity_info['fieldable'] && isset($entity_info['links']['admin-form'])) {
-        $this->derivatives["overview_$entity_type"] = array(
-          'route_name' => "field_ui.overview_$entity_type",
-          'weight' => 1,
-          'title' => $this->t('Manage fields'),
-          'tab_root_id' => "field_ui.fields:overview_$entity_type",
-        );
-
-        // 'Manage form display' tab.
-        $this->derivatives["form_display_overview_$entity_type"] = array(
-          'route_name' => "field_ui.form_display_overview_$entity_type",
-          'weight' => 2,
-          'title' => $this->t('Manage form display'),
-          'tab_root_id' => "field_ui.fields:overview_$entity_type",
-        );
-
-        // 'Manage display' tab.
-        $this->derivatives["display_overview_$entity_type"] = array(
-          'route_name' => "field_ui.display_overview_$entity_type",
-          'weight' => 3,
-          'title' => $this->t('Manage display'),
-          'tab_root_id' => "field_ui.fields:overview_$entity_type",
-        );
-
-        // Field instance edit tab.
-        $this->derivatives["instance_edit_$entity_type"] = array(
-          'route_name' => "field_ui.instance_edit_$entity_type",
-          'title' => $this->t('Edit'),
-          'tab_root_id' => "field_ui.fields:instance_edit_$entity_type",
-        );
-
-        // Field settings tab.
-        $this->derivatives["field_edit_$entity_type"] = array(
-          'route_name' => "field_ui.field_edit_$entity_type",
-          'title' => $this->t('Field settings'),
-          'tab_root_id' => "field_ui.fields:instance_edit_$entity_type",
-        );
-
-        // View and form modes secondary tabs.
-        // The same base $path for the menu item (with a placeholder) can be
-        // used for all bundles of a given entity type; but depending on
-        // administrator settings, each bundle has a different set of view
-        // modes available for customisation. So we define menu items for all
-        // view modes, and use a route requirement to determine which ones are
-        // actually visible for a given bundle.
-        $this->derivatives['field_form_display_default_' . $entity_type] = array(
-          'title' => 'Default',
-          'route_name' => "field_ui.form_display_overview_$entity_type",
-          'tab_root_id' => "field_ui.fields:overview_$entity_type",
-          'tab_parent_id' => "field_ui.fields:form_display_overview_$entity_type",
-        );
-        $this->derivatives['field_display_default_' . $entity_type] = array(
-          'title' => 'Default',
-          'route_name' => "field_ui.display_overview_$entity_type",
-          'tab_root_id' => "field_ui.fields:overview_$entity_type",
-          'tab_parent_id' => "field_ui.fields:display_overview_$entity_type",
-        );
-
-        // One local task for each form mode.
-        $weight = 0;
-        foreach (entity_get_form_modes($entity_type) as $form_mode => $form_mode_info) {
-          $this->derivatives['field_form_display_' . $form_mode . '_' . $entity_type] = array(
-            'title' => $form_mode_info['label'],
-            'route_name' => "field_ui.form_display_overview_form_mode_$entity_type",
-            'route_parameters' => array(
-              'form_mode_name' => $form_mode,
-            ),
-            'tab_root_id' => "field_ui.fields:overview_$entity_type",
-            'tab_parent_id' => "field_ui.fields:form_display_overview_$entity_type",
-            'weight' => $weight++,
-          );
-        }
-
-        // One local task for each view mode.
-        $weight = 0;
-        foreach (entity_get_view_modes($entity_type) as $view_mode => $form_mode_info) {
-          $this->derivatives['field_display_' . $view_mode . '_' . $entity_type] = array(
-            'title' => $form_mode_info['label'],
-            'route_name' => "field_ui.display_overview_view_mode_$entity_type",
-            'route_parameters' => array(
-              'view_mode_name' => $view_mode,
-            ),
-            'tab_root_id' => "field_ui.fields:overview_$entity_type",
-            'tab_parent_id' => "field_ui.fields:display_overview_$entity_type",
-            'weight' => $weight++,
-          );
-        }
-      }
-    }
-
-    foreach ($this->derivatives as &$entry) {
-      $entry += $base_plugin_definition;
-    }
-
-    return $this->derivatives;
-  }
-
-  /**
-   * Alters the tab_root_id definition for field_ui local tasks.
-   *
-   * @param array $local_tasks
-   *   An array of local tasks plugin definitions, keyed by plugin ID.
-   */
-  public function alterLocalTasks(&$local_tasks) {
-    foreach ($this->entityManager->getDefinitions() as $entity_type => $entity_info) {
-      if ($entity_info['fieldable'] && isset($entity_info['links']['admin-form'])) {
-        if ($parent_task = $this->getPluginIdFromRoute($entity_info['links']['admin-form'], $local_tasks)) {
-          $local_tasks["field_ui.fields:overview_$entity_type"]['tab_root_id'] = $parent_task;
-          $local_tasks["field_ui.fields:form_display_overview_$entity_type"]['tab_root_id'] = $parent_task;
-          $local_tasks["field_ui.fields:display_overview_$entity_type"]['tab_root_id'] = $parent_task;
-          $local_tasks["field_ui.fields:field_form_display_default_$entity_type"]['tab_root_id'] = $parent_task;
-          $local_tasks["field_ui.fields:field_display_default_$entity_type"]['tab_root_id'] = $parent_task;
-
-          foreach (entity_get_form_modes($entity_type) as $form_mode => $form_mode_info) {
-            $local_tasks['field_ui.fields:field_form_display_' . $form_mode . '_' . $entity_type]['tab_root_id'] = $parent_task;
-          }
-
-          foreach (entity_get_view_modes($entity_type) as $view_mode => $form_mode_info) {
-            $local_tasks['field_ui.fields:field_display_' . $view_mode . '_' . $entity_type]['tab_root_id'] = $parent_task;
-          }
-        }
-      }
-    }
-  }
-
-  /**
-   * Finds the local task ID of a route given the route name.
-   *
-   * @param string $route_name
-   *   The route name.
-   * @param array $local_tasks
-   *   An array of all local task definitions.
-   *
-   * @return string|null
-   *   Returns the local task ID of the given route or NULL if none is found.
-   */
-  protected function getPluginIdFromRoute($route_name, &$local_tasks) {
-    $local_task_id = NULL;
-    foreach ($local_tasks as $plugin_id => $local_task) {
-      if ($local_task['route_name'] == $route_name) {
-        $local_task_id = $plugin_id;
-        break;
-      }
-    }
-
-    return $local_task_id;
-  }
-
-  /**
-   * Translates a string to the current language or to a given language.
-   *
-   * See the t() documentation for details.
-   */
-  protected function t($string, array $args = array(), array $options = array()) {
-    return $this->translationManager->translate($string, $args, $options);
-  }
-
-}
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Routing/RouteSubscriber.php b/core/modules/field_ui/lib/Drupal/field_ui/Routing/RouteSubscriber.php
index 048630a..ff49c18 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Routing/RouteSubscriber.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Routing/RouteSubscriber.php
@@ -8,10 +8,7 @@
 namespace Drupal\field_ui\Routing;
 
 use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Routing\RouteProviderInterface;
 use Drupal\Core\Routing\RouteSubscriberBase;
-use Drupal\Core\Routing\RoutingEvents;
-use Symfony\Component\Routing\Exception\RouteNotFoundException;
 use Symfony\Component\Routing\Route;
 use Symfony\Component\Routing\RouteCollection;
 
@@ -28,23 +25,13 @@ class RouteSubscriber extends RouteSubscriberBase {
   protected $manager;
 
   /**
-   * The route provider.
-   *
-   * @var \Drupal\Core\Routing\RouteProviderInterface
-   */
-  protected $routeProvider;
-
-  /**
    * Constructs a RouteSubscriber object.
    *
    * @param \Drupal\Core\Entity\EntityManagerInterface $manager
    *   The entity type manager.
-   * @param \Drupal\Core\Routing\RouteProviderInterface $route_provider
-   *   The route provider.
    */
-  public function __construct(EntityManagerInterface $manager, RouteProviderInterface $route_provider) {
+  public function __construct(EntityManagerInterface $manager) {
     $this->manager = $manager;
-    $this->routeProvider = $route_provider;
   }
 
   /**
@@ -53,20 +40,8 @@ public function __construct(EntityManagerInterface $manager, RouteProviderInterf
   protected function routes(RouteCollection $collection) {
     foreach ($this->manager->getDefinitions() as $entity_type => $entity_info) {
       $defaults = array();
-      if ($entity_info['fieldable'] && isset($entity_info['links']['admin-form'])) {
-        // First try to get the route from the dynamic_routes collection.
-        if (!$entity_route = $collection->get($entity_info['links']['admin-form'])) {
-          // Then try to get the route from the route provider itself, checking
-          // all previous collections.
-          try {
-            $entity_route = $this->routeProvider->getRouteByName($entity_info['links']['admin-form']);
-          }
-          // If the route was not found, skip this entity type.
-          catch (RouteNotFoundException $e) {
-            continue;
-          }
-        }
-        $path = $entity_route->getPath();
+      if ($entity_info['fieldable'] && isset($entity_info['route_base_path'])) {
+        $path = $entity_info['route_base_path'];
 
         $route = new Route(
           "$path/fields/{field_instance}",
@@ -110,19 +85,20 @@ protected function routes(RouteCollection $collection) {
             '_form' => '\Drupal\field_ui\FormDisplayOverview',
             '_title' => 'Manage form display',
           ) + $defaults,
-          array('_field_ui_form_mode_access' => 'administer ' . $entity_type . ' form display')
+          array('_permission' => 'administer ' . $entity_type . ' form display')
         );
         $collection->add("field_ui.form_display_overview_$entity_type", $route);
 
-        $route = new Route(
-          "$path/form-display/{form_mode_name}",
-          array(
-            '_form' => '\Drupal\field_ui\FormDisplayOverview',
-            'form_mode_name' => NULL,
-          ) + $defaults,
-          array('_field_ui_form_mode_access' => 'administer ' . $entity_type . ' form display')
-        );
-        $collection->add("field_ui.form_display_overview_form_mode_$entity_type", $route);
+        foreach (entity_get_form_modes($entity_type) as $form_mode => $form_mode_info) {
+          $route = new Route(
+            "$path/form-display/$form_mode",
+            array(
+              '_form' => '\Drupal\field_ui\FormDisplayOverview',
+              'mode' => $form_mode,
+            ) + $defaults,
+            array('_field_ui_form_mode_access' => 'administer ' . $entity_type . ' form display'));
+          $collection->add("field_ui.form_display_overview_$entity_type" . '_'. $form_mode, $route);
+        }
 
         $route = new Route(
           "$path/display",
@@ -130,30 +106,22 @@ protected function routes(RouteCollection $collection) {
             '_form' => '\Drupal\field_ui\DisplayOverview',
             '_title' => 'Manage display',
           ) + $defaults,
-          array('_field_ui_view_mode_access' => 'administer ' . $entity_type . ' display')
+          array('_permission' => 'administer ' . $entity_type . ' display')
         );
         $collection->add("field_ui.display_overview_$entity_type", $route);
 
-        $route = new Route(
-          "$path/display/{view_mode_name}",
-          array(
-            '_form' => '\Drupal\field_ui\DisplayOverview',
-            'view_mode_name' => NULL,
-          ) + $defaults,
-          array('_field_ui_view_mode_access' => 'administer ' . $entity_type . ' display')
-        );
-        $collection->add("field_ui.display_overview_view_mode_$entity_type", $route);
+        foreach (entity_get_view_modes($entity_type) as $view_mode => $view_mode_info) {
+          $route = new Route(
+            "$path/display/$view_mode",
+            array(
+              '_form' => '\Drupal\field_ui\DisplayOverview',
+              'mode' => $view_mode,
+            ) + $defaults,
+            array('_field_ui_view_mode_access' => 'administer ' . $entity_type . ' display'));
+          $collection->add("field_ui.display_overview_$entity_type" . '_' . $view_mode, $route);
+        }
       }
     }
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public static function getSubscribedEvents() {
-    $events = parent::getSubscribedEvents();
-    $events[RoutingEvents::DYNAMIC] = array('onDynamicRoutes', -100);
-    return $events;
-  }
-
 }
diff --git a/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php b/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php
index ede7799..e6841c5 100644
--- a/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php
+++ b/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php
@@ -20,7 +20,8 @@
  *   controllers = {
  *     "storage" = "Drupal\Core\Entity\DatabaseStorageController"
  *   },
- *   fieldable = TRUE
+ *   fieldable = TRUE,
+ *   route_base_path = "field-ui-test-no-bundle/manage"
  * )
  */
 class FieldUITestNoBundle extends Entity {
diff --git a/core/modules/file/file.views.inc b/core/modules/file/file.views.inc
index 7adc194..3ba4cc7 100644
--- a/core/modules/file/file.views.inc
+++ b/core/modules/file/file.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data for file.module.
+ * Provide views data and handlers for file.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 use Drupal\Core\Entity\FieldableDatabaseStorageController;
diff --git a/core/modules/forum/forum.views.inc b/core/modules/forum/forum.views.inc
index fa7174f..fb79907 100644
--- a/core/modules/forum/forum.views.inc
+++ b/core/modules/forum/forum.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data for forum.module.
+ * Provide views data and handlers for forum.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/modules/history/history.views.inc b/core/modules/history/history.views.inc
index 50e12aa..ed36820 100644
--- a/core/modules/history/history.views.inc
+++ b/core/modules/history/history.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data for history.module.
+ * Provide views data and handlers for history.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/modules/image/image.views.inc b/core/modules/image/image.views.inc
index 5babb6a..2fbcddb 100644
--- a/core/modules/image/image.views.inc
+++ b/core/modules/image/image.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data for image.module.
+ * Provide views data and handlers for image.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 use Drupal\Core\Entity\FieldableDatabaseStorageController;
diff --git a/core/modules/migrate/config/migrate.migration.d6_system_cron.yml b/core/modules/migrate/config/migrate.migration.d6_system_cron.yml
deleted file mode 100644
index 736af9b..0000000
--- a/core/modules/migrate/config/migrate.migration.d6_system_cron.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-id: d6_system_cron
-source:
-    plugin: drupal6_variable
-    variables:
-        - cron_threshold_warning
-        - cron_threshold_error
-        - cron_last
-process:
-    'threshold:warning': cron_threshold_warning
-    'threshold:error': cron_threshold_error
-destination:
-    plugin: d8_config
-    config_name: system.cron
diff --git a/core/modules/migrate/config/migrate.migration.d6_system_rss.yml b/core/modules/migrate/config/migrate.migration.d6_system_rss.yml
deleted file mode 100644
index acce5e2..0000000
--- a/core/modules/migrate/config/migrate.migration.d6_system_rss.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-id: d6_system_rss
-source:
-    plugin: drupal6_variable
-    variables:
-        - feed_default_items
-process:
-    'items:limit': feed_default_items
-destination:
-    plugin: d8_config
-    config_name: system.rss
diff --git a/core/modules/migrate/config/migrate.migration.d6_system_site.yml b/core/modules/migrate/config/migrate.migration.d6_system_site.yml
deleted file mode 100644
index bcfb712..0000000
--- a/core/modules/migrate/config/migrate.migration.d6_system_site.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-id: d6_system_site
-source:
-    plugin: drupal6_variable
-    variables:
-        - site_name
-        - site_mail
-        - site_slogan
-        - site_frontpage
-        - site_403
-        - site_404
-        - drupal_weight_select_max
-        - admin_compact_mode
-process:
-    name: site_name
-    mail: site_mail
-    slogan: site_slogan
-    'page:front': site_frontpage
-    'page:403': site_403
-    'page:404': site_404
-    weight_select_max: drupal_weight_select_max
-    admin_compact_mode: admin_compact_mode
-destination:
-    plugin: d8_config
-    config_name: system.site
diff --git a/core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php b/core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php
deleted file mode 100644
index 5d48ed0..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php
+++ /dev/null
@@ -1,288 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Entity\Migration.
- */
-
-namespace Drupal\migrate\Entity;
-
-use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\migrate\MigrateException;
-use Drupal\migrate\Plugin\MigrateIdMapInterface;
-
-/**
- * Defines the Migration entity.
- *
- * The migration entity stores the information about a single migration, like
- * the source, process and destination plugins.
- *
- * @EntityType(
- *   id = "migration",
- *   label = @Translation("Migration"),
- *   module = "migrate",
- *   controllers = {
- *     "storage" = "Drupal\Core\Config\Entity\ConfigStorageController",
- *     "list" = "Drupal\Core\Config\Entity\DraggableListController",
- *     "access" = "Drupal\Core\Entity\EntityAccessController",
- *     "form" = {
- *       "add" = "Drupal\Core\Entity\EntityFormController",
- *       "edit" = "Drupal\Core\Entity\EntityFormController",
- *       "delete" = "Drupal\Core\Entity\EntityFormController"
- *     }
- *   },
- *   config_prefix = "migrate.migration",
- *   entity_keys = {
- *     "id" = "id",
- *     "label" = "label",
- *     "weight" = "weight",
- *     "uuid" = "uuid"
- *   }
- * )
- */
-class Migration extends ConfigEntityBase implements MigrationInterface {
-
-  /**
-   * The migration ID (machine name).
-   *
-   * @var string
-   */
-  public $id;
-
-  /**
-   * The migration UUID.
-   *
-   * This is assigned automatically when the migration is created.
-   *
-   * @var string
-   */
-  public $uuid;
-
-  /**
-   * The human-readable label for the migration.
-   *
-   * @var string
-   */
-  public $label;
-
-  /**
-   * The plugin ID for the row.
-   *
-   * @var string
-   */
-  public $row;
-
-  /**
-   * The source configuration, with at least a 'plugin' key.
-   *
-   * Used to initialize the $sourcePlugin.
-   *
-   * @var array
-   */
-  public $source;
-
-  /**
-   * The source plugin.
-   *
-   * @var \Drupal\migrate\Plugin\MigrateSourceInterface
-   */
-  protected $sourcePlugin;
-
-  /**
-   * The configuration describing the process plugins.
-   *
-   * @var array
-   */
-  public $process;
-
-  /**
-   * The destination configuration, with at least a 'plugin' key.
-   *
-   * Used to initialize $destinationPlugin.
-   *
-   * @var array
-   */
-  public $destination;
-
-  /**
-   * The destination plugin.
-   *
-   * @var \Drupal\migrate\Plugin\MigrateDestinationInterface
-   */
-  protected $destinationPlugin;
-
-  /**
-   * The identifier map data.
-   *
-   * Used to initialize $idMapPlugin.
-   *
-   * @var string
-   */
-  public $idMap = array();
-
-  /**
-   * The identifier map.
-   *
-   * @var \Drupal\migrate\Plugin\MigrateIdMapInterface
-   */
-  protected $idMapPlugin;
-
-  /**
-   * The source identifiers.
-   *
-   * An array of source identifiers: the keys are the name of the properties,
-   * the values are dependent on the ID map plugin.
-   *
-   * @var array
-   */
-  public $sourceIds = array();
-
-  /**
-   * The destination identifiers.
-   *
-   * An array of destination identifiers: the keys are the name of the
-   * properties, the values are dependent on the ID map plugin.
-   *
-   * @var array
-   */
-  public $destinationIds = array();
-
-  /**
-   * Information on the highwater mark.
-   *
-   * @var array
-   */
-  public $highwaterProperty;
-
-  /**
-   * Indicate whether the primary system of record for this migration is the
-   * source, or the destination (Drupal). In the source case, migration of
-   * an existing object will completely replace the Drupal object with data from
-   * the source side. In the destination case, the existing Drupal object will
-   * be loaded, then changes from the source applied; also, rollback will not be
-   * supported.
-   *
-   * @var string
-   */
-  public $systemOfRecord = self::SOURCE;
-
-  /**
-   * Specify value of needs_update for current map row. Usually set by
-   * MigrateFieldHandler implementations.
-   *
-   * @var int
-   */
-  public $needsUpdate = MigrateIdMapInterface::STATUS_IMPORTED;
-
-  /**
-   * @var \Drupal\Core\KeyValueStore\KeyValueStoreInterface
-   */
-  protected $highwaterStorage;
-
-  /**
-   * @var bool
-   */
-  public $trackLastImported = FALSE;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getSourcePlugin() {
-    if (!isset($this->sourcePlugin)) {
-      $this->sourcePlugin = \Drupal::service('plugin.manager.migrate.source')->createInstance($this->source['plugin'], $this->source, $this);
-    }
-    return $this->sourcePlugin;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getProcessPlugins(array $process = NULL) {
-    if (!isset($process)) {
-      $process = $this->process;
-    }
-    $process_plugins = array();
-    foreach ($this->getProcessNormalized($process) as $property => $configurations) {
-      $process_plugins[$property] = array();
-      foreach ($configurations as $configuration) {
-        if (isset($configuration['source'])) {
-          $process_plugins[$property][] = \Drupal::service('plugin.manager.migrate.process')->createInstance('get', $configuration, $this);
-        }
-        // Get is already handled.
-        if ($configuration['plugin'] != 'get') {
-          $process_plugins[$property][] = \Drupal::service('plugin.manager.migrate.process')->createInstance($configuration['plugin'], $configuration, $this);
-        }
-        if (!$process_plugins[$property]) {
-          throw new MigrateException("Invalid process configuration for $property");
-        }
-      }
-    }
-    return $process_plugins;
-  }
-
-  /**
-   * Resolve shorthands into a list of plugin configurations.
-   *
-   * @param array $process
-   *   A process configuration array.
-   *
-   * @return array
-   *   The normalized process configuration.
-   */
-  protected function getProcessNormalized(array $process) {
-    $normalized_configurations = array();
-    foreach ($process as $destination => $configuration) {
-      if (is_string($configuration)) {
-        $configuration = array(
-          'plugin' => 'get',
-          'source' => $configuration,
-        );
-      }
-      if (isset($configuration['plugin'])) {
-        $configuration = array($configuration);
-      }
-      $normalized_configurations[$destination] = $configuration;
-    }
-    return $normalized_configurations;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getDestinationPlugin() {
-    if (!isset($this->destinationPlugin)) {
-      $this->destinationPlugin = \Drupal::service('plugin.manager.migrate.destination')->createInstance($this->destination['plugin'], $this->destination, $this);
-    }
-    return $this->destinationPlugin;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getIdMap() {
-    if (!isset($this->idMapPlugin)) {
-      $configuration = $this->idMap;
-      $plugin = isset($configuration['plugin']) ? $configuration['plugin'] : 'sql';
-      $this->idMapPlugin = \Drupal::service('plugin.manager.migrate.id_map')->createInstance($plugin, $configuration, $this);
-    }
-    return $this->idMapPlugin;
-  }
-
-  /**
-   * @return \Drupal\Core\KeyValueStore\KeyValueStoreInterface
-   */
-  protected function getHighWaterStorage() {
-    if (!isset($this->highwaterStorage)) {
-      $this->highwaterStorage = \Drupal::keyValue('migrate:highwater');
-    }
-    return $this->highwaterStorage;
-  }
-
-  public function getHighwater() {
-    return $this->getHighWaterStorage()->get($this->id());
-  }
-
-  public function saveHighwater($highwater) {
-    $this->getHighWaterStorage()->set($this->id(), $highwater);
-  }
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Entity/MigrationInterface.php b/core/modules/migrate/lib/Drupal/migrate/Entity/MigrationInterface.php
deleted file mode 100644
index 1fa3dad..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Entity/MigrationInterface.php
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Entity\MigrationInterface.
- */
-
-namespace Drupal\migrate\Entity;
-
-use Drupal\Core\Config\Entity\ConfigEntityInterface;
-
-/**
- * Interface for migrations.
- */
-interface MigrationInterface extends ConfigEntityInterface {
-
-  const SOURCE = 'source';
-  const DESTINATION = 'destination';
-
-  /**
-   * Codes representing the current status of a migration, and stored in the
-   * migrate_status table.
-   */
-  const STATUS_IDLE = 0;
-  const STATUS_IMPORTING = 1;
-  const STATUS_ROLLING_BACK = 2;
-  const STATUS_STOPPING = 3;
-  const STATUS_DISABLED = 4;
-
-  /**
-   * Message types to be passed to saveMessage() and saved in message tables.
-   * MESSAGE_INFORMATIONAL represents a condition that did not prevent the
-   * operation from succeeding - all others represent different severities of
-   * conditions resulting in a source record not being imported.
-   */
-  const MESSAGE_ERROR = 1;
-  const MESSAGE_WARNING = 2;
-  const MESSAGE_NOTICE = 3;
-  const MESSAGE_INFORMATIONAL = 4;
-
-  /**
-   * Codes representing the result of a rollback or import process.
-   */
-  const RESULT_COMPLETED = 1;   // All records have been processed
-  const RESULT_INCOMPLETE = 2;  // The process has interrupted itself (e.g., the
-                                // memory limit is approaching)
-  const RESULT_STOPPED = 3;     // The process was stopped externally (e.g., via
-                                // drush migrate-stop)
-  const RESULT_FAILED = 4;      // The process had a fatal error
-  const RESULT_SKIPPED = 5;     // Dependencies are unfulfilled - skip the process
-  const RESULT_DISABLED = 6;    // This migration is disabled, skipping
-
-  /**
-   * Returns the initialized source plugin.
-   *
-   * @return \Drupal\migrate\Plugin\MigrateSourceInterface
-   */
-  public function getSourcePlugin();
-
-  /**
-   * Returns the process plugins.
-   *
-   * @param array $process
-   *   A process configuration array.
-   *
-   * @return array
-   *   A list of process plugins.
-   */
-  public function getProcessPlugins(array $process = NULL);
-
-  /**
-   * Returns the initialized destination plugin.
-   *
-   * @return \Drupal\migrate\Plugin\MigrateDestinationInterface
-   */
-  public function getDestinationPlugin();
-
-  /**
-   * Returns the initialized id_map plugin.
-   *
-   * @return \Drupal\migrate\Plugin\MigrateIdMapInterface
-   */
-  public function getIdMap();
-
-  /**
-   * @return int
-   */
-  public function getHighwater();
-
-  public function saveHighwater($highwater);
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/MigrateException.php b/core/modules/migrate/lib/Drupal/migrate/MigrateException.php
deleted file mode 100644
index d07c04f..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/MigrateException.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\MigrateException.
- */
-
-namespace Drupal\migrate;
-
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Plugin\MigrateIdMapInterface;
-
-/**
- * Defines the migrate exception class.
- */
-class MigrateException extends \Exception {
-
-  /**
-   * The level of the error being reported.
-   *
-   * The value is a Migration::MESSAGE_* constant.
-   *
-   * @var int
-   */
-  protected $level;
-
-  /**
-   * The status to record in the map table for the current item.
-   *
-   * The value is a MigrateMap::STATUS_* constant.
-   *
-   * @var int
-   */
-  protected $status;
-
-  /**
-   * Constructs a MigrateException object.
-   *
-   * @param string $message
-   *   The message for the exception.
-   * @param int $code
-   *   The Exception code.
-   * @param \Exception $previous
-   *   The previous exception used for the exception chaining.
-   * @param int $level
-   *   The level of the error, a Migration::MESSAGE_* constant.
-   * @param int $status
-   *   The status of the item for the map table, a MigrateMap::STATUS_*
-   *   constant.
-   */
-  public function __construct($message = null, $code = 0, \Exception $previous = null, $level = MigrationInterface::MESSAGE_ERROR, $status = MigrateIdMapInterface::STATUS_FAILED) {
-    $this->level = $level;
-    $this->status = $status;
-    parent::__construct($message);
-  }
-
-  /**
-   * Gets the level.
-   *
-   * @return int
-   */
-  public function getLevel() {
-    return $this->level;
-  }
-
-  /**
-   * Gets the status of the current item.
-   *
-   * @return int
-   */
-  public function getStatus() {
-    return $this->status;
-  }
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/MigrateExecutable.php b/core/modules/migrate/lib/Drupal/migrate/MigrateExecutable.php
deleted file mode 100644
index 9246ffe..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/MigrateExecutable.php
+++ /dev/null
@@ -1,538 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\MigrateExecutable.
- */
-
-namespace Drupal\migrate;
-
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Plugin\MigrateIdMapInterface;
-
-/**
- * Defines a migrate executable class.
- */
-class MigrateExecutable {
-
-  /**
-   * The migration to do.
-   *
-   * @var \Drupal\migrate\Entity\MigrationInterface
-   */
-  protected $migration;
-
-  /**
-   * The number of successfully imported rows since feedback was given.
-   *
-   * @var int
-   */
-  protected $successes_since_feedback;
-
-  /**
-   * The number of rows that were successfully processed.
-   *
-   * @var int
-   */
-  protected $total_successes;
-
-  /**
-   * Status of one row.
-   *
-   * The value is a MigrateIdMapInterface::STATUS_* constant, for example:
-   * STATUS_IMPORTED.
-   *
-   * @var int
-   */
-  protected $needsUpdate;
-
-  /**
-   * The number of rows processed.
-   *
-   * The total attempted, whether or not they were successful.
-   *
-   * @var int
-   */
-  protected $total_processed;
-
-  /**
-   * The queued messages not yet saved.
-   *
-   * Each element in the array is an array with two keys:
-   * - 'message': The message string.
-   * - 'level': The level, a MigrationInterface::MESSAGE_* constant.
-   *
-   * @var array
-   */
-  protected $queuedMessages = array();
-
-  /**
-   * The options that can be set when executing the migration.
-   *
-   * Values can be set for:
-   * - 'limit': Sets a time limit.
-   *
-   * @var array
-   */
-  protected $options;
-
-  /**
-   * The fraction of the memory limit at which an operation will be interrupted.
-   * Can be overridden by a Migration subclass if one would like to push the
-   * envelope. Defaults to 85%.
-   *
-   * @var float
-   */
-  protected $memoryThreshold = 0.85;
-
-  /**
-   * The PHP memory_limit expressed in bytes.
-   *
-   * @var int
-   */
-  protected $memoryLimit;
-
-  /**
-   * The fraction of the time limit at which an operation will be interrupted.
-   * Can be overridden by a Migration subclass if one would like to push the
-   * envelope. Defaults to 90%.
-   *
-   * @var float
-   */
-  protected $timeThreshold = 0.90;
-
-  /**
-   * The PHP max_execution_time.
-   *
-   * @var int
-   */
-  protected $timeLimit;
-
-  /**
-   * @var array
-   */
-  protected $sourceIdValues;
-
-  /**
-   * @var int
-   */
-  protected $processed_since_feedback = 0;
-
-  /**
-   * The translation manager.
-   *
-   * @var \Drupal\Core\StringTranslation\TranslationInterface
-   */
-  protected $translationManager;
-
-  /**
-   * @param MigrationInterface $migration
-   * @param MigrateMessageInterface $message
-   *
-   * @throws \Drupal\migrate\MigrateException
-   */
-  public function __construct(MigrationInterface $migration, MigrateMessageInterface $message) {
-    $this->migration = $migration;
-    $this->message = $message;
-    $this->migration->getIdMap()->setMessage($message);
-    // Record the memory limit in bytes
-    $limit = trim(ini_get('memory_limit'));
-    if ($limit == '-1') {
-      $this->memoryLimit = PHP_INT_MAX;
-    }
-    else {
-      if (!is_numeric($limit)) {
-        $last = strtolower(substr($limit, -1));
-        switch ($last) {
-          case 'g':
-            $limit *= 1024;
-          case 'm':
-            $limit *= 1024;
-          case 'k':
-            $limit *= 1024;
-            break;
-          default:
-            throw new MigrateException($this->t('Invalid PHP memory_limit !limit',
-              array('!limit' => $limit)));
-        }
-      }
-      $this->memoryLimit = $limit;
-    }
-  }
-
-  /**
-   * @return \Drupal\migrate\Source
-   */
-  public function getSource() {
-    if (!isset($this->source)) {
-      $this->source = new Source($this->migration, $this);
-    }
-    return $this->source;
-  }
-
-  /**
-   * The rollback action to be saved for the current row.
-   *
-   * @var int
-   */
-  public $rollbackAction;
-
-  /**
-   * An array of counts. Initially used for cache hit/miss tracking.
-   *
-   * @var array
-   */
-  protected $counts = array();
-
-  /**
-   * When performing a bulkRollback(), the maximum number of items to pass in
-   * a single call. Can be overridden in derived class constructor.
-   *
-   * @var int
-   */
-  protected $rollbackBatchSize = 50;
-
-  /**
-   * The object currently being constructed
-   * @var \stdClass
-   */
-  protected $destinationValues;
-
-  /**
-   * The current data row retrieved from the source.
-   * @var \stdClass
-   */
-  protected $sourceValues;
-
-  /**
-   * Perform an import operation - migrate items from source to destination.
-   */
-  public function import() {
-    $return = MigrationInterface::RESULT_COMPLETED;
-    $source = $this->getSource();
-    $destination = $this->migration->getDestinationPlugin();
-    $id_map = $this->migration->getIdMap();
-
-    try {
-      $source->rewind();
-    }
-    catch (\Exception $e) {
-      $this->message->display(
-        $this->t('Migration failed with source plugin exception: !e',
-          array('!e' => $e->getMessage())));
-      return MigrationInterface::RESULT_FAILED;
-    }
-    while ($source->valid()) {
-      $row = $source->current();
-      if ($this->sourceIdValues = $row->getSourceIdValues()) {
-        // Wipe old messages, and save any new messages.
-        $id_map->delete($row->getSourceIdValues(), TRUE);
-        $this->saveQueuedMessages();
-      }
-
-      $this->processRow($row);
-
-      try {
-        $destination_id_values = $destination->import($row);
-        // @TODO handle the successful but no ID case like config.
-        if ($destination_id_values) {
-          $id_map->saveIdMapping($row, $destination_id_values, $this->needsUpdate, $this->rollbackAction);
-          $this->successes_since_feedback++;
-          $this->total_successes++;
-        }
-        else {
-          $id_map->saveIdMapping($row, array(), MigrateIdMapInterface::STATUS_FAILED, $this->rollbackAction);
-          if ($id_map->messageCount() == 0) {
-            $message = $this->t('New object was not saved, no error provided');
-            $this->saveMessage($message);
-            $this->message->display($message);
-          }
-        }
-      }
-      catch (MigrateException $e) {
-        $this->migration->getIdMap()->saveIdMapping($row, array(), $e->getStatus(), $this->rollbackAction);
-        $this->saveMessage($e->getMessage(), $e->getLevel());
-        $this->message->display($e->getMessage());
-      }
-      catch (\Exception $e) {
-        $this->migration->getIdMap()->saveIdMapping($row, array(), MigrateIdMapInterface::STATUS_FAILED, $this->rollbackAction);
-        $this->handleException($e);
-      }
-      $this->total_processed++;
-      $this->processed_since_feedback++;
-      if ($highwater_property = $this->migration->get('highwaterProperty')) {
-        $this->migration->saveHighwater($row->getSourceProperty($highwater_property['name']));
-      }
-
-      // Reset row properties.
-      unset($sourceValues, $destinationValues);
-      $this->needsUpdate = MigrateIdMapInterface::STATUS_IMPORTED;
-
-      // TODO: Temporary. Remove when http://drupal.org/node/375494 is committed.
-      // TODO: Should be done in MigrateDestinationEntity
-      if (!empty($destination->entityType)) {
-        entity_get_controller($destination->entityType)->resetCache();
-      }
-
-      if (($return = $this->checkStatus()) != MigrationInterface::RESULT_COMPLETED) {
-        break;
-      }
-      if ($this->timeOptionExceeded()) {
-        break;
-      }
-      try {
-        $source->next();
-      }
-      catch (\Exception $e) {
-        $this->message->display(
-          $this->t('Migration failed with source plugin exception: !e',
-            array('!e' => $e->getMessage())));
-        return MigrationInterface::RESULT_FAILED;
-      }
-    }
-
-    /**
-     * @TODO uncomment this
-     */
-    #$this->progressMessage($return);
-
-    return $return;
-  }
-
-  /**
-   * @param Row $row
-   *   The $row to be processed.
-   * @param array $process
-   *   A process pipeline configuration. If not set, the top level process
-   *   configuration in the migration entity is used.
-   * @param mixed $value
-   *   Optional initial value of the pipeline for the first destination.
-   *   Usually setting this is not necessary as $process typically starts with
-   *   a 'get'. This is useful only when the $process contains a single
-   *   destination and needs to access a value outside of the source. See
-   *   \Drupal\migrate\Plugin\migrate\process\Iterator::transformKey for an
-   *   example.
-   */
-  public function processRow(Row $row, array $process = NULL, $value = NULL) {
-    foreach ($this->migration->getProcessPlugins($process) as $destination => $plugins) {
-      foreach ($plugins as $plugin) {
-        $value = $plugin->transform($value, $this, $row, $destination);
-      }
-      $row->setDestinationProperty($destination, $value);
-      // Reset the value.
-      $value = NULL;
-    }
-  }
-
-  /**
-   * Fetch the key array for the current source record.
-   *
-   * @return array
-   */
-  protected function currentSourceIds() {
-    return $this->getSource()->getCurrentIds();
-  }
-
-  /**
-   * Test whether we've exceeded the designated time limit.
-   *
-   * @return boolean
-   *  TRUE if the threshold is exceeded, FALSE if not.
-   */
-  protected function timeOptionExceeded() {
-    if (!$time_limit = $this->getTimeLimit()) {
-      return FALSE;
-    }
-    $time_elapsed = time() - REQUEST_TIME;
-    if ($time_elapsed >= $time_limit) {
-      return TRUE;
-    }
-    else {
-      return FALSE;
-    }
-  }
-
-  public function getTimeLimit() {
-    if (isset($this->options['limit']) &&
-        ($this->options['limit']['unit'] == 'seconds' || $this->options['limit']['unit'] == 'second')) {
-      return $this->options['limit']['value'];
-    }
-    else {
-      return NULL;
-    }
-  }
-
-  /**
-   * Pass messages through to the map class.
-   *
-   * @param string $message
-   *  The message to record.
-   * @param int $level
-   *  Optional message severity (defaults to MESSAGE_ERROR).
-   */
-  public function saveMessage($message, $level = MigrationInterface::MESSAGE_ERROR) {
-    $this->migration->getIdMap()->saveMessage($this->sourceIdValues, $message, $level);
-  }
-
-  /**
-   * Queue messages to be later saved through the map class.
-   *
-   * @param string $message
-   *  The message to record.
-   * @param int $level
-   *  Optional message severity (defaults to MESSAGE_ERROR).
-   */
-  public function queueMessage($message, $level = MigrationInterface::MESSAGE_ERROR) {
-    $this->queuedMessages[] = array('message' => $message, 'level' => $level);
-  }
-
-  /**
-   * Save any messages we've queued up to the message table.
-   */
-  public function saveQueuedMessages() {
-    foreach ($this->queuedMessages as $queued_message) {
-      $this->saveMessage($queued_message['message'], $queued_message['level']);
-    }
-    $this->queuedMessages = array();
-  }
-
-  /**
-   * Standard top-of-loop stuff, common between rollback and import - check
-   * for exceptional conditions, and display feedback.
-   */
-  protected function checkStatus() {
-    if ($this->memoryExceeded()) {
-      return MigrationInterface::RESULT_INCOMPLETE;
-    }
-    if ($this->timeExceeded()) {
-      return MigrationInterface::RESULT_INCOMPLETE;
-    }
-    /*
-     * @TODO uncomment this
-    if ($this->getStatus() == MigrationInterface::STATUS_STOPPING) {
-      return MigrationBase::RESULT_STOPPED;
-    }
-    */
-    // If feedback is requested, produce a progress message at the proper time
-    /*
-     * @TODO uncomment this
-    if (isset($this->feedback)) {
-      if (($this->feedback_unit == 'seconds' && time() - $this->lastfeedback >= $this->feedback) ||
-          ($this->feedback_unit == 'items' && $this->processed_since_feedback >= $this->feedback)) {
-        $this->progressMessage(MigrationInterface::RESULT_INCOMPLETE);
-      }
-    }
-    */
-
-    return MigrationInterface::RESULT_COMPLETED;
-  }
-
-  /**
-   * Test whether we've exceeded the desired memory threshold. If so, output a message.
-   *
-   * @return boolean
-   *  TRUE if the threshold is exceeded, FALSE if not.
-   */
-  protected function memoryExceeded() {
-    $usage = memory_get_usage();
-    $pct_memory = $usage / $this->memoryLimit;
-    if ($pct_memory > $this->memoryThreshold) {
-      $this->message->display(
-        $this->t('Memory usage is !usage (!pct% of limit !limit), resetting statics',
-          array('!pct' => round($pct_memory*100),
-                '!usage' => format_size($usage),
-                '!limit' => format_size($this->memoryLimit))),
-        'warning');
-      // First, try resetting Drupal's static storage - this frequently releases
-      // plenty of memory to continue
-      drupal_static_reset();
-      $usage = memory_get_usage();
-      $pct_memory = $usage/$this->memoryLimit;
-      // Use a lower threshold - we don't want to be in a situation where we keep
-      // coming back here and trimming a tiny amount
-      if ($pct_memory > (.90 * $this->memoryThreshold)) {
-        $this->message->display(
-          $this->t('Memory usage is now !usage (!pct% of limit !limit), not enough reclaimed, starting new batch',
-            array('!pct' => round($pct_memory*100),
-                  '!usage' => format_size($usage),
-                  '!limit' => format_size($this->memoryLimit))),
-          'warning');
-        return TRUE;
-      }
-      else {
-        $this->message->display(
-          $this->t('Memory usage is now !usage (!pct% of limit !limit), reclaimed enough, continuing',
-            array('!pct' => round($pct_memory*100),
-                  '!usage' => format_size($usage),
-                  '!limit' => format_size($this->memoryLimit))),
-          'warning');
-        return FALSE;
-      }
-    }
-    else {
-      return FALSE;
-    }
-  }
-
-  /**
-   * Test whether we're approaching the PHP time limit.
-   *
-   * @return boolean
-   *  TRUE if the threshold is exceeded, FALSE if not.
-   */
-  protected function timeExceeded() {
-    if ($this->timeLimit == 0) {
-      return FALSE;
-    }
-    $time_elapsed = time() - REQUEST_TIME;
-    $pct_time = $time_elapsed / $this->timeLimit;
-    if ($pct_time > $this->timeThreshold) {
-      return TRUE;
-    }
-    else {
-      return FALSE;
-    }
-  }
-
-  /**
-   * Takes an Exception object and both saves and displays it, pulling additional
-   * information on the location triggering the exception.
-   *
-   * @param \Exception $exception
-   *  Object representing the exception.
-   * @param boolean $save
-   *  Whether to save the message in the migration's mapping table. Set to FALSE
-   *  in contexts where this doesn't make sense.
-   */
-  public function handleException($exception, $save = TRUE) {
-    $result = _drupal_decode_exception($exception);
-    $message = $result['!message'] . ' (' . $result['%file'] . ':' . $result['%line'] . ')';
-    if ($save) {
-      $this->saveMessage($message);
-    }
-    $this->message->display($message);
-  }
-
-  /**
-   * Translates a string to the current language or to a given language.
-   *
-   * See the t() documentation for details.
-   */
-  protected function t($string, array $args = array(), array $options = array()) {
-    return $this->translationManager()->translate($string, $args, $options);
-  }
-
-  /**
-   * Gets the translation manager.
-   *
-   * @return \Drupal\Core\StringTranslation\TranslationInterface
-   *   The translation manager.
-   */
-  protected function translationManager() {
-    if (!$this->translationManager) {
-      $this->translationManager = \Drupal::translation();
-    }
-    return $this->translationManager;
-  }
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/MigrateMessage.php b/core/modules/migrate/lib/Drupal/migrate/MigrateMessage.php
deleted file mode 100644
index d90297e..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/MigrateMessage.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\MigrateMessage.
- */
-
-namespace Drupal\migrate;
-
-/**
- * Defines a migrate message class.
- */
-class MigrateMessage implements MigrateMessageInterface {
-
-  /**
-   * Displays a migrate message.
-   *
-   * @param string $message
-   *   The message to display.
-   * @param string $type
-   *   The type of message, for example: status or warning.
-   */
-  function display($message, $type = 'status') {
-    drupal_set_message($message, $type);
-  }
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/MigrateMessageInterface.php b/core/modules/migrate/lib/Drupal/migrate/MigrateMessageInterface.php
deleted file mode 100644
index bcf3753..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/MigrateMessageInterface.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * @file
- * Contains
- */
-
-namespace Drupal\migrate;
-
-
-interface MigrateMessageInterface {
-
-  /**
-   * @param $message
-   * @param string $type
-   *
-   * @return mixed
-   */
-  function display($message, $type = 'status');
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateDestinationInterface.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateDestinationInterface.php
deleted file mode 100644
index 97ede97..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateDestinationInterface.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\MigrateDestinationInterface.
- */
-
-namespace Drupal\migrate\Plugin;
-
-use Drupal\Component\Plugin\PluginInspectionInterface;
-use Drupal\migrate\Entity\Migration;
-use Drupal\migrate\Row;
-
-/**
- * Destinations are responsible for persisting source data into the destination
- * Drupal.
- */
-interface MigrateDestinationInterface extends PluginInspectionInterface {
-
-  /**
-   * To support MigrateIdMap maps, derived destination classes should return
-   * schema field definition(s) corresponding to the primary key of the destination
-   * being implemented. These are used to construct the destination key fields
-   * of the map table for a migration using this destination.
-   */
-  public function getIdsSchema();
-
-  /**
-   * Derived classes must implement fields(), returning a list of available
-   * destination fields.
-   *
-   * @todo Review the cases where we need the Migration parameter, can we avoid that?
-   *
-   * @param Migration $migration
-   *   Optionally, the migration containing this destination.
-   * @return array
-   *  - Keys: machine names of the fields
-   *  - Values: Human-friendly descriptions of the fields.
-   */
-  public function fields(Migration $migration = NULL);
-
-  /**
-   * Derived classes may implement preImport() and/or postImport(), to do any
-   * processing they need done before or after looping over all source rows.
-   * Similarly, preRollback() or postRollback() may be implemented.
-   */
-  public function preImport();
-  public function preRollback();
-  public function postImport();
-  public function postRollback();
-
-  /**
-   * Derived classes must implement import(), to construct one new object (pre-populated
-   * using ID mappings in the Migration).
-   */
-  public function import(Row $row);
-
-  /**
-   * Delete the specified IDs from the target Drupal.
-   * @param array $destination_identifiers
-   */
-  public function rollbackMultiple(array $destination_identifiers);
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateIdMapInterface.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateIdMapInterface.php
deleted file mode 100644
index 53c6ff5..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateIdMapInterface.php
+++ /dev/null
@@ -1,241 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\MigrateIdMapInterface.
- */
-
-namespace Drupal\migrate\Plugin;
-
-use Drupal\Component\Plugin\PluginInspectionInterface;
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\MigrateMessageInterface;
-use Drupal\migrate\Row;
-
-/**
- * Defines an interface for migrate ID mappings.
- *
- * Migrate ID mappings maintain a relation between source ID and destination ID
- * for audit and rollback purposes.
- */
-interface MigrateIdMapInterface extends PluginInspectionInterface {
-
-  /**
-   * Codes reflecting the current status of a map row.
-   */
-  const STATUS_IMPORTED = 0;
-  const STATUS_NEEDS_UPDATE = 1;
-  const STATUS_IGNORED = 2;
-  const STATUS_FAILED = 3;
-
-  /**
-   * Codes reflecting how to handle the destination item on rollback.
-   */
-  const ROLLBACK_DELETE = 0;
-  const ROLLBACK_PRESERVE = 1;
-
-  /**
-   * Saves a mapping from the source identifiers to the destination identifiers.
-   *
-   * Called upon import of one row, we record a mapping from the source ID
-   * to the destination ID. Also may be called, setting the third parameter to
-   * NEEDS_UPDATE, to signal an existing record should be re-migrated.
-   *
-   * @param \Drupal\migrate\Row $row
-   *   The raw source data. We use the ID map derived from the source object
-   *   to get the source identifier values.
-   * @param array $destination_id_values
-   *   An array of destination identifier values.
-   * @param int $status
-   *   Status of the source row in the map.
-   * @param int $rollback_action
-   *   How to handle the destination object on rollback.
-   */
-  public function saveIdMapping(Row $row, array $destination_id_values, $status = self::STATUS_IMPORTED, $rollback_action = self::ROLLBACK_DELETE);
-
-  /**
-   * Saves a message related to a source record in the migration message table.
-   *
-   * @param array $source_id_values
-   *   The source identifier values of the record in error.
-   * @param string $message
-   *   The message to record.
-   * @param int $level
-   *   Optional message severity (defaults to MESSAGE_ERROR).
-   */
-  public function saveMessage(array $source_id_values, $message, $level = MigrationInterface::MESSAGE_ERROR);
-
-  /**
-   * Prepares to run a full update.
-   *
-   * Prepares this migration to run as an update - that is, in addition to
-   * unmigrated content (source records not in the map table) being imported,
-   * previously-migrated content will also be updated in place by marking all
-   * previously-imported content as ready to be re-imported.
-   */
-  public function prepareUpdate();
-
-  /**
-   * Returns the number of processed items in the map.
-   *
-   * @return int
-   *   The count of records in the map table.
-   */
-  public function processedCount();
-
-  /**
-   * Returns the number of imported items in the map.
-   *
-   * @return int
-   *   The number of imported items.
-   */
-  public function importedCount();
-
-
-  /**
-   * Returns a count of items which are marked as needing update.
-   *
-   * @return int
-   *   The number of items which need updating.
-   */
-  public function updateCount();
-
-  /**
-   * Returns the number of items that failed to import.
-   *
-   * @return int
-   *   The number of items that errored out.
-   */
-  public function errorCount();
-
-  /**
-   * Returns the number of messages saved.
-   *
-   * @return int
-   *   The number of messages.
-   */
-  public function messageCount();
-
-  /**
-   * Deletes the map and message entries for a given source record.
-   *
-   * @param array $source_id_values
-   *   The source identifier values of the record to delete.
-   * @param bool $messages_only
-   *   TRUE to only delete the migrate messages.
-   */
-  public function delete(array $source_id_values, $messages_only = FALSE);
-
-  /**
-   * Deletes the map and message table entries for a given destination row.
-   *
-   * @param array $destination_id_values
-   *   The destination identifier values we should do the deletes for.
-   */
-  public function deleteDestination(array $destination_id_values);
-
-  /**
-   * Deletes the map and message entries for a set of given source records.
-   *
-   * @param array $source_id_values
-   *   The identifier values of the sources we should do the deletes for. Each
-   *   array member is an array of identifier values for one source row.
-   */
-  public function deleteBulk(array $source_id_values);
-
-  /**
-   * Clears all messages from the map.
-   */
-  public function clearMessages();
-
-  /**
-   * Retrieves a row from the map table based on source identifier values.
-   *
-   * @param array $source_id_values
-   *   The source identifier values of the record to retrieve.
-   *
-   * @return array
-   *   The raw row data as an associative array.
-   */
-  public function getRowBySource(array $source_id_values);
-
-  /**
-   * Retrieves a row by the destination identifiers.
-   *
-   * @param array $destination_id_values
-   *   The destination identifier values of the record to retrieve.
-   *
-   * @return array
-   *   The row(s) of data.
-   */
-  public function getRowByDestination(array $destination_id_values);
-
-  /**
-   * Retrieves an array of map rows marked as needing update.
-   *
-   * @param int $count
-   *   The maximum number of rows to return.
-   *
-   * @return array
-   *   Array of map row objects that need updating.
-   */
-  public function getRowsNeedingUpdate($count);
-
-  /**
-   * Looks up the source identifier.
-   *
-   * Given a (possibly multi-field) destination identifier value, return the
-   * (possibly multi-field) source identifier value mapped to it.
-   *
-   * @param array $destination_id_values
-   *   The destination identifier values of the record.
-   *
-   * @return array
-   *   The source identifier values of the record, or NULL on failure.
-   */
-  public function lookupSourceID(array $destination_id_values);
-
-  /**
-   * Looks up the destination identifier.
-   *
-   * Given a (possibly multi-field) source identifier value, return the
-   * (possibly multi-field) destination identifier value it is mapped to.
-   *
-   * @param array $destination_id_values
-   *   The source identifier values of the record.
-   *
-   * @return array
-   *   The destination identifier values of the record, or NULL on failure.
-   */
-  public function lookupDestinationID(array $source_id_values);
-
-  /**
-   * Removes any persistent storage used by this map.
-   *
-   * For example, remove the map and message tables.
-   */
-  public function destroy();
-
-  /**
-   * Gets the qualified map table.
-   *
-   * @todo Remove this as this is SQL only and so doesn't belong to the interface.
-   */
-  public function getQualifiedMapTable();
-
-  /**
-   * Sets the migrate message.
-   *
-   * @param \Drupal\migrate\MigrateMessageInterface $message
-   *   The message to display.
-   */
-  public function setMessage(MigrateMessageInterface $message);
-
-  /**
-   * Sets a specified record to be updated, if it exists.
-   *
-   * @param $source_id_values
-   *   The source identifier values of the record.
-   */
-  public function setUpdate(array $source_id_values);
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/MigratePluginManager.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/MigratePluginManager.php
deleted file mode 100644
index a67b86e..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/MigratePluginManager.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\MigraterPluginManager.
- */
-
-namespace Drupal\migrate\Plugin;
-
-use Drupal\Component\Plugin\Factory\DefaultFactory;
-use Drupal\Core\Cache\CacheBackendInterface;
-use Drupal\Core\Extension\ModuleHandlerInterface;
-use Drupal\Core\Language\LanguageManager;
-use Drupal\Core\Plugin\DefaultPluginManager;
-use Drupal\migrate\Entity\MigrationInterface;
-
-/**
- * Manages migrate sources and steps.
- *
- * @see hook_migrate_info_alter()
- */
-class MigratePluginManager extends DefaultPluginManager {
-
-  /**
-   * Constructs a MigraterPluginManager object.
-   *
-   * @param string $type
-   *   The type of the plugin: row, source, process, destination, entity_field, id_map.
-   * @param \Traversable $namespaces
-   *   An object that implements \Traversable which contains the root paths
-   *   keyed by the corresponding namespace to look for plugin implementations.
-   * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
-   *   Cache backend instance to use.
-   * @param \Drupal\Core\Language\LanguageManager $language_manager
-   *   The language manager.
-   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
-   *   The module handler to invoke the alter hook with.
-   */
-  public function __construct($type, \Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ModuleHandlerInterface $module_handler) {
-    parent::__construct("Plugin/migrate/$type", $namespaces, 'Drupal\Component\Annotation\PluginID');
-    $this->alterInfo($module_handler, 'migrate_' . $type . '_info');
-    $this->setCacheBackend($cache_backend, $language_manager, 'migrate_plugins_' . $type);
-  }
-
-  /**
-   * {@inheritdoc}
-   *
-   * A specific createInstance method is necessary to pass the migration on.
-   */
-  public function createInstance($plugin_id, array $configuration = array(), MigrationInterface $migration = NULL) {
-    $plugin_definition = $this->discovery->getDefinition($plugin_id);
-    $plugin_class = DefaultFactory::getPluginClass($plugin_id, $plugin_definition);
-    // If the plugin provides a factory method, pass the container to it.
-    if (is_subclass_of($plugin_class, 'Drupal\Core\Plugin\ContainerFactoryPluginInterface')) {
-      return $plugin_class::create(\Drupal::getContainer(), $configuration, $plugin_id, $plugin_definition, $migration);
-    }
-    return new $plugin_class($configuration, $plugin_id, $plugin_definition, $migration);
-  }
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateProcessInterface.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateProcessInterface.php
deleted file mode 100644
index 74da652..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateProcessInterface.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\MigrateProcessInterface.
- */
-
-namespace Drupal\migrate\Plugin;
-
-use Drupal\Component\Plugin\PluginInspectionInterface;
-use Drupal\migrate\MigrateExecutable;
-use Drupal\migrate\Row;
-
-/**
- * An interface for migrate processes.
- */
-interface MigrateProcessInterface extends PluginInspectionInterface {
-
-  /**
-   * Performs the associated process.
-   *
-   * @param $value
-   *   The value to be transformed.
-   * @param \Drupal\migrate\MigrateExecutable $migrate_executable
-   *   The migration in which this process is being executed.
-   * @param \Drupal\migrate\Row $row
-   *   The row from the source to process. Normally, just transforming the
-   *   value is adequate but very rarely you might need to change two columns
-   *   at the same time or something like that.
-   * @param string $destination_property
-   *   The destination property currently worked on. This is only used
-   *   together with the $row above.
-   */
-  public function transform($value, MigrateExecutable $migrate_executable, Row $row, $destination_property);
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateSourceInterface.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateSourceInterface.php
deleted file mode 100644
index 9b9b982..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/MigrateSourceInterface.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\MigrateSourceInterface.
- */
-
-namespace Drupal\migrate\Plugin;
-use Drupal\Component\Plugin\PluginInspectionInterface;
-use Drupal\migrate\Row;
-
-/**
- * Defines an interface for migrate sources.
- */
-interface MigrateSourceInterface extends \Countable, PluginInspectionInterface {
-
-  /**
-   * Returns available fields on the source.
-   *
-   * @return array
-   *   Available fields in the source, keys are the field machine names as used
-   *   in field mappings, values are descriptions.
-   */
-  public function fields();
-
-
-  /**
-   * Returns the iterator that will yield the row arrays to be processed.
-   *
-   * @return \Iterator
-   */
-  public function getIterator();
-
-  /**
-   * Add additional data to the row.
-   *
-   * @param \Drupal\Migrate\Row $row
-   *
-   * @return bool
-   *   FALSE if this row needs to be skipped.
-   */
-  public function prepareRow(Row $row);
-
-  public function __toString();
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/RequirementsInterface.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/RequirementsInterface.php
deleted file mode 100644
index ad45be5..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/RequirementsInterface.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\RequirementsInterface.
- */
-
-namespace Drupal\migrate\Plugin;
-
-/**
- * An interface to check for a migrate plugin requirements.
- */
-interface RequirementsInterface {
-
-  /**
-   * Checks if requirements for this plugin are OK.
-   *
-   * @return boolean
-   *   TRUE if it is possible to use the plugin, FALSE if not.
-   */
-  public function checkRequirements();
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/Config.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/Config.php
deleted file mode 100644
index 36ead84..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/Config.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-/**
- * @file
- *   Provides Configuration Management destination plugin.
- */
-
-namespace Drupal\migrate\Plugin\migrate\destination;
-
-use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
-use Drupal\migrate\Entity\Migration;
-use Drupal\migrate\MigrateException;
-use Drupal\migrate\Row;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Drupal\Core\Config\Config as ConfigObject;
-
-/**
- * Persist data to the config system.
- *
- * @PluginID("d8_config")
- */
-class Config extends DestinationBase implements ContainerFactoryPluginInterface {
-
-  /**
-   * The config object.
-   *
-   * @var \Drupal\Core\Config\Config
-   */
-  protected $config;
-
-  /**
-   * @param array $configuration
-   * @param string $plugin_id
-   * @param array $plugin_definition
-   * @param ConfigObject $config
-   */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, ConfigObject $config) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition);
-    $this->config = $config;
-  }
-
-  public static function create(ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) {
-    return new static(
-      $configuration,
-      $plugin_id,
-      $plugin_definition,
-      $container->get('config.factory')->get($configuration['config_name'])
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function import(Row $row) {
-    $this->config
-      ->setData($row->getDestination())
-      ->save();
-  }
-
-  /**
-   * @param array $destination_keys
-   *
-   * @throws \Drupal\migrate\MigrateException
-   */
-  public function rollbackMultiple(array $destination_keys) {
-    throw new MigrateException('Configuration can not be rolled back');
-  }
-
-  /**
-   * Derived classes must implement fields(), returning a list of available
-   * destination fields.
-   *
-   * @todo Review the cases where we need the Migration parameter, can we avoid that?
-   *
-   * @param Migration $migration
-   *   Optionally, the migration containing this destination.
-   * @return array
-   *  - Keys: machine names of the fields
-   *  - Values: Human-friendly descriptions of the fields.
-   */
-  public function fields(Migration $migration = NULL) {
-    // @todo Dynamically fetch fields using Config Schema API.
-  }
-
-  public function getIdsSchema() {
-    return array($this->config->getName() => array());
-  }
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/DestinationBase.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/DestinationBase.php
deleted file mode 100644
index 7cdf11b..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/destination/DestinationBase.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\migrate\destination\DestinationBase.
- */
-
-
-namespace Drupal\migrate\Plugin\migrate\destination;
-
-use Drupal\Core\Plugin\PluginBase;
-use Drupal\migrate\Plugin\MigrateDestinationInterface;
-
-abstract class DestinationBase extends PluginBase implements MigrateDestinationInterface {
-
-  /**
-   * Modify the Row before it is imported.
-   */
-  public function preImport() {
-    // TODO: Implement preImport() method.
-  }
-
-  /**
-   * Modify the Row before it is rolled back.
-   */
-  public function preRollback() {
-    // TODO: Implement preRollback() method.
-  }
-
-  public function postImport() {
-    // TODO: Implement postImport() method.
-  }
-
-  public function postRollback() {
-    // TODO: Implement postRollback() method.
-  }
-
-  public function rollbackMultiple(array $destination_identifiers) {
-    // TODO: Implement rollbackMultiple() method.
-  }
-
-  public function getCreated() {
-    // TODO: Implement getCreated() method.
-  }
-
-  public function getUpdated() {
-    // TODO: Implement getUpdated() method.
-  }
-
-  public function resetStats() {
-    // TODO: Implement resetStats() method.
-  }
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/id_map/Sql.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/id_map/Sql.php
deleted file mode 100644
index 02ad801..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/id_map/Sql.php
+++ /dev/null
@@ -1,705 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\migrate\id_map\Sql.
- */
-
-namespace Drupal\migrate\Plugin\migrate\id_map;
-
-use Drupal\Component\Utility\Unicode;
-use Drupal\Core\Plugin\PluginBase;
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\MigrateException;
-use Drupal\migrate\MigrateMessageInterface;
-use Drupal\migrate\Plugin\migrate\source\SqlBase;
-use Drupal\migrate\Plugin\MigrateIdMapInterface;
-use Drupal\migrate\Row;
-
-/**
- * Defines the sql based ID map implementation.
- *
- * It creates one map and one message table per migration entity to store the
- * relevant information.
- *
- * @PluginID("sql")
- */
-class Sql extends PluginBase implements MigrateIdMapInterface {
-
-  /**
-   * Names of tables created for tracking the migration.
-   *
-   * @var string
-   */
-  protected $mapTable, $messageTable;
-
-  /**
-   * The migrate message.
-   *
-   * @var \Drupal\migrate\MigrateMessageInterface
-   */
-  protected $message;
-
-  /**
-   * The database connection for the map/message tables on the destination.
-   *
-   * @var \Drupal\Core\Database\Connection
-   */
-  protected $database;
-
-  /**
-   * @var \Drupal\Core\Database\Query\SelectInterface
-   */
-  protected $query;
-
-  /**
-   * The migration being done.
-   *
-   * @var \Drupal\migrate\Entity\MigrationInterface
-   */
-  protected $migration;
-
-  /**
-   * The source ID fields.
-   *
-   * @var array
-   */
-  protected $sourceIdFields;
-
-  /**
-   * The destination ID fields.
-   *
-   * @var array
-   */
-  protected $destinationIdFields;
-
-  /**
-   * Stores whether the the tables (map/message) already exist.
-   *
-   * This is determined just once per request/instance of the class.
-   *
-   * @var boolean
-   */
-  protected $ensured;
-
-  /**
-   * The result.
-   *
-   * @var null
-   */
-  protected $result = NULL;
-
-  /**
-   * The current row.
-   *
-   * @var null
-   */
-  protected $currentRow = NULL;
-
-  /**
-   * The current key.
-   *
-   * @var array
-   */
-  protected $currentKey = array();
-
-  /**
-   * Constructs an SQL object.
-   *
-   * Sets up the tables and builds the maps,
-   *
-   * @param array $configuration
-   *   The configuration.
-   * @param string $plugin_id
-   *   The plugin ID for the migration process to do.
-   * @param array $plugin_definition
-   *   The configuration for the plugin.
-   * @param \Drupal\migrate\Entity\MigrationInterface $migration
-   *   The migration to do.
-   */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition);
-
-    $this->migration = $migration;
-    $machine_name = $migration->id();
-
-    // Default generated table names, limited to 63 characters.
-    $prefixLength = strlen($this->getDatabase()->tablePrefix()) ;
-    $this->mapTable = 'migrate_map_' . Unicode::strtolower($machine_name);
-    $this->mapTable = Unicode::substr($this->mapTable, 0, 63 - $prefixLength);
-    $this->messageTable = 'migrate_message_' . Unicode::strtolower($machine_name);
-    $this->messageTable = Unicode::substr($this->messageTable, 0, 63 - $prefixLength);
-    $this->sourceIds = $migration->get('sourceIds');
-    $this->destinationIds = $migration->get('destinationIds');
-
-    // Build the source and destination identifier maps.
-    $this->sourceIdFields = array();
-    $count = 1;
-    foreach ($this->sourceIds as $field => $schema) {
-      $this->sourceIdFields[$field] = 'sourceid' . $count++;
-    }
-    $this->destinationIdFields = array();
-    $count = 1;
-    foreach ($this->destinationIds as $field => $schema) {
-      $this->destinationIdFields[$field] = 'destid' . $count++;
-    }
-    $this->ensureTables();
-  }
-
-  /**
-   * Qualifying the map table name with the database name makes cross-db joins
-   * possible. Note that, because prefixes are applied after we do this (i.e.,
-   * it will prefix the string we return), we do not qualify the table if it has
-   * a prefix. This will work fine when the source data is in the default
-   * (prefixed) database (in particular, for simpletest), but not if the primary
-   * query is in an external database.
-   *
-   * @return string
-   */
-  public function getQualifiedMapTable() {
-    $options = $this->getDatabase()->getConnectionOptions();
-    $prefix = $this->getDatabase()->tablePrefix($this->mapTable);
-    if ($prefix) {
-      return $this->mapTable;
-    }
-    else {
-      return $options['database'] . '.' . $this->mapTable;
-    }
-  }
-
-  /**
-   * Gets the database connection.
-   *
-   * @return \Drupal\Core\Database\Connection
-   */
-  protected function getDatabase() {
-    if (!isset($this->database)) {
-      $this->database = SqlBase::getDatabaseConnection($this->migration->id(), $this->configuration);
-    }
-    return $this->database;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setMessage(MigrateMessageInterface $message) {
-    $this->message = $message;
-  }
-
-  /**
-   * Create the map and message tables if they don't already exist.
-   */
-  protected function ensureTables() {
-    if (!$this->ensured) {
-      if (!$this->getDatabase()->schema()->tableExists($this->mapTable)) {
-        // Generate appropriate schema info for the map and message tables,
-        // and map from the source field names to the map/msg field names.
-        $count = 1;
-        $source_id_schema = array();
-        $pks = array();
-        foreach ($this->sourceIds as $field_schema) {
-          $mapkey = 'sourceid' . $count++;
-          $source_id_schema[$mapkey] = $field_schema;
-          $pks[] = $mapkey;
-        }
-
-        $fields = $source_id_schema;
-
-        // Add destination identifiers to map table.
-        // TODO: How do we discover the destination schema?
-        $count = 1;
-        foreach ($this->destinationIds as $field_schema) {
-          // Allow dest identifier fields to be NULL (for IGNORED/FAILED
-          // cases).
-          $field_schema['not null'] = FALSE;
-          $mapkey = 'destid' . $count++;
-          $fields[$mapkey] = $field_schema;
-        }
-        $fields['needs_update'] = array(
-          'type' => 'int',
-          'size' => 'tiny',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-          'default' => MigrateIdMapInterface::STATUS_IMPORTED,
-          'description' => 'Indicates current status of the source row',
-        );
-        $fields['rollback_action'] = array(
-          'type' => 'int',
-          'size' => 'tiny',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-          'default' => MigrateIdMapInterface::ROLLBACK_DELETE,
-          'description' => 'Flag indicating what to do for this item on rollback',
-        );
-        $fields['last_imported'] = array(
-          'type' => 'int',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-          'default' => 0,
-          'description' => 'UNIX timestamp of the last time this row was imported',
-        );
-        $fields['hash'] = array(
-          'type' => 'varchar',
-          'length' => '32',
-          'not null' => FALSE,
-          'description' => 'Hash of source row data, for detecting changes',
-        );
-        $schema = array(
-          'description' => 'Mappings from source identifier value(s) to destination identifier value(s).',
-          'fields' => $fields,
-        );
-        if ($pks) {
-          $schema['primary key'] = $pks;
-        }
-        $this->getDatabase()->schema()->createTable($this->mapTable, $schema);
-
-        // Now do the message table.
-        $fields = array();
-        $fields['msgid'] = array(
-          'type' => 'serial',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-        );
-        $fields += $source_id_schema;
-
-        $fields['level'] = array(
-          'type' => 'int',
-          'unsigned' => TRUE,
-          'not null' => TRUE,
-          'default' => 1,
-        );
-        $fields['message'] = array(
-          'type' => 'text',
-          'size' => 'medium',
-          'not null' => TRUE,
-        );
-        $schema = array(
-          'description' => 'Messages generated during a migration process',
-          'fields' => $fields,
-          'primary key' => array('msgid'),
-        );
-        if ($pks) {
-          $schema['indexes']['sourcekey'] = $pks;
-        }
-        $this->getDatabase()->schema()->createTable($this->messageTable, $schema);
-      }
-      else {
-        // Add any missing columns to the map table.
-        if (!$this->getDatabase()->schema()->fieldExists($this->mapTable,
-                                                      'rollback_action')) {
-          $this->getDatabase()->schema()->addField($this->mapTable,
-                                                'rollback_action', array(
-            'type' => 'int',
-            'size' => 'tiny',
-            'unsigned' => TRUE,
-            'not null' => TRUE,
-            'default' => 0,
-            'description' => 'Flag indicating what to do for this item on rollback',
-          ));
-        }
-        if (!$this->getDatabase()->schema()->fieldExists($this->mapTable, 'hash')) {
-          $this->getDatabase()->schema()->addField($this->mapTable, 'hash', array(
-            'type' => 'varchar',
-            'length' => '32',
-            'not null' => FALSE,
-            'description' => 'Hash of source row data, for detecting changes',
-          ));
-        }
-      }
-      $this->ensured = TRUE;
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getRowBySource(array $source_id_value) {
-    $query = $this->getDatabase()->select($this->mapTable, 'map')
-              ->fields('map');
-    foreach ($this->sourceIdFields as $source_id) {
-      $query = $query->condition("map.$source_id", array_shift($source_id_value), '=');
-    }
-    $result = $query->execute();
-    return $result->fetchAssoc();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getRowByDestination(array $destination_id_values) {
-    $query = $this->getDatabase()->select($this->mapTable, 'map')
-              ->fields('map');
-    foreach ($this->destinationIdFields as $destination_id) {
-      $query = $query->condition("map.$destination_id", array_shift($destination_id_values), '=');
-    }
-    $result = $query->execute();
-    return $result->fetchAssoc();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getRowsNeedingUpdate($count) {
-    $rows = array();
-    $result = $this->getDatabase()->select($this->mapTable, 'map')
-                      ->fields('map')
-                      ->condition('needs_update', MigrateIdMapInterface::STATUS_NEEDS_UPDATE)
-                      ->range(0, $count)
-                      ->execute();
-    foreach ($result as $row) {
-      $rows[] = $row;
-    }
-    return $rows;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function lookupSourceID(array $destination_id) {
-    $query = $this->getDatabase()->select($this->mapTable, 'map')
-              ->fields('map', $this->sourceIdFields);
-    foreach ($this->destinationIdFields as $key_name) {
-      $query = $query->condition("map.$key_name", array_shift($destination_id), '=');
-    }
-    $result = $query->execute();
-    $source_id = $result->fetchAssoc();
-    return $source_id;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function lookupDestinationID(array $source_id) {
-    $query = $this->getDatabase()->select($this->mapTable, 'map')
-              ->fields('map', $this->destinationIdFields);
-    foreach ($this->sourceIdFields as $key_name) {
-      $query = $query->condition("map.$key_name", array_shift($source_id), '=');
-    }
-    $result = $query->execute();
-    $destination_id = $result->fetchAssoc();
-    return $destination_id;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function saveIdMapping(Row $row, array $destination_id_values, $needs_update = MigrateIdMapInterface::STATUS_IMPORTED, $rollback_action = MigrateIdMapInterface::ROLLBACK_DELETE) {
-    // Construct the source key.
-    $source_id_values = $row->getSourceIdValues();
-    // Construct the source key and initialize to empty variable keys.
-    $keys = array();
-    foreach ($this->sourceIdFields as $field_name => $key_name) {
-      // A NULL key value will fail.
-      if (!isset($source_id_values[$field_name])) {
-        $this->message->display(t(
-          'Could not save to map table due to NULL value for key field !field',
-          array('!field' => $field_name)));
-        return;
-      }
-      $keys[$key_name] = $source_id_values[$field_name];
-    }
-
-    $fields = array(
-      'needs_update' => (int) $needs_update,
-      'rollback_action' => (int) $rollback_action,
-      'hash' => $row->getHash(),
-    );
-    $count = 1;
-    foreach ($destination_id_values as $dest_id) {
-      $fields['destid' . $count++] = $dest_id;
-    }
-    if ($this->migration->get('trackLastImported')) {
-      $fields['last_imported'] = time();
-    }
-    if ($keys) {
-      $this->getDatabase()->merge($this->mapTable)
-        ->key($keys)
-        ->fields($fields)
-        ->execute();
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function saveMessage(array $source_id_values, $message, $level = MigrationInterface::MESSAGE_ERROR) {
-    $count = 1;
-    foreach ($source_id_values as $id_value) {
-      $fields['sourceid' . $count++] = $id_value;
-      // If any key value is empty, we can't save - print out and abort.
-      if (empty($id_value)) {
-        print($message);
-        return;
-      }
-    }
-    $fields['level'] = $level;
-    $fields['message'] = $message;
-    $this->getDatabase()->insert($this->messageTable)
-      ->fields($fields)
-      ->execute();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function prepareUpdate() {
-    $this->getDatabase()->update($this->mapTable)
-    ->fields(array('needs_update' => MigrateIdMapInterface::STATUS_NEEDS_UPDATE))
-    ->execute();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function processedCount() {
-    return $this->getDatabase()->select($this->mapTable)
-      ->countQuery()
-      ->execute()
-      ->fetchField();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function importedCount() {
-    return $this->getDatabase()->select($this->mapTable)
-      ->condition('needs_update', array(MigrateIdMapInterface::STATUS_IMPORTED, MigrateIdMapInterface::STATUS_NEEDS_UPDATE), 'IN')
-      ->countQuery()
-      ->execute()
-      ->fetchField();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function updateCount() {
-    return $this->countHelper(MigrateIdMapInterface::STATUS_NEEDS_UPDATE);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function errorCount() {
-    return $this->countHelper(MigrateIdMapInterface::STATUS_FAILED);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function messageCount() {
-    return $this->countHelper(NULL, $this->messageTable);
-  }
-
-  /**
-   * Counts records in a table.
-   *
-   * @param $status
-   *   An integer for the needs_update column.
-   * @param $table
-   *   The table to work
-   * @return int
-   *   The number of records.
-   */
-  protected function countHelper($status, $table = NULL) {
-    $query = $this->getDatabase()->select($table ?: $this->mapTable);
-    if (isset($status)) {
-      $query->condition('needs_update', $status);
-    }
-    return $query->countQuery()->execute()->fetchField();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function delete(array $source_id_values, $messages_only = FALSE) {
-    if (empty($source_id_values)) {
-      throw new MigrateException('Without source identifier values it is impossible to find the row to delete.');
-    }
-    if (!$messages_only) {
-      $map_query = $this->getDatabase()->delete($this->mapTable);
-    }
-    $message_query = $this->getDatabase()->delete($this->messageTable);
-    $count = 1;
-    foreach ($source_id_values as $id_value) {
-      if (!$messages_only) {
-        $map_query->condition('sourceid' . $count, $id_value);
-      }
-      $message_query->condition('sourceid' . $count, $id_value);
-      $count++;
-    }
-
-    if (!$messages_only) {
-      $map_query->execute();
-    }
-    $message_query->execute();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function deleteDestination(array $destination_id) {
-    $map_query = $this->getDatabase()->delete($this->mapTable);
-    $message_query = $this->getDatabase()->delete($this->messageTable);
-    $source_id = $this->lookupSourceID($destination_id);
-    if (!empty($source_id)) {
-      $count = 1;
-      foreach ($destination_id as $key_value) {
-        $map_query->condition('destid' . $count, $key_value);
-        $count++;
-      }
-      $map_query->execute();
-      $count = 1;
-      foreach ($source_id as $key_value) {
-        $message_query->condition('sourceid' . $count, $key_value);
-        $count++;
-      }
-      $message_query->execute();
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setUpdate(array $source_id) {
-    if (empty($source_ids)) {
-      throw new MigrateException('No source identifiers provided to update.');
-    }
-    $query = $this->getDatabase()
-      ->update($this->mapTable)
-      ->fields(array('needs_update' => MigrateIdMapInterface::STATUS_NEEDS_UPDATE));
-    $count = 1;
-    foreach ($source_id as $key_value) {
-      $query->condition('sourceid' . $count++, $key_value);
-    }
-    $query->execute();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function deleteBulk(array $source_id_values) {
-    // If we have a single-column key, we can shortcut it.
-    if (count($this->sourceIds) == 1) {
-      $sourceids = array();
-      foreach ($source_id_values as $source_id) {
-        $sourceids[] = $source_id;
-      }
-      $this->getDatabase()->delete($this->mapTable)
-        ->condition('sourceid1', $sourceids, 'IN')
-        ->execute();
-      $this->getDatabase()->delete($this->messageTable)
-        ->condition('sourceid1', $sourceids, 'IN')
-        ->execute();
-    }
-    else {
-      foreach ($source_id_values as $source_id) {
-        $map_query = $this->getDatabase()->delete($this->mapTable);
-        $message_query = $this->getDatabase()->delete($this->messageTable);
-        $count = 1;
-        foreach ($source_id as $key_value) {
-          $map_query->condition('sourceid' . $count, $key_value);
-          $message_query->condition('sourceid' . $count++, $key_value);
-        }
-        $map_query->execute();
-        $message_query->execute();
-      }
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function clearMessages() {
-    $this->getDatabase()->truncate($this->messageTable)->execute();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function destroy() {
-    $this->getDatabase()->schema()->dropTable($this->mapTable);
-    $this->getDatabase()->schema()->dropTable($this->messageTable);
-  }
-
-  /**
-   * Implementation of Iterator::rewind().
-   *
-   * This is called before beginning a foreach loop.
-   *
-   * @todo Support idlist, itemlimit.
-   */
-  public function rewind() {
-    $this->currentRow = NULL;
-    $fields = array();
-    foreach ($this->sourceIdFields as $field) {
-      $fields[] = $field;
-    }
-    foreach ($this->destinationIdFields as $field) {
-      $fields[] = $field;
-    }
-
-    // @todo Make this work.
-    /*
-    if (isset($this->options['itemlimit'])) {
-      $query = $query->range(0, $this->options['itemlimit']);
-    }
-    */
-    $this->result = $this->getDatabase()->select($this->mapTable, 'map')
-      ->fields('map', $fields)
-      ->execute();
-    $this->next();
-  }
-
-  /**
-   * Implementation of Iterator::current().
-   *
-   * This is called when entering a loop iteration, returning the current row.
-   */
-  public function current() {
-    return $this->currentRow;
-  }
-
-  /**
-   * Implementation of Iterator::key().
-   *
-   * This is called when entering a loop iteration, returning the key of the
-   * current row. It must be a scalar - we will serialize to fulfill the
-   * requirement, but using getCurrentKey() is preferable.
-   */
-  public function key() {
-    return serialize($this->currentKey);
-  }
-
-  /**
-   * Implementation of Iterator::next().
-   *
-   * This is called at the bottom of the loop implicitly, as well as explicitly
-   * from rewind().
-   */
-  public function next() {
-    $this->currentRow = $this->result->fetchObject();
-    $this->currentKey = array();
-    if (!is_object($this->currentRow)) {
-      $this->currentRow = NULL;
-    }
-    else {
-      foreach ($this->sourceIdFields as $map_field) {
-        $this->currentKey[$map_field] = $this->currentRow->$map_field;
-        // Leave only destination fields.
-        unset($this->currentRow->$map_field);
-      }
-    }
-  }
-
-  /**
-   * Implementation of Iterator::valid().
-   *
-   * This is called at the top of the loop, returning TRUE to process the loop
-   * and FALSE to terminate it.
-   */
-  public function valid() {
-    // @todo Check numProcessed against itemlimit.
-    return !is_null($this->currentRow);
-  }
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/process/DefaultValue.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/process/DefaultValue.php
deleted file mode 100644
index 580eed8..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/process/DefaultValue.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\migrate\process\DefaultValue.
- */
-
-namespace Drupal\migrate\Plugin\migrate\process;
-
-use Drupal\Core\Plugin\PluginBase;
-use Drupal\migrate\MigrateExecutable;
-use Drupal\migrate\Plugin\MigrateProcessInterface;
-use Drupal\migrate\Row;
-
-
-/**
- * This plugin sets missing values on the destination.
- *
- * @PluginId("default_value")
- */
-class DefaultValue extends PluginBase implements MigrateProcessInterface {
-
- /**
-   * {@inheritdoc}
-   */
-  public function transform($value, MigrateExecutable $migrate_executable, Row $row, $destination_property) {
-    return isset($value) ? $value : $this->configuration['default_value'];
-  }
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/process/Get.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/process/Get.php
deleted file mode 100644
index 6f2f51e..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/process/Get.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\migrate\process\CopyFromSource.
- */
-
-namespace Drupal\migrate\Plugin\migrate\process;
-
-use Drupal\Core\Plugin\PluginBase;
-use Drupal\migrate\MigrateExecutable;
-use Drupal\migrate\Plugin\MigrateProcessInterface;
-use Drupal\migrate\Row;
-
-/**
- * This plugin copies from the source to the destination.
- *
- * @PluginId("get")
- */
-class Get extends PluginBase implements MigrateProcessInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function transform($value, MigrateExecutable $migrate_executable, Row $row, $destination_property) {
-    $source = $this->configuration['source'];
-    $properties = is_string($source) ? array($source) : $source;
-    $return = array();
-    foreach ($properties as $property) {
-      if (empty($property)) {
-        $return[] = $value;
-      }
-      else {
-        $is_source = TRUE;
-        if ($property[0] == '@') {
-          $property = preg_replace_callback('/^(@?)((?:@@)*)([^@]|$)/', function ($matches) use (&$is_source) {
-            // If there are an odd number of @ in the beginning, it's a
-            // destination.
-            $is_source = empty($matches[1]);
-            // Remove the possible escaping and do not lose the terminating
-            // non-@ either.
-            return str_replace('@@', '@', $matches[2]) . $matches[3];
-          }, $property);
-        }
-        if ($is_source) {
-          $return[] = $row->getSourceProperty($property);
-        }
-        else {
-          $return[] = $row->getDestinationProperty($property);
-        }
-      }
-    }
-    return is_string($source) ? $return[0] : $return;
-  }
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/D6Variable.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/D6Variable.php
deleted file mode 100644
index 3160d53..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/D6Variable.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\migrate\source\d6\Variable.
- */
-
-namespace Drupal\migrate\Plugin\migrate\source;
-
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Plugin\migrate\source\d6\Drupal6SqlBase;
-
-/**
- * Drupal 6 variable source from database.
- *
- * @PluginID("drupal6_variable")
- */
-class D6Variable extends Drupal6SqlBase {
-
-  /**
-   * The variable names to fetch.
-   *
-   * @var array
-   */
-  protected $variables;
-
-  /**
-   * {@inheritdoc}
-   */
-  function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
-    $this->variables = $this->configuration['variables'];
-  }
-
-  protected function runQuery() {
-    return new \ArrayIterator(array(array_map('unserialize', $this->query()->execute()->fetchAllKeyed())));
-  }
-
-  public function count() {
-    return intval($this->query()->countQuery()->execute()->fetchField() > 0);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fields() {
-    return drupal_map_assoc($this->variables);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  function query() {
-    return $this->getDatabase()
-      ->select('variable', 'v')
-      ->fields('v', array('name', 'value'))
-      ->condition('name', $this->variables, 'IN');
-  }
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/SourcePluginBase.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/SourcePluginBase.php
deleted file mode 100644
index 78eb2fa..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/SourcePluginBase.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\migrate\source\SourcePluginBase.
- */
-
-namespace Drupal\migrate\Plugin\migrate\source;
-
-use Drupal\Core\Plugin\PluginBase;
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Plugin\MigrateSourceInterface;
-use Drupal\migrate\Row;
-
-abstract class SourcePluginBase extends PluginBase implements MigrateSourceInterface  {
-
-  /**
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface
-   */
-  protected $moduleHandler;
-
-  /**
-   * @var \Drupal\migrate\Entity\MigrationInterface
-   */
-  protected $migration;
-
-  /**
-   * {@inheritdoc}
-   */
-  function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition);
-    $this->migration = $migration;
-  }
-
-   /**
-   * @return \Drupal\Core\Extension\ModuleHandlerInterface
-   */
-  protected function getModuleHandler() {
-    if (!isset($this->moduleHandler)) {
-      $this->moduleHandler = \Drupal::moduleHandler();
-    }
-    return $this->moduleHandler;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function prepareRow(Row $row) {
-    $this->getModuleHandler()->invokeAll('migrate_prepare_row', $row, $this, $this->migration);
-    $this->getModuleHandler()->invokeAll('migrate_ '. $this->migration->id() . '_prepare_row', $row, $this, $this->migration);
-    return TRUE;
-  }
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/SqlBase.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/SqlBase.php
deleted file mode 100644
index 9a17436..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/SqlBase.php
+++ /dev/null
@@ -1,192 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\migrate\source\SqlBase.
- */
-
-namespace Drupal\migrate\Plugin\migrate\source;
-
-use Drupal\Core\Database\Database;
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Plugin\MigrateIdMapInterface;
-
-/**
- * Sources whose data may be fetched via DBTNG.
- */
-abstract class SqlBase extends SourcePluginBase {
-
-  /**
-   * @var \Drupal\Core\Database\Query\SelectInterface
-   */
-  protected $query;
-
-  /**
-   * @var \Drupal\migrate\Entity\MigrationInterface
-   */
-  protected $migration;
-
-  /**
-   * @var \Drupal\Core\Database\Connection
-   */
-  protected $database;
-
-  /**
-   * {@inheritdoc}
-   */
-  function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
-    $this->mapJoinable = TRUE;
-  }
-
-  /**
-   * @return \Drupal\Core\Database\Connection
-   */
-  function __toString() {
-    return (string) $this->query;
-  }
-
-  /**
-   * @return \Drupal\Core\Database\Connection
-   */
-  public function getDatabase() {
-    if  (!isset($this->database)) {
-      $this->database = static::getDatabaseConnection($this->migration->id(), $this->configuration);
-    }
-    return $this->database;
-  }
-
-  public static function getDatabaseConnection($id, array $configuration) {
-    if (isset($configuration['database'])) {
-      $key = 'migrate_' . $id;
-      Database::addConnectionInfo($key, 'default', $configuration['database']);
-    }
-    else {
-      $key = 'default';
-    }
-    return Database::getConnection('default', $key);
-  }
-
-  protected function select($table, $alias = NULL, array $options = array()) {
-    $options['fetch'] = \PDO::FETCH_ASSOC;
-    return $this->getDatabase()->select($table, $alias, $options);
-  }
-
-  /**
-   * Implementation of MigrateSource::performRewind().
-   *
-   * We could simply execute the query and be functionally correct, but
-   * we will take advantage of the PDO-based API to optimize the query up-front.
-   */
-  protected function runQuery() {
-    $this->query = clone $this->query();
-    $this->query->addTag('migrate');
-    $this->query->addTag('migrate_' . $this->migration->id());
-    $this->query->addMetaData('migration', $this->migration);
-    $highwaterProperty = $this->migration->get('highwaterProperty');
-
-    // Get the key values, for potential use in joining to the map table, or
-    // enforcing idlist.
-    $keys = array();
-    foreach ($this->migration->get('sourceIds') as $field_name => $field_schema) {
-      if (isset($field_schema['alias'])) {
-        $field_name = $field_schema['alias'] . '.' . $field_name;
-      }
-      $keys[] = $field_name;
-    }
-
-    // The rules for determining what conditions to add to the query are as
-    // follows (applying first applicable rule)
-    // 1. If idlist is provided, then only process items in that list (AND key
-    //    IN (idlist)). Only applicable with single-value keys.
-    if ($id_list = $this->migration->get('idlist')) {
-      $this->query->condition($keys[0], $id_list, 'IN');
-    }
-    else {
-      // 2. If the map is joinable, join it. We will want to accept all rows
-      //    which are either not in the map, or marked in the map as NEEDS_UPDATE.
-      //    Note that if highwater fields are in play, we want to accept all rows
-      //    above the highwater mark in addition to those selected by the map
-      //    conditions, so we need to OR them together (but AND with any existing
-      //    conditions in the query). So, ultimately the SQL condition will look
-      //    like (original conditions) AND (map IS NULL OR map needs update
-      //      OR above highwater).
-      $conditions = $this->query->orConditionGroup();
-      $condition_added = FALSE;
-      if ($this->mapJoinable) {
-        // Build the join to the map table. Because the source key could have
-        // multiple fields, we need to build things up.
-        $count = 1;
-        $map_join = '';
-        $delimiter = '';
-        foreach ($this->migration->get('sourceIds') as $field_name => $field_schema) {
-          if (isset($field_schema['alias'])) {
-            $field_name = $field_schema['alias'] . '.' . $field_name;
-          }
-          $map_join .= "$delimiter$field_name = map.sourceid" . $count++;
-          $delimiter = ' AND ';
-        }
-
-        $alias = $this->query->leftJoin($this->migration->getIdMap()->getQualifiedMapTable(), 'map', $map_join);
-        $conditions->isNull($alias . '.sourceid1');
-        $conditions->condition($alias . '.needs_update', MigrateIdMapInterface::STATUS_NEEDS_UPDATE);
-        $condition_added = TRUE;
-
-        // And as long as we have the map table, add its data to the row.
-        $n = count($this->migration->get('sourceIds'));
-        for ($count = 1; $count <= $n; $count++) {
-          $map_key = 'sourceid' . $count;
-          $this->query->addField($alias, $map_key, "migrate_map_$map_key");
-        }
-        $n = count($this->migration->get('destinationIds'));
-        for ($count = 1; $count <= $n; $count++) {
-          $map_key = 'destid' . $count++;
-          $this->query->addField($alias, $map_key, "migrate_map_$map_key");
-        }
-        $this->query->addField($alias, 'needs_update', 'migrate_map_needs_update');
-      }
-      // 3. If we are using highwater marks, also include rows above the mark.
-      //    But, include all rows if the highwater mark is not set.
-      if (isset($highwaterProperty['name']) && ($highwater = $this->migration->getHighwater()) !== '') {
-        if (isset($highwaterProperty['alias'])) {
-          $highwater = $highwaterProperty['alias'] . '.' . $highwaterProperty['name'];
-        }
-        else {
-          $highwater = $highwaterProperty['name'];
-        }
-        $conditions->condition($highwater, $highwater, '>');
-        $condition_added = TRUE;
-      }
-      if ($condition_added) {
-        $this->query->condition($conditions);
-      }
-    }
-
-    return new \IteratorIterator($this->query->execute());
-  }
-
-  /**
-   * @return \Drupal\Core\Database\Query\SelectInterface
-   */
-  abstract function query();
-
-  /**
-   * {@inheritdoc}
-   */
-  public function count() {
-    return $this->query()->countQuery()->execute()->fetchField();
-  }
-
-  /**
-   * Returns the iterator that will yield the row arrays to be processed.
-   *
-   * @return \Iterator
-   */
-  public function getIterator() {
-    if (!isset($this->iterator)) {
-      $this->iterator = $this->runQuery();
-    }
-    return $this->iterator;
-  }
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/d6/Drupal6SqlBase.php b/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/d6/Drupal6SqlBase.php
deleted file mode 100644
index 579d87a..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Plugin/migrate/source/d6/Drupal6SqlBase.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\migrate\source\d6\Drupal6SqlBase.
- */
-
-namespace Drupal\migrate\Plugin\migrate\source\d6;
-
-use Drupal\migrate\Plugin\migrate\source\SqlBase;
-
-/**
- * A base source class for Drupal 6 migrate sources.
- *
- * Mainly to let children retrieve information from the origin system in an
- * easier way.
- */
-abstract class Drupal6SqlBase extends SqlBase {
-
-  /**
-   * Retrieves all system data information from origin system.
-   *
-   * @return array
-   *   List of system table information keyed by type and name.
-   */
-  public function getSystemData() {
-    static $system_data;
-    if (isset($system_data)) {
-      return $system_data;
-    }
-    $results = $this->database
-      ->select('system', 's')
-      ->fields('s')
-      ->execute();
-    foreach ($results as $result) {
-      $system_data[$result['type']][$result['name']] = $result;
-    }
-    return $system_data;
-  }
-
-  /**
-   * Get a module schema_version value in the source installation.
-   *
-   * @param string $module
-   *   Name of module.
-   *
-   * @return mixed
-   *   The current module schema version on the origin system table or FALSE if
-   *   not found.
-   */
-  protected function getModuleSchemaVersion($module) {
-    $system_data = $this->getSystemData();
-    return isset($system_data['module'][$module]['schema_version']) ? $system_data['module'][$module]['schema_version'] : FALSE;
-  }
-
-  /**
-   * Check to see if a given module is enabled in the source installation.
-   *
-   * @param string $module
-   *   Name of module to check.
-   *
-   * @return bool
-   *   TRUE if module is enabled on the origin system, FALSE if not.
-   */
-  protected function moduleExists($module) {
-    return isset($system_data['module'][$module]['status']) ? (bool) $system_data['module'][$module]['status'] : FALSE;
-  }
-
-  protected function variableGet($name, $default) {
-    try {
-      $result = $this->database
-        ->query('SELECT value FROM {variable} WHERE name = :name', array(':name' => $name))
-        ->fetchField();
-    }
-    // The table might not exist.
-    catch (\Exception $e) {
-      $result = FALSE;
-    }
-    return $result !== FALSE ? unserialize($result) : $default;
-  }
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Row.php b/core/modules/migrate/lib/Drupal/migrate/Row.php
deleted file mode 100644
index 53ad14d..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Row.php
+++ /dev/null
@@ -1,264 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Row.
- */
-
-namespace Drupal\migrate;
-
-use Drupal\Component\Utility\NestedArray;
-use Drupal\migrate\Plugin\MigrateIdMapInterface;
-
-/**
- * Stores a row.
- */
-class Row {
-
-  /**
-   * The actual values of the source row.
-   *
-   * @var array
-   */
-  protected $source = array();
-
-  /**
-   * The source identifiers.
-   *
-   * @var array
-   */
-  protected $sourceIds = array();
-
-  /**
-   * The destination values.
-   *
-   * @var array
-   */
-  protected $destination = array();
-
-  /**
-   * The mapping between source and destination identifiers.
-   *
-   * @var array
-   */
-  protected $idMap = array(
-    'original_hash' => '',
-    'hash' => '',
-    'needs_update' => MigrateIdMapInterface::STATUS_NEEDS_UPDATE,
-  );
-
-  /**
-   * Whether the source has been frozen already.
-   *
-   * Once frozen the source can not be changed any more.
-   *
-   * @var bool
-   */
-  protected $frozen = FALSE;
-
-  /**
-   * Constructs a \Drupal\Migrate\Row object.
-   *
-   * @param array $values
-   *   An array of values to add as properties on the object.
-   * @param array $source_ids
-   *   An array containing the IDs of the source using the keys as the field
-   *   names.
-   *
-   * @throws \InvalidArgumentException
-   *   Thrown when a source ID property does not exist.
-   */
-  public function __construct(array $values, array $source_ids) {
-    $this->source = $values;
-    $this->sourceIds = $source_ids;
-    foreach (array_keys($source_ids) as $id) {
-      if (!$this->hasSourceProperty($id)) {
-        throw new \InvalidArgumentException("$id has no value");
-      }
-    }
-  }
-
-  /**
-   * Retrieves the values of the source identifiers.
-   *
-   * @return array
-   *   An array containing the values of the source identifiers.
-   */
-  public function getSourceIdValues() {
-    return array_intersect_key($this->source, $this->sourceIds);
-  }
-
-  /**
-   * Determines whether a source has a property.
-   *
-   * @param string $property
-   *   A property on the source.
-   *
-   * @return bool
-   *   TRUE if the source has property; FALSE otherwise.
-   */
-  public function hasSourceProperty($property) {
-    return isset($this->source[$property]) || array_key_exists($property, $this->source);
-  }
-
-  /**
-   * Retrieves a source property.
-   *
-   * @param string $property
-   *   A property on the source.
-   *
-   * @return mixed|null
-   *   The found returned property or NULL if not found.
-   */
-  public function getSourceProperty($property) {
-    if (isset($this->source[$property])) {
-      return $this->source[$property];
-    }
-  }
-
-  /**
-   * Returns the whole source array.
-   *
-   * @return array
-   *   An array of source plugins.
-   */
-  public function getSource() {
-    return $this->source;
-  }
-
-  /**
-   * Sets a source property.
-   *
-   * This can only be called from the source plugin.
-   *
-   * @param string $property
-   *   A property on the source.
-   * @param mixed $data
-   *   The property value to set on the source.
-   *
-   * @throws \Exception
-   */
-  public function setSourceProperty($property, $data) {
-    if ($this->frozen) {
-      throw new \Exception("The source is frozen and can't be changed any more");
-    }
-    else {
-      $this->source[$property] = $data;
-    }
-  }
-
-  /**
-   * Freezes the source.
-   */
-  public function freezeSource() {
-    $this->frozen = TRUE;
-  }
-
-  /**
-   * Tests if destination property exists.
-   *
-   * @param array|string $property
-   *   An array of properties on the destination.
-   *
-   * @return boolean
-   *   TRUE if the destination property exists.
-   */
-  public function hasDestinationProperty($property) {
-    return NestedArray::keyExists($this->destination, explode(':', $property));
-  }
-
-  /**
-   * Sets destination properties.
-   *
-   * @param string $property
-   *   The name of the destination property.
-   * @param mixed $value
-   *   The property value to set on the destination.
-   */
-  public function setDestinationProperty($property, $value) {
-    NestedArray::setValue($this->destination, explode(':', $property), $value, TRUE);
-  }
-
-  /**
-   * Returns the whole destination array.
-   *
-   * @return array
-   *   An array of destination values.
-   */
-  public function getDestination() {
-    return $this->destination;
-  }
-
-  /**
-   * Returns the value of a destination property.
-   *
-   * @param array|string $property
-   *   An array of properties on the destination.
-   *
-   * @return mixed
-   *  The destination value.
-   */
-  public function getDestinationProperty($property) {
-    return NestedArray::getValue($this->destination, explode(':', $property));
-  }
-
-  /**
-   * Sets the Migrate ID mappings.
-   *
-   * @param array $id_map
-   *   An array of mappings between source ID and destination ID.
-   */
-  public function setIdMap(array $id_map) {
-    $this->idMap = $id_map;
-  }
-
-  /**
-   * Retrieves the Migrate ID mappings.
-   *
-   * @return array
-   *   An array of mapping between source and destination identifiers.
-   */
-  public function getIdMap() {
-    return $this->idMap;
-  }
-
-  /**
-   * Recalculates the hash for the row.
-   */
-  public function rehash() {
-    $this->idMap['original_hash'] = $this->idMap['hash'];
-    $this->idMap['hash'] = hash('sha256', serialize($this->source));
-  }
-
-  /**
-   * Checks whether the row has changed compared to the original ID map.
-   *
-   * @return bool
-   *   TRUE if the row has changed, FALSE otherwise. If setIdMap() was not
-   *   called, this always returns FALSE.
-   */
-  public function changed() {
-    return $this->idMap['original_hash'] != $this->idMap['hash'];
-  }
-
-  /**
-   * Returns if this row needs an update.
-   *
-   * @return bool
-   *   TRUE if the row needs updating, FALSE otherwise.
-   */
-  public function needsUpdate() {
-    return $this->idMap['needs_update'] == MigrateIdMapInterface::STATUS_NEEDS_UPDATE;
-  }
-
-  /**
-   * Returns the hash for the source values..
-   *
-   * @return mixed
-   *   The hash of the source values.
-   */
-  public function getHash() {
-    return $this->idMap['hash'];
-  }
-
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Source.php b/core/modules/migrate/lib/Drupal/migrate/Source.php
deleted file mode 100644
index ebec104..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Source.php
+++ /dev/null
@@ -1,413 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Plugin\migrate\source\SourceBase.
- */
-
-namespace Drupal\migrate;
-
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Plugin\MigrateIdMapInterface;
-
-/**
- * Source is a caching / decision making wrapper around the source plugin.
- *
- * Derived classes are expected to define __toString(), returning a string
- * describing the source and significant options, i.e. the query.
- *
- * @see \Drupal\migrate\MigrateSourceInterface
- */
-class Source implements \Iterator, \Countable {
-
-  /**
-   * The current row from the quey
-   *
-   * @var \Drupal\Migrate\Row
-   */
-  protected $currentRow;
-
-  /**
-   * The primary key of the current row
-   *
-   * @var array
-   */
-  protected $currentIds;
-
-  /**
-   * Number of rows intentionally ignored (prepareRow() returned FALSE)
-   *
-   * @var int
-   */
-  protected $numIgnored = 0;
-
-  /**
-   * Number of rows we've at least looked at.
-   *
-   * @var int
-   */
-  protected $numProcessed = 0;
-
-  /**
-   * The highwater mark at the beginning of the import operation.
-   *
-   * @var
-   */
-  protected $originalHighwater = '';
-
-  /**
-   * List of source IDs to process.
-   *
-   * @var array
-   */
-  protected $idList = array();
-
-  /**
-   * Whether this instance should cache the source count.
-   *
-   * @var boolean
-   */
-  protected $cacheCounts = FALSE;
-
-  /**
-   * Key to use for caching counts.
-   *
-   * @var string
-   */
-  protected $cacheKey;
-
-  /**
-   * Whether this instance should not attempt to count the source.
-   *
-   * @var boolean
-   */
-  protected $skipCount = FALSE;
-
-  /**
-   * If TRUE, we will maintain hashed source rows to determine whether incoming
-   * data has changed.
-   *
-   * @var bool
-   */
-  protected $trackChanges = FALSE;
-
-  /**
-   * By default, next() will directly read the map row and add it to the data
-   * row. A source plugin implementation may do this itself (in particular, the
-   * SQL source can incorporate the map table into the query) - if so, it should
-   * set this TRUE so we don't duplicate the effort.
-   *
-   * @var bool
-   */
-  protected $mapRowAdded = FALSE;
-
-  /**
-   * @var array
-   */
-  protected $sourceIds;
-
-  /**
-   * @var \Drupal\Core\Cache\CacheBackendInterface
-   */
-  protected $cache;
-
-  /**
-   * @var \Drupal\migrate\Plugin\MigrateIdMapInterface
-   */
-  protected $idMap;
-
-  /**
-   * @var array
-   */
-  protected $highwaterProperty;
-
-  public function getCurrentIds() {
-    return $this->currentIds;
-  }
-
-  public function getIgnored() {
-    return $this->numIgnored;
-  }
-
-  public function getProcessed() {
-    return $this->numProcessed;
-  }
-
-  /**
-   * Reset numIgnored back to 0.
-   */
-  public function resetStats() {
-    $this->numIgnored = 0;
-  }
-
-  /**
-   * Return a count of available source records, from the cache if appropriate.
-   * Returns -1 if the source is not countable.
-   *
-   * @param boolean $refresh
-   * @return int
-   */
-  public function count($refresh = FALSE) {
-    if ($this->skipCount) {
-      return -1;
-    }
-    $source = $this->migration->getSourcePlugin();
-
-    if (!isset($this->cacheKey)) {
-      $this->cacheKey = hash('sha256', (string) $source);
-    }
-
-    // If a refresh is requested, or we're not caching counts, ask the derived
-    // class to get the count from the source.
-    if ($refresh || !$this->cacheCounts) {
-      $count = $source->count();
-      $this->cache->set($this->cacheKey, $count, 'cache');
-    }
-    else {
-      // Caching is in play, first try to retrieve a cached count.
-      $cache_object = $this->cache->get($this->cacheKey, 'cache');
-      if (is_object($cache_object)) {
-        // Success
-        $count = $cache_object->data;
-      }
-      else {
-        // No cached count, ask the derived class to count 'em up, and cache
-        // the result
-        $count = $source->count();
-        $this->cache->set($this->cacheKey, $count, 'cache');
-      }
-    }
-    return $count;
-  }
-
-  /**
-   * Class constructor.
-   *
-   * @param \Drupal\migrate\Entity\MigrationInterface $migration
-   * @param \Drupal\migrate\MigrateExecutable $migrate_executable
-   */
-  function __construct(MigrationInterface $migration, MigrateExecutable $migrate_executable) {
-    $this->migration = $migration;
-    $this->migrateExecutable = $migrate_executable;
-    $configuration = $migration->get('source');
-    if (!empty($configuration['cache_counts'])) {
-      $this->cacheCounts = TRUE;
-    }
-    if (!empty($configuration['skip_count'])) {
-      $this->skipCount = TRUE;
-    }
-    if (!empty($configuration['cache_key'])) {
-      $this->cacheKey = $configuration['cache_key'];
-    }
-    if (!empty($configuration['track_changes'])) {
-      $this->trackChanges = $configuration['track_changes'];
-    }
-  }
-
-  /**
-   * @return \Drupal\Core\Cache\CacheBackendInterface
-   */
-  protected function getCache() {
-    if (!isset($this->cache)) {
-      $this->cache = \Drupal::cache('migrate');
-    }
-    return $this->cache;
-  }
-
-  /**
-   * @return \Iterator
-   */
-  protected function getIterator() {
-    if (!isset($this->iterator)) {
-      $this->iterator = $this->migration->getSourcePlugin()->getIterator();
-    }
-    return $this->iterator;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function current() {
-    return $this->currentRow;
-  }
-
-  /**
-   * Implementation of Iterator::key - called when entering a loop iteration, returning
-   * the key of the current row. It must be a scalar - we will serialize
-   * to fulfill the requirement, but using getCurrentIds() is preferable.
-   */
-  public function key() {
-    return serialize($this->currentIds);
-  }
-
-  /**
-   * Implementation of Iterator::valid() - called at the top of the loop, returning
-   * TRUE to process the loop and FALSE to terminate it
-   */
-  public function valid() {
-    return isset($this->currentRow);
-  }
-
-  /**
-   * Implementation of Iterator::rewind() - subclasses of MigrateSource should
-   * implement performRewind() to do any class-specific setup for iterating
-   * source records.
-   */
-  public function rewind() {
-    $this->idMap = $this->migration->getIdMap();
-    $this->numProcessed = 0;
-    $this->numIgnored = 0;
-    $this->originalHighwater = $this->migration->getHighwater();
-    $this->highwaterProperty = $this->migration->get('highwaterProperty');
-    if ($id_list = $this->migration->get('idlist')) {
-      $this->idList = $id_list;
-    }
-    $this->getIterator()->rewind();
-    $this->next();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function next() {
-    $this->currentIds = NULL;
-    $this->currentRow = NULL;
-
-    while ($this->getIterator()->valid()) {
-      $row_data = $this->getIterator()->current();
-      $this->getIterator()->next();
-      $row = new Row($row_data, $this->migration->get('sourceIds'), $this->migration->get('destinationIds'));
-
-      // Populate the source key for this row
-      $this->currentIds = $row->getSourceIdValues();
-
-      // Pick up the existing map row, if any, unless getNextRow() did it.
-      if (!$this->mapRowAdded && ($id_map = $this->idMap->getRowBySource($this->currentIds))) {
-        $row->setIdMap($id_map);
-      }
-
-      // First, determine if this row should be passed to prepareRow(), or
-      // skipped entirely. The rules are:
-      // 1. If there's an explicit idlist, that's all we care about (ignore
-      //    highwaters and map rows).
-      $prepared = FALSE;
-      if (!empty($this->idList)) {
-        if (in_array(reset($this->currentIds), $this->idList)) {
-          // In the list, fall through.
-        }
-        else {
-          // Not in the list, skip it
-          continue;
-        }
-      }
-      // 2. If the row is not in the map (we have never tried to import it
-      //    before), we always want to try it.
-      elseif (!$row->getIdMap()) {
-        // Fall through
-      }
-      // 3. If the row is marked as needing update, pass it.
-      elseif ($row->needsUpdate()) {
-        // Fall through
-      }
-      // 4. At this point, we have a row which has previously been imported and
-      //    not marked for update. If we're not using highwater marks, then we
-      //    will not take this row. Except, if we're looking for changes in the
-      //    data, we need to go through prepareRow() before we can decide to
-      //    skip it.
-      elseif (!empty($highwater['field'])) {
-        if ($this->trackChanges) {
-          if ($this->prepareRow($row) !== FALSE) {
-            if ($row->changed()) {
-              // This is a keeper
-              $this->currentRow = $row;
-              break;
-            }
-            else {
-              // No change, skip it.
-              continue;
-            }
-          }
-          else {
-            // prepareRow() told us to skip it.
-            continue;
-          }
-        }
-        else {
-          // No highwater and not tracking changes, skip.
-          continue;
-        }
-      }
-      // 5. The initial highwater mark, before anything is migrated, is ''. We
-      //    want to make sure we don't mistakenly skip rows with a highwater
-      //    field value of 0, so explicitly handle '' here.
-      elseif ($this->originalHighwater === '') {
-        // Fall through
-      }
-      // 6. So, we are using highwater marks. Take the row if its highwater
-      //    field value is greater than the saved mark, otherwise skip it.
-      else {
-        // Call prepareRow() here, in case the highwaterField needs preparation
-        if ($this->prepareRow($row) !== FALSE) {
-          if ($row->getSourceProperty($this->highwaterProperty['name']) > $this->originalHighwater) {
-            $this->currentRow = $row;
-            break;
-          }
-          else {
-            // Skip
-            continue;
-          }
-        }
-        $prepared = TRUE;
-      }
-
-      // Allow the Migration to prepare this row. prepareRow() can return boolean
-      // FALSE to ignore this row.
-      if (!$prepared) {
-        if ($this->prepareRow($row) !== FALSE) {
-          // Finally, we've got a keeper.
-          $this->currentRow = $row;
-          break;
-        }
-        else {
-          $this->currentRow = NULL;
-        }
-      }
-    }
-    if ($this->currentRow) {
-      $this->currentRow->freezeSource();
-    }
-    else {
-      $this->currentIds = NULL;
-    }
-  }
-
-  /**
-   * Source classes should override this as necessary and manipulate $keep.
-   *
-   * @param \Drupal\migrate\Row $row
-   */
-  protected function prepareRow(Row $row) {
-    // We're explicitly skipping this row - keep track in the map table
-    if ($this->migration->getSourcePlugin()->prepareRow($row) === FALSE) {
-      // Make sure we replace any previous messages for this item with any
-      // new ones.
-      $id_map = $this->migration->getIdMap();
-      $id_map->delete($this->currentIds, TRUE);
-      $this->migrateExecutable->saveQueuedMessages();
-      $id_map->saveIdMapping($row, array(), MigrateIdMapInterface::STATUS_IGNORED, $this->migrateExecutable->rollbackAction);
-      $this->numIgnored++;
-      $this->currentRow = NULL;
-      $this->currentIds = NULL;
-    }
-    else {
-      // When tracking changed data, We want to quietly skip (rather than
-      // "ignore") rows with changes. The caller needs to make that decision,
-      // so we need to provide them with the necessary information (before and
-      // after hashes).
-      if ($this->trackChanges) {
-        $row->rehash();
-      }
-    }
-    $this->numProcessed++;
-  }
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Tests/Dump/Drupal6SystemCron.php b/core/modules/migrate/lib/Drupal/migrate/Tests/Dump/Drupal6SystemCron.php
deleted file mode 100644
index 9171fff..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Tests/Dump/Drupal6SystemCron.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\Drupal6SystemCron.
- */
-
-namespace Drupal\migrate\Tests\Dump;
-
-use Drupal\Core\Database\Connection;
-
-/**
- * Database dump for testing system.cron.yml migration.
- */
-class Drupal6SystemCron {
-
-  /**
-   * Sample database schema and values.
-   *
-   * @param \Drupal\Core\Database\Connection $database
-   *   The database connection.
-   */
-  public static function load(Connection $database) {
-    $database->schema()->createTable('variable', array(
-      'fields' => array(
-        'name' => array(
-          'type' => 'varchar',
-          'length' => 128,
-          'not null' => TRUE,
-          'default' => '',
-        ),
-        'value' => array(
-          'type' => 'blob',
-          'not null' => TRUE,
-          'size' => 'big',
-          'translatable' => TRUE,
-        ),
-      ),
-      'primary key' => array(
-        'name',
-      ),
-      'module' => 'system',
-      'name' => 'variable',
-    ));
-    $database->insert('variable')->fields(array(
-      'name',
-      'value',
-    ))
-    ->values(array(
-      'name' => 'cron_threshold_warning',
-      'value' => 'i:172800;',
-    ))
-    ->values(array(
-      'name' => 'cron_threshold_error',
-      'value' => 'i:1209600;',
-    ))
-    ->execute();
-  }
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Tests/Dump/Drupal6SystemRss.php b/core/modules/migrate/lib/Drupal/migrate/Tests/Dump/Drupal6SystemRss.php
deleted file mode 100644
index da4468f..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Tests/Dump/Drupal6SystemRss.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\Drupal6SystemRss.
- */
-
-namespace Drupal\migrate\Tests\Dump;
-
-use Drupal\Core\Database\Connection;
-
-/**
- * Database dump for testing system.settings.yml migration.
- */
-class Drupal6SystemRss {
-
-  /**
-   * Sample database schema and values.
-   *
-   * @param \Drupal\Core\Database\Connection $database
-   *   The database connection.
-   */
-  public static function load(Connection $database) {
-    $database->schema()->createTable('variable', array(
-      'fields' => array(
-        'name' => array(
-          'type' => 'varchar',
-          'length' => 128,
-          'not null' => TRUE,
-          'default' => '',
-        ),
-        'value' => array(
-          'type' => 'blob',
-          'not null' => TRUE,
-          'size' => 'big',
-          'translatable' => TRUE,
-        ),
-      ),
-      'primary key' => array(
-        'name',
-      ),
-      'module' => 'system',
-      'name' => 'variable',
-    ));
-    $database->insert('variable')->fields(array(
-      'name',
-      'value',
-    ))
-    ->values(array(
-      'name' => 'feed_default_items',
-      'value' => 'i:10;',
-    ))
-    ->execute();
-  }
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Tests/Dump/Drupal6SystemSite.php b/core/modules/migrate/lib/Drupal/migrate/Tests/Dump/Drupal6SystemSite.php
deleted file mode 100644
index 69ef685..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Tests/Dump/Drupal6SystemSite.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-
-namespace Drupal\migrate\Tests\Dump;
-
-use Drupal\Core\Database\Connection;
-
-/**
- * Database dump for testing system.site.yml migration.
- */
-class Drupal6SystemSite {
-
-  /**
-   * @param \Drupal\Core\Database\Connection $database
-   */
-  public static function load(Connection $database) {
-    $database->schema()->createTable('variable', array(
-      'fields' => array(
-        'name' => array(
-          'type' => 'varchar',
-          'length' => 128,
-          'not null' => TRUE,
-          'default' => '',
-        ),
-        'value' => array(
-          'type' => 'blob',
-          'not null' => TRUE,
-          'size' => 'big',
-          'translatable' => TRUE,
-        ),
-      ),
-      'primary key' => array(
-        'name',
-      ),
-      'module' => 'system',
-      'name' => 'variable',
-    ));
-    $database->insert('variable')->fields(array(
-      'name',
-      'value',
-    ))
-    ->values(array(
-      'name' => 'site_name',
-      'value' => 's:6:"drupal";',
-    ))
-    ->values(array(
-      'name' => 'site_mail',
-      'value' => 's:17:"admin@example.com";',
-    ))
-    ->values(array(
-      'name' => 'site_slogan',
-      'value' => 's:13:"Migrate rocks";',
-    ))
-    ->values(array(
-      'name' => 'site_frontpage',
-      'value' => 's:12:"anonymous-hp";',
-    ))
-    ->values(array(
-      'name' => 'site_403',
-      'value' => 's:4:"user";',
-    ))
-    ->values(array(
-      'name' => 'site_404',
-      'value' => 's:14:"page-not-found";',
-    ))
-    ->values(array(
-      'name' => 'drupal_weight_select_max',
-      'value' => 'i:99;',
-    ))
-    ->values(array(
-      'name' => 'admin_compact_mode',
-      'value' => 'b:0;',
-    ))
-    ->execute();
-  }
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Tests/MigrateSystemConfigsTest.php b/core/modules/migrate/lib/Drupal/migrate/Tests/MigrateSystemConfigsTest.php
deleted file mode 100644
index 09529c1..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Tests/MigrateSystemConfigsTest.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\system\Tests\Upgrade\MigrateSystemSiteTest.
- */
-
-namespace Drupal\migrate\Tests;
-
-use Drupal\migrate\MigrateMessage;
-use Drupal\migrate\MigrateExecutable;
-
-class MigrateSystemConfigsTest extends MigrateTestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'name'  => 'Migrate variables to system.*.yml',
-      'description'  => 'Upgrade variables to system.*.yml',
-      'group' => 'Migrate',
-    );
-  }
-
-  function testSystemSite() {
-    $migration = entity_load('migration', 'd6_system_site');
-    $dumps = array(
-      drupal_get_path('module', 'migrate') . '/lib/Drupal/migrate/Tests/Dump/Drupal6SystemSite.php',
-    );
-    $this->prepare($migration, $dumps);
-    $executable = new MigrateExecutable($migration, new MigrateMessage);
-    $executable->import();
-    $config = \Drupal::config('system.site');
-    $this->assertIdentical($config->get('name'), 'drupal');
-    $this->assertIdentical($config->get('mail'), 'admin@example.com');
-    $this->assertIdentical($config->get('slogan'), 'Migrate rocks');
-    $this->assertIdentical($config->get('page.front'), 'anonymous-hp');
-    $this->assertIdentical($config->get('page.403'), 'user');
-    $this->assertIdentical($config->get('page.404'), 'page-not-found');
-    $this->assertIdentical($config->get('weight_select_max'), 99);
-    $this->assertIdentical($config->get('admin_compact_mode'), FALSE);
-  }
-
-  /**
-   * Tests migration of system (cron) variables to system.cron.yml.
-   */
-  public function testSystemCron() {
-    $migration = entity_load('migration', 'd6_system_cron');
-    $dumps = array(
-      drupal_get_path('module', 'migrate') . '/lib/Drupal/migrate/Tests/Dump/Drupal6SystemCron.php',
-    );
-    $this->prepare($migration, $dumps);
-    $executable = new MigrateExecutable($migration, new MigrateMessage());
-    $executable->import();
-    $config = \Drupal::config('system.cron');
-    $this->assertIdentical($config->get('threshold.warning'), 172800);
-    $this->assertIdentical($config->get('threshold.error'), 1209600);
-  }
-
-  /**
-   * Tests migration of system (rss) variables to system.rss.yml.
-   */
-  public function testSystemRss() {
-    $migration = entity_load('migration', 'd6_system_rss');
-    $dumps = array(
-      drupal_get_path('module', 'migrate') . '/lib/Drupal/migrate/Tests/Dump/Drupal6SystemRss.php',
-    );
-    $this->prepare($migration, $dumps);
-    $executable = new MigrateExecutable($migration, new MigrateMessage());
-    $executable->import();
-    $config = \Drupal::config('system.rss');
-    $this->assertIdentical($config->get('items.limit'), 10);
-  }
-}
diff --git a/core/modules/migrate/lib/Drupal/migrate/Tests/MigrateTestBase.php b/core/modules/migrate/lib/Drupal/migrate/Tests/MigrateTestBase.php
deleted file mode 100644
index 5b67e5a..0000000
--- a/core/modules/migrate/lib/Drupal/migrate/Tests/MigrateTestBase.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\system\Tests\Upgrade\MigrateTestBase.
- */
-
-namespace Drupal\migrate\Tests;
-
-use Drupal\Core\Database\Database;
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Plugin\migrate\source\SqlBase;
-use Drupal\simpletest\WebTestBase;
-
-class MigrateTestBase extends WebTestBase {
-
-  /**
-   * The file path(s) to the dumped database(s) to load into the child site.
-   *
-   * @var array
-   */
-  var $databaseDumpFiles = array();
-
-  public static $modules = array('migrate');
-
-  /**
-   * @param MigrationInterface $migration
-   * @param array $files
-   *
-   * @return \Drupal\Core\Database\Connection
-   */
-  protected function prepare(MigrationInterface $migration, array $files = array()) {
-    $databasePrefix = 'm_';
-    $connection_info = Database::getConnectionInfo('default');
-    foreach ($connection_info as $target => $value) {
-      $connection_info[$target]['prefix'] = array(
-        'default' => $value['prefix']['default'] . $databasePrefix,
-      );
-    }
-    $database = SqlBase::getDatabaseConnection($migration->id(), array('database' => $connection_info['default']));
-    foreach (array('source', 'destination', 'idMap') as $key) {
-      $configuration = $migration->get($key);
-      $configuration['database'] = $database;
-      $migration->set($key, $configuration);
-    }
-
-    // Load the database from the portable PHP dump.
-    // The files may be gzipped.
-    foreach ($files as $file) {
-      if (substr($file, -3) == '.gz') {
-        $file = "compress.zlib://$file";
-        require $file;
-      }
-      preg_match('/^namespace (.*);$/m', file_get_contents($file), $matches);
-      $class = $matches[1] . '\\' . basename($file, '.php');
-      $class::load($database);
-    }
-    return $database;
-  }
-}
diff --git a/core/modules/migrate/migrate.api.php b/core/modules/migrate/migrate.api.php
deleted file mode 100644
index a2d2cb5..0000000
--- a/core/modules/migrate/migrate.api.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\Plugin\MigrateSourceInterface;
-use Drupal\migrate\Row;
-
-/**
- * @file
- * Hooks provided by the Migrate module.
- */
-
-/**
- * @addtogroup hooks
- * @{
- */
-
-/**
- * Allows adding data to a row before processing it.
- *
- * For example, filter module used to store filter format settings in the
- * variables table which now needs to be inside the filter format config
- * file. So, it needs to be added here.
- *
- * hook_migrate_MIGRATION_ID_prepare_row is also available.
- */
-function hook_migrate_prepare_row(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) {
-  if ($migration->id() == 'drupal6_filter_formats') {
-    $value = $source->getDatabase()->query('SELECT value FROM {variable} WHERE name = :name', array(':name' => 'mymodule_filter_foo_' . $row->getSourceProperty('format')))->fetchField();
-    if ($value) {
-      $row->setSourceProperty('settings:mymodule:foo', unserialize($value));
-    }
-  }
-}
-
-/**
- * @} End of "addtogroup hooks".
- */
diff --git a/core/modules/migrate/migrate.info.yml b/core/modules/migrate/migrate.info.yml
deleted file mode 100644
index 460f66b..0000000
--- a/core/modules/migrate/migrate.info.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-name: Migrate
-type: module
-description: 'Handles migrations'
-package: Core
-version: VERSION
-core: 8.x
-;configure: admin/structure/migrate
diff --git a/core/modules/migrate/migrate.module b/core/modules/migrate/migrate.module
deleted file mode 100644
index e69de29..0000000
diff --git a/core/modules/migrate/migrate.services.yml b/core/modules/migrate/migrate.services.yml
deleted file mode 100644
index 28848df..0000000
--- a/core/modules/migrate/migrate.services.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-services:
-  cache.migrate:
-    class: Drupal\Core\Cache\CacheBackendInterface
-    tags:
-      - { name: cache.bin }
-    factory_method: get
-    factory_service: cache_factory
-    arguments: [migrate]
-  plugin.manager.migrate.source:
-    class: Drupal\migrate\Plugin\MigratePluginManager
-    arguments: [source, '@container.namespaces', '@cache.cache', '@language_manager', '@module_handler']
-  plugin.manager.migrate.process:
-    class: Drupal\migrate\Plugin\MigratePluginManager
-    arguments: [process, '@container.namespaces', '@cache.cache', '@language_manager', '@module_handler']
-  plugin.manager.migrate.destination:
-    class: Drupal\migrate\Plugin\MigratePluginManager
-    arguments: [destination, '@container.namespaces', '@cache.cache', '@language_manager', '@module_handler']
-  plugin.manager.migrate.id_map:
-    class: Drupal\migrate\Plugin\MigratePluginManager
-    arguments: [id_map, '@container.namespaces', '@cache.cache', '@language_manager', '@module_handler']
-  plugin.manager.migrate.entity_field:
-    class: Drupal\migrate\Plugin\MigratePluginManager
-    arguments: [entity_field, '@container.namespaces', '@cache.cache', '@language_manager', '@module_handler']
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/ConditionResolver.php b/core/modules/migrate/tests/Drupal/migrate/Tests/ConditionResolver.php
deleted file mode 100644
index 875f13e..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/ConditionResolver.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\ConditionResolver.
- */
-
-
-namespace Drupal\migrate\Tests;
-
-use Drupal\Core\Database\Query\Condition;
-
-class ConditionResolver {
-
-  /**
-   * Match a row against a group of conditions.
-   *
-   * @param \Drupal\migrate\tests\DatabaseRowInterface $row
-   *
-   * @param \Drupal\Core\Database\Query\Condition $condition_group
-   *
-   * @return bool
-   */
-  public static function matchGroup(DatabaseRowInterface $row, Condition $condition_group) {
-    $conditions = $condition_group->conditions();
-    $and = $conditions['#conjunction'] == 'AND';
-    unset($conditions['#conjunction']);
-    $match = TRUE;
-    foreach ($conditions as $condition) {
-      $match = $condition['field'] instanceof Condition ? static::matchGroup($row, $condition['field']) : static::matchSingle($row, $condition);
-      // For AND, finish matching on the first fail. For OR, finish on first
-      // success.
-      if ($and != $match) {
-        break;
-      }
-    }
-    return $match;
-  }
-
-  /**
-   * Match a single row and its condition.
-   *
-   * @param \Drupal\migrate\tests\DatabaseRowInterface $row
-   *   The row to match.
-   *
-   * @param array $condition
-   *   An array representing a single condition.
-   *
-   * @return bool
-   *   TRUE if the condition matches.
-   *
-   * @throws \Exception
-   *
-   */
-  protected static function matchSingle(DatabaseRowInterface $row, array $condition) {
-    $row_value = $row->getValue($condition['field']);
-    switch ($condition['operator']) {
-      case '=':
-        return $row_value == $condition['value'];
-
-      case '<=':
-        return $row_value <= $condition['value'];
-
-      case '>=':
-        return $row_value >= $condition['value'];
-
-      case '!=':
-        return $row_value != $condition['value'];
-
-      case '<>':
-        return $row_value != $condition['value'];
-
-      case '<':
-        return $row_value < $condition['value'];
-
-      case '>':
-        return $row_value > $condition['value'];
-
-      case 'IN':
-        return in_array($row_value, $condition['value']);
-
-      case 'IS NULL':
-        return !isset($row_value);
-
-      case 'IS NOT NULL':
-        return isset($row_value);
-
-      default:
-        throw new \Exception(sprintf('operator %s is not supported', $condition['operator']));
-    }
-  }
-
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/D6VariableTest.php b/core/modules/migrate/tests/Drupal/migrate/Tests/D6VariableTest.php
deleted file mode 100644
index cc903bf..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/D6VariableTest.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\D6VariableSourceTest.
- */
-
-namespace Drupal\migrate\Tests;
-
-/**
- * @group migrate
- * @group Drupal
- */
-class D6VariableTest extends MigrateSqlSourceTestCase {
-
-  const PLUGIN_CLASS = 'Drupal\migrate\Plugin\migrate\source\D6Variable';
-
-  protected $migrationConfiguration = array(
-    'id' => 'test',
-    'highwaterProperty' => array('field' => 'test'),
-    'idlist' => array(),
-    'source' => array(
-      'plugin' => 'drupal6_variable',
-      'variables' => array(
-        'foo',
-        'bar',
-      ),
-    ),
-    'sourceIds' => array(),
-    'destinationIds' => array(),
-  );
-
-  protected $mapJoinable = FALSE;
-
-  protected $expectedResults = array(
-    array(
-      'foo' => 1,
-      'bar' => FALSE,
-    ),
-  );
-
-  protected $databaseContents = array(
-    'variable' => array(
-      array('name' => 'foo', 'value' => 'i:1;'),
-      array('name' => 'bar', 'value' => 'b:0;'),
-    ),
-  );
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'D6 variable source functionality',
-      'description' => 'Tests D6 variable source plugin.',
-      'group' => 'Migrate',
-    );
-  }
-
-}
-
-namespace Drupal\migrate\Tests\source;
-
-use Drupal\Core\Database\Connection;
-use Drupal\Core\Extension\ModuleHandlerInterface;
-use Drupal\migrate\Plugin\migrate\source\D6Variable;
-
-class TestD6Variable extends D6Variable {
-  function setDatabase(Connection $database) {
-    $this->database = $database;
-  }
-  function setModuleHandler(ModuleHandlerInterface $module_handler) {
-    $this->moduleHandler = $module_handler;
-  }
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/DatabaseRow.php b/core/modules/migrate/tests/Drupal/migrate/Tests/DatabaseRow.php
deleted file mode 100644
index 1c8cf76..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/DatabaseRow.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\DatabaseRow.
- */
-
-namespace Drupal\migrate\Tests;
-
-class DatabaseRow implements DatabaseRowInterface {
-
-  public function __construct(array $row) {
-    $this->row = $row;
-  }
-
-  public function getValue($field) {
-    return $this->row[$field];
-  }
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/DatabaseRowInterface.php b/core/modules/migrate/tests/Drupal/migrate/Tests/DatabaseRowInterface.php
deleted file mode 100644
index cddfa8b..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/DatabaseRowInterface.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\DatabaseRowInterface.
- */
-
-namespace Drupal\migrate\Tests;
-
-interface DatabaseRowInterface {
-
-  function getValue($field);
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/DatabaseRowSelect.php b/core/modules/migrate/tests/Drupal/migrate/Tests/DatabaseRowSelect.php
deleted file mode 100644
index d4772ab..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/DatabaseRowSelect.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\DatabaseRowSelect.
- */
-
-namespace Drupal\migrate\Tests;
-
-class DatabaseRowSelect extends DatabaseRow {
-
-  public function __construct(array $row, array $fieldsWithTable, array $fields) {
-    $this->fieldsWithTable = $fieldsWithTable;
-    $this->fields = $fields;
-    parent::__construct($row);
-  }
-
-  public function getValue($field) {
-    $field_info = isset($this->fieldsWithTable[$field]) ? $this->fieldsWithTable[$field] : $this->fields[$field];
-    if (array_key_exists($field_info['field'], $this->row[$field_info['table']]['result'])) {
-      $index = 'result';
-    }
-    else {
-      $index = 'all';
-    }
-    return $this->row[$field_info['table']][$index][$field_info['field']];
-  }
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/FakeDatabaseSchema.php b/core/modules/migrate/tests/Drupal/migrate/Tests/FakeDatabaseSchema.php
deleted file mode 100644
index 1433f18..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/FakeDatabaseSchema.php
+++ /dev/null
@@ -1,149 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\FakeSelect.
- */
-
-
-namespace Drupal\migrate\Tests;
-
-use Drupal\Core\Database\Schema;
-
-class FakeDatabaseSchema extends Schema {
-
-  /**
-   * As set on MigrateSqlSourceTestCase::databaseContents.
-   */
-  protected $databaseContents;
-
-  public function __construct($database_contents) {
-    $this->uniqueIdentifier = uniqid('', TRUE);
-    // @todo Maybe we can generate an internal representation.
-    $this->databaseContents = $database_contents;
-  }
-
-  public function tableExists($table) {
-    return in_array($table, array_keys($this->databaseContents));
-  }
-
-  public function prefixNonTable($table) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  protected function buildTableNameCondition($table_name, $operator = '=', $add_prefix = TRUE) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  protected function getPrefixInfo($table = 'default', $add_prefix = TRUE) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function addField($table, $field, $spec, $keys_new = array()) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function addIndex($table, $name, $fields) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function addPrimaryKey($table, $fields) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function addUniqueKey($table, $name, $fields) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function changeField($table, $field, $field_new, $spec, $keys_new = array()) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function __clone() {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function copyTable($source, $destination) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function createTable($name, $table) {
-    #throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function dropField($table, $field) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function dropIndex($table, $name) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function dropPrimaryKey($table) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function dropTable($table) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function dropUniqueKey($table, $name) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function fieldExists($table, $column) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function fieldNames($fields) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function fieldSetDefault($table, $field, $default) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function fieldSetNoDefault($table, $field) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function findTables($table_expression) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function getFieldTypeMap() {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function indexExists($table, $name) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function nextPlaceholder() {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function prepareComment($comment, $length = NULL) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function renameTable($table, $new_name) {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  public function uniqueIdentifier() {
-    throw new \Exception(sprintf('Unsupported method "%s"', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'Fake database schema',
-      'description' => 'Tests for fake database schema plugin.',
-      'group' => 'Migrate',
-    );
-  }
-
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/FakeSelect.php b/core/modules/migrate/tests/Drupal/migrate/Tests/FakeSelect.php
deleted file mode 100644
index 9b79234..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/FakeSelect.php
+++ /dev/null
@@ -1,511 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\FakeSelect.
- */
-
-namespace Drupal\migrate\Tests;
-
-use Drupal\Core\Database\Connection;
-use Drupal\Core\Database\Query\Condition;
-use Drupal\Core\Database\Query\PlaceholderInterface;
-use Drupal\Core\Database\Query\Select;
-use Drupal\Core\Database\Query\SelectInterface;
-
-class FakeSelect extends Select {
-
-  /**
-   * Contents of the pseudo-database.
-   *
-   * Keys are table names and values are arrays of rows in the table.
-   * Every row there contains all table fields keyed by field name.
-   *
-   * @code
-   * array(
-   *   'user' => array(
-   *     array(
-   *       'uid' => 1,
-   *       'name' => 'admin',
-   *     ),
-   *     array(
-   *       'uid' => 2,
-   *       'name' => 'alice',
-   *     ),
-   *   ),
-   *   'node' => array(
-   *     array(
-   *       'nid' => 1,
-   *     )
-   *   )
-   * )
-   * @endcode
-   *
-   * @var array
-   */
-  protected $databaseContents;
-
-  protected $countQuery = FALSE;
-  protected $fieldsWithTable = array();
-
-  /**
-   * Constructs a new FakeSelect.
-   *
-   * @param string $table
-   *   The base table name used within fake select.
-   *
-   * @param string $alias
-   *   The base table alias used within fake select.
-   *
-   * @param array $database_contents
-   *   An array of mocked database content.
-   *
-   * @param string $conjunction
-   *   The operator to use to combine conditions: 'AND' or 'OR'.
-   */
-  public function __construct($table, $alias, array $database_contents, $conjunction = 'AND') {
-    $this->addJoin(NULL, $table, $alias);
-    $this->where = new Condition($conjunction);
-    $this->having = new Condition($conjunction);
-    $this->databaseContents = $database_contents;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function leftJoin($table, $alias = NULL, $condition = NULL, $arguments = array()) {
-    return $this->addJoin('LEFT', $table, $alias, $condition, $arguments);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function addJoin($type, $table, $alias = NULL, $condition = NULL, $arguments = array()) {
-    if ($table instanceof SelectInterface) {
-      // @todo implement this.
-      throw new \Exception('Subqueries are not supported at this moment.');
-    }
-    $alias = parent::addJoin($type, $table, $alias, $condition, $arguments);
-    if (isset($type)) {
-      if ($type != 'INNER' && $type != 'LEFT') {
-        throw new \Exception(sprintf('%s type not supported, only INNER and LEFT.', $type));
-      }
-      if (!preg_match('/(\w+)\.(\w+)\s*=\s*(\w+)\.(\w+)/', $condition, $matches)) {
-        throw new \Exception('Only x.field1 = y.field2 conditions are supported.' . $condition);
-      }
-      if ($matches[1] == $alias) {
-        $this->tables[$alias] += array(
-          'added_field' => $matches[2],
-          'original_table_alias' => $matches[3],
-          'original_field' => $matches[4],
-        );
-      }
-      elseif ($matches[3] == $alias) {
-        $this->tables[$alias] += array(
-          'added_field' => $matches[4],
-          'original_table_alias' => $matches[1],
-          'original_field' => $matches[2],
-        );
-      }
-      else {
-        throw new \Exception('The JOIN condition does not contain the alias of the joined table.');
-      }
-    }
-    return $alias;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function execute() {
-    // @todo: Implement distinct() handling.
-
-    // Single table count queries often do not contain fields which this class
-    // does not support otherwise, so add a shortcut.
-    if (count($this->tables) == 1 && $this->countQuery) {
-      $table_info = reset($this->tables);
-      $where = $this->where;
-      if (!empty($this->databaseContents[$table_info['table']])) {
-        $results = array_filter($this->databaseContents[$table_info['table']], function ($row_array) use ($where) {
-          return ConditionResolver::matchGroup(new DatabaseRow($row_array), $where);
-        });
-      }
-      else {
-        $results = array();
-      }
-    }
-    else {
-      $all_rows = $this->executeJoins();
-      $all_rows = $this->resolveConditions($this->where, $all_rows);
-      if (!empty($this->order)) {
-        usort($all_rows, array($this, 'sortCallback'));
-      }
-      // Now flatten the rows so that each row becomes a field alias => value
-      // array.
-      $results = array();
-      foreach ($all_rows as $table_rows) {
-        $result_row = array();
-        foreach ($table_rows as $row) {
-          $result_row += $row['result'];
-        }
-        $results[] = $result_row;
-      }
-    }
-    if (!empty($this->range)) {
-      $results = array_slice($results, $this->range['start'], $this->range['length']);
-    }
-    if ($this->countQuery) {
-      $results = array(array(count($results)));
-    }
-    return new FakeStatement($results);
-  }
-
-  /**
-   * Create an initial result set by executing the joins and picking fields.
-   *
-   * @return array
-   *   A multidimensional array, the first key are table aliases, the second
-   *   are field aliases, the values are the database contents or NULL in case
-   *   of JOINs.
-   */
-  protected function executeJoins() {
-    // @TODO add support for all_fields.
-    $fields = array();
-    foreach ($this->fields as $field_info) {
-      $this->fieldsWithTable[$field_info['table'] . '.' . $field_info['field']] = $field_info;
-      $fields[$field_info['table']][$field_info['field']] = NULL;
-    }
-    foreach ($this->tables as $alias => $table_info) {
-      if ($table = reset($this->databaseContents[$table_info['table']])) {
-        foreach (array_keys($table) as $field) {
-          if (!isset($this->fields[$field])) {
-            $this->fieldsWithTable[$field] = array(
-              'table' => $alias,
-              'field' => $field,
-            );
-          }
-        }
-      }
-    }
-    // This will contain a multiple dimensional array. The first key will be a
-    // table alias, the second either result or all, the third will be a field
-    // alias. all contains every field in the table with the original field
-    // names while result contains only the fields requested. This allows for
-    // filtering on fields that were not added via addField().
-    $results = array();
-    foreach ($this->tables as $table_alias => $table_info) {
-      // The base table for this query.
-      if (empty($table_info['join type'])) {
-        foreach ($this->databaseContents[$table_info['table']] as $candidate_row) {
-          $results[] = $this->getNewRow($table_alias, $fields, $candidate_row);
-        }
-      }
-      else {
-        $new_rows = array();
-
-        // Dynamically build a set of joined rows. Check existing rows and see
-        // if they can be joined with incoming rows.
-        foreach ($results as $row) {
-          $joined = FALSE;
-          foreach ($this->databaseContents[$table_info['table']] as $candidate_row) {
-            if ($row[$table_info['original_table_alias']]['result'][$table_info['original_field']] == $candidate_row[$table_info['added_field']]) {
-              $joined = TRUE;
-              $new_rows[] = $this->getNewRow($table_alias, $fields, $candidate_row, $row);
-            }
-          }
-          if (!$joined && $table_info['join type'] == 'LEFT') {
-            // Because PHP doesn't scope their foreach statements,
-            // $candidate_row may contain the last value assigned to it from the
-            // previous statement.
-            // @TODO: empty tables? Those are a problem.
-            $keys = array_keys($candidate_row);
-            $values = array_fill(0, count($keys), NULL);
-            $new_row = array(
-              'result' => $fields[$table_alias],
-              'all' => array_combine($keys, $values),
-            );
-            $new_rows[] = array($table_alias => $new_row) + $row;
-          }
-        }
-        $results = $new_rows;
-      }
-    }
-    return $results;
-  }
-
-  /**
-   * Retrieves a new row.
-   *
-   * @param string $table_alias
-   * @param array $fields
-   * @param array $candidate_row
-   * @param array $row
-   *
-   * @return array
-   */
-  protected function getNewRow($table_alias, $fields, $candidate_row, $row = array()) {
-    $new_row[$table_alias]['all'] = $candidate_row;
-    foreach ($fields[$table_alias] as $field => $v) {
-      $new_row[$table_alias]['result'][$field] = $candidate_row[$field];
-    }
-    return $new_row + $row;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function countQuery() {
-    $query = clone $this;
-    return $query->setCountQuery();
-  }
-
-  /**
-   * Set this query to be a count query.
-   */
-  protected function setCountQuery() {
-    $this->countQuery = TRUE;
-    return $this;
-  }
-
-  /**
-   * usort callback to order the results.
-   */
-  protected function sortCallback($a, $b) {
-    $a_row = new DatabaseRowSelect($a, $this->fieldsWithTable, $this->fields);
-    $b_row = new DatabaseRowSelect($b, $this->fieldsWithTable, $this->fields);
-    foreach ($this->order as $field => $direction) {
-      $a_value = $a_row->getValue($field);
-      $b_value = $b_row->getValue($field);
-      if ($a_value != $b_value) {
-        return (($a_value < $b_value) == ($direction == 'ASC')) ? -1 : 1;
-      }
-    }
-    return 0;
-  }
-
-  /**
-   * Resolves conditions by removing non-matching rows.
-   *
-   * @param \Drupal\Core\Database\Query\Condition $condition_group
-   *   The condition group to check.
-   * @param array $rows
-   *   An array of rows excluding non-matching rows.
-   */
-  protected function resolveConditions(Condition $condition_group, array &$rows) {
-    $fields_with_table = $this->fieldsWithTable;
-    $fields = $this->fields;
-    return array_filter($rows, function ($row_array) use ($condition_group, $fields_with_table, $fields) {
-      $row = new DatabaseRowSelect($row_array, $fields_with_table, $fields);
-      return ConditionResolver::matchGroup($row, $condition_group);
-    });
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function orderBy($field, $direction = 'ASC') {
-    $this->order[$field] = strtoupper($direction);
-    return $this;
-  }
-
-  // ================== we could support these.
-  /**
-   * {@inheritdoc}
-   */
-  public function groupBy($field) {
-    // @todo: Implement groupBy() method.
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function havingCondition($field, $value = NULL, $operator = NULL) {
-    // @todo: Implement havingCondition() method.
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function uniqueIdentifier() {
-    // TODO: Implement uniqueIdentifier() method.
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  // ================== the rest won't be supported, ever.
-  /**
-   * {@inheritdoc}
-   */
-  public function nextPlaceholder() {
-    // TODO: Implement nextPlaceholder() method.
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function isPrepared() {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function preExecute(SelectInterface $query = NULL) {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function where($snippet, $args = array()) {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function extend($extender_name) {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function &getExpressions() {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function &getGroupBy() {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function &getUnion() {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function forUpdate($set = TRUE) {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function rightJoin($table, $alias = NULL, $condition = NULL, $arguments = array()) {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function &conditions() {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function orderRandom() {
-    // We could implement this but why bother.
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function union(SelectInterface $query, $type = '') {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function addExpression($expression, $alias = NULL, $arguments = array()) {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function &getTables() {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getArguments(PlaceholderInterface $query_place_holder = NULL) {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function &getOrderBy() {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function &getFields() {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function exists(SelectInterface $select) {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function notExists(SelectInterface $select) {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function arguments() {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function compile(Connection $connection, PlaceholderInterface $query_place_holder) {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function compiled() {
-    throw new \Exception(sprintf('Method "%s" is not supported', __METHOD__));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'Fake select test',
-      'description' => 'Tests for fake select plugin.',
-      'group' => 'Migrate',
-    );
-  }
-
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/FakeStatement.php b/core/modules/migrate/tests/Drupal/migrate/Tests/FakeStatement.php
deleted file mode 100644
index 9088c50..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/FakeStatement.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\FakeStatement.
- */
-
-namespace Drupal\migrate\Tests;
-
-use Drupal\Core\Database\StatementInterface;
-
-/**
- * Represents a fake prepared statement.
- */
-class FakeStatement extends \ArrayIterator implements StatementInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function execute($args = array(), $options = array()) {
-    throw new \Exception('This method is not supported');
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getQueryString() {
-    throw new \Exception('This method is not supported');
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function rowCount() {
-    return $this->count();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fetchField($index = 0) {
-    $row = array_values($this->current());
-    $return = $row[$index];
-    $this->next();
-    return $return;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fetchAssoc() {
-    $return = $this->current();
-    $this->next();
-    return $return;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fetchCol($index = 0) {
-    $return = array();
-    foreach ($this as $row) {
-      $row = array_values($row);
-      $return[] = $row[$index];
-    }
-    return $return;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fetchAllKeyed($key_index = 0, $value_index = 1) {
-    $return = array();
-    foreach ($this as $row) {
-      $row = array_values($row);
-      $return[$row[$key_index]] = $row[$value_index];
-    }
-    return $return;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fetchAllAssoc($key, $fetch = NULL) {
-    $return = array();
-    foreach ($this as $row) {
-      $return[$row[$key]] = $row;
-    }
-    return $return;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'Fake statement test',
-      'description' => 'Tests for fake statement plugin.',
-      'group' => 'Migrate',
-    );
-  }
-
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateExecutableTest.php b/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateExecutableTest.php
deleted file mode 100644
index 295ed6d..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateExecutableTest.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\MigrateExecutableTest.
- */
-
-namespace Drupal\migrate\Tests;
-
-use Drupal\Core\StringTranslation\TranslationInterface;
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\MigrateExecutable;
-
-/**
- * Tests the migrate executable.
- *
- * @group Drupal
- * @group migrate
- *
- * @covers \Drupal\migrate\Tests\MigrateExecutableTest
- */
-class MigrateExecutableTest extends MigrateTestCase {
-
-  /**
-   * The mocked migration entity.
-   *
-   * @var \Drupal\migrate\Entity\MigrationInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $migration;
-
-  /**
-   * The mocked migrate message.
-   *
-   * @var \Drupal\migrate\MigrateMessageInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $message;
-
-  /**
-   * The tested migrate executable.
-   *
-   * @var \Drupal\migrate\MigrateExecutable
-   */
-  protected $executable;
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'Migrate executable',
-      'description' => 'Tests the migrate executable.',
-      'group' => 'Migrate',
-    );
-  }
-
-  protected function setUp() {
-    $this->migration = $this->getMock('Drupal\migrate\Entity\MigrationInterface');
-    $this->message = $this->getMock('Drupal\migrate\MigrateMessageInterface');
-    $id_map = $this->getMock('Drupal\migrate\Plugin\MigrateIdMapInterface');
-
-    $this->migration->expects($this->any())
-      ->method('getIdMap')
-      ->will($this->returnValue($id_map));
-
-    $this->executable = new TestMigrateExecutable($this->migration, $this->message);
-    $this->executable->setTranslationManager($this->getStringTranslationStub());
-  }
-
-  /**
-   * Tests an import with an incomplete rewinding.
-   */
-  public function testImportWithFailingRewind() {
-    $iterator = $this->getMock('\Iterator');
-    $iterator->expects($this->once())
-      ->method('valid')
-      ->will($this->returnCallback(function() {
-        throw new \Exception('invalid source iteration');
-      }));
-    $source = $this->getMock('Drupal\migrate\Plugin\MigrateSourceInterface');
-    $source->expects($this->any())
-      ->method('getIterator')
-      ->will($this->returnValue($iterator));
-
-    $this->migration->expects($this->any())
-      ->method('getSourcePlugin')
-      ->will($this->returnValue($source));
-
-    // Ensure that a message with the proper message was added.
-    $this->message->expects($this->once())
-      ->method('display')
-      ->with('Migration failed with source plugin exception: invalid source iteration');
-
-    $result = $this->executable->import();
-    $this->assertEquals(MigrationInterface::RESULT_FAILED, $result);
-  }
-
-}
-
-class TestMigrateExecutable extends MigrateExecutable {
-
-  public function setTranslationManager(TranslationInterface $translation_manager) {
-    $this->translationManager = $translation_manager;
-  }
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateSqlSourceTestCase.php b/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateSqlSourceTestCase.php
deleted file mode 100644
index 1456977..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateSqlSourceTestCase.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\MigrateSqlSourceTestCase.
- */
-
-namespace Drupal\migrate\Tests;
-
-/**
- * Provides setup and helper methods for Migrate module source tests.
- */
-abstract class MigrateSqlSourceTestCase extends MigrateTestCase {
-
-  /**
-   * The tested source plugin.
-   *
-   * @var \Drupal\migrate\Plugin\migrate\source\d6\Comment.
-   */
-  protected $source;
-
-  protected $databaseContents = array();
-
-  const PLUGIN_CLASS = '';
-
-  const ORIGINAL_HIGHWATER = '';
-
-  protected $expectedResults = array();
-
-  /**
-   * @var \Drupal\migrate\Plugin\MigrateSourceInterface
-   */
-  protected $plugin;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    $module_handler = $this->getMockBuilder('Drupal\Core\Extension\ModuleHandlerInterface')
-      ->disableOriginalConstructor()
-      ->getMock();
-
-    $migration = $this->getMigration();
-    $migration->expects($this->any())
-      ->method('getHighwater')
-      ->will($this->returnValue(static::ORIGINAL_HIGHWATER));
-    // Need the test class, not the original because we need a setDatabase method. This is not pretty :/
-    $plugin_class  = preg_replace('/^(Drupal\\\\\w+\\\\)Plugin\\\\migrate(\\\\source(\\\\.+)?\\\\)([^\\\\]+)$/', '\1Tests\2Test\4', static::PLUGIN_CLASS);
-    $plugin = new $plugin_class($this->migrationConfiguration['source'], $this->migrationConfiguration['source']['plugin'], array(), $migration);
-    $plugin->setDatabase($this->getDatabase($this->databaseContents + array('test_map' => array())));
-    $plugin->setModuleHandler($module_handler);
-    $migration->expects($this->any())
-      ->method('getSourcePlugin')
-      ->will($this->returnValue($plugin));
-    $migrateExecutable = $this->getMockBuilder('Drupal\migrate\MigrateExecutable')
-      ->disableOriginalConstructor()
-      ->getMock();
-    $this->source = new TestSource($migration, $migrateExecutable);
-
-    $cache = $this->getMock('Drupal\Core\Cache\CacheBackendInterface');
-    $this->source->setCache($cache);
-  }
-
-  public function testRetrieval() {
-    $this->queryResultTest($this->source, $this->expectedResults);
-  }
-
-  /**
-   * @param \Drupal\migrate\Row $row
-   * @param string $key
-   * @return mixed
-   */
-  protected function getValue($row, $key) {
-    return $row->getSourceProperty($key);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'SQL source test',
-      'description' => 'Tests for SQL source plugin.',
-      'group' => 'Migrate',
-    );
-  }
-
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateTestCase.php b/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateTestCase.php
deleted file mode 100644
index 7ca0ae6..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/MigrateTestCase.php
+++ /dev/null
@@ -1,141 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\MigrateTestCase.
- */
-
-namespace Drupal\migrate\Tests;
-
-use Drupal\Tests\UnitTestCase;
-
-/**
- * Provides setup and helper methods for Migrate module tests.
- */
-abstract class MigrateTestCase extends UnitTestCase {
-
-  /**
-   * @TODO: does this need to be derived from the source/destination plugin?
-   *
-   * @var bool
-   */
-  protected $mapJoinable = TRUE;
-
-  protected $migrationConfiguration = array();
-
-  /**
-   * Retrieve a mocked migration.
-   *
-   * @return \Drupal\migrate\Entity\MigrationInterface
-   *   The mocked migration.
-   */
-  protected function getMigration() {
-    $idmap = $this->getMock('Drupal\migrate\Plugin\MigrateIdMapInterface');
-    if ($this->mapJoinable) {
-      $idmap->expects($this->once())
-        ->method('getQualifiedMapTable')
-        ->will($this->returnValue('test_map'));
-    }
-
-    $migration = $this->getMock('Drupal\migrate\Entity\MigrationInterface');
-    $migration->expects($this->any())
-      ->method('getIdMap')
-      ->will($this->returnValue($idmap));
-    $configuration = $this->migrationConfiguration;
-    $migration->expects($this->any())->method('get')->will($this->returnCallback(function ($argument) use ($configuration) {
-      return isset($configuration[$argument]) ? $configuration[$argument] : '';
-    }));
-    $migration->expects($this->any())
-      ->method('id')
-      ->will($this->returnValue($configuration['id']));
-    return $migration;
-  }
-
-  /**
-   * @return \Drupal\Core\Database\Connection
-   */
-  protected function getDatabase($database_contents) {
-    $database = $this->getMockBuilder('Drupal\Core\Database\Connection')
-      ->disableOriginalConstructor()
-      ->getMock();
-    $database->databaseContents = &$database_contents;
-    $database->expects($this->any())
-      ->method('select')->will($this->returnCallback(function ($base_table, $base_alias) use ($database_contents) {
-      return new FakeSelect($base_table, $base_alias, $database_contents);
-    }));
-    $database->expects($this->any())
-      ->method('schema')
-      ->will($this->returnCallback(function () use (&$database_contents) {
-      return new FakeDatabaseSchema($database_contents);
-    }));
-    $database->expects($this->any())
-      ->method('insert')
-      ->will($this->returnCallback(function ($table) use (&$database_contents) {
-      return new FakeInsert($database_contents, $table);
-    }));
-    $database->expects($this->any())
-      ->method('update')
-      ->will($this->returnCallback(function ($table) use (&$database_contents) {
-      return new FakeUpdate($database_contents, $table);
-    }));
-    $database->expects($this->any())
-      ->method('merge')
-      ->will($this->returnCallback(function ($table) use (&$database_contents) {
-      return new FakeMerge($database_contents, $table);
-    }));
-    $database->expects($this->any())
-      ->method('query')
-      ->will($this->throwException(new \Exception('Query is not supported')));
-    return $database;
-  }
-
-  /**
-   * Tests a query
-   *
-   * @param array|\Traversable
-   *   The countable. foreach-able actual results if a query is being run.
-   */
-  public function queryResultTest($iter, $expected_results) {
-    $this->assertSame(count($expected_results), count($iter), 'Number of results match');
-    $count = 0;
-    foreach ($iter as $data_row) {
-      $expected_row = $expected_results[$count];
-      $count++;
-      foreach ($expected_row as $key => $expected_value) {
-        $this->retrievalAssertHelper($expected_value, $this->getValue($data_row, $key), sprintf('Value matches for key "%s"', $key));
-      }
-    }
-    $this->assertSame(count($expected_results), $count);
-  }
-
-  /**
-   * @param array $row
-   * @param string $key
-   * @return mixed
-   */
-  protected function getValue($row, $key) {
-    return $row[$key];
-  }
-
-  /**
-   * Asserts tested values during test retrieval.
-   *
-   * @param mixed $expected_value
-   *   The incoming expected value to test.
-   * @param mixed $actual_value
-   *   The incoming value itself.
-   * @param string $message
-   *   The tested result as a formatted string.
-   */
-  protected function retrievalAssertHelper($expected_value, $actual_value, $message) {
-    if (is_array($expected_value)) {
-      foreach ($expected_value as $k => $v) {
-        $this->retrievalAssertHelper($v, $actual_value[$k], $message . '['. $k . ']');
-      }
-    }
-    else {
-      $this->assertSame((string) $expected_value, (string) $actual_value, $message);
-    }
-  }
-
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/TestSource.php b/core/modules/migrate/tests/Drupal/migrate/Tests/TestSource.php
deleted file mode 100644
index 99988d6..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/TestSource.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\TestSource.
- */
-
-
-namespace Drupal\migrate\Tests;
-
-use Drupal\Core\Cache\CacheBackendInterface;
-use Drupal\migrate\Source;
-
-class TestSource extends Source {
-  function setCache(CacheBackendInterface $cache) {
-    $this->cache = $cache;
-  }
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/process/GetTest.php b/core/modules/migrate/tests/Drupal/migrate/Tests/process/GetTest.php
deleted file mode 100644
index e49e1f2..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/process/GetTest.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-/**
- * @file
- * Contains
- */
-
-namespace Drupal\migrate\Tests\process;
-
-use Drupal\migrate\Plugin\migrate\process\TestGet;
-
-/**
- * @group migrate
- * @group Drupal
- */
-class GetTest extends MigrateProcessTestCase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'Get process plugin',
-      'description' => 'Tests the get process plugin.',
-      'group' => 'Migrate',
-    );
-  }
-
-  function setUp() {
-    $this->plugin = new TestGet();
-    parent::setUp();
-  }
-
-  function testTransformSourceString() {
-    $this->row->expects($this->once())
-      ->method('getSourceProperty')
-      ->with('test')
-      ->will($this->returnValue('source_value'));
-    $this->plugin->setSource('test');
-    $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'source_value');
-  }
-
-  function testTransformSourceArray() {
-    $map = array(
-      'test1' => 'source_value1',
-      'test2' => 'source_value2',
-    );
-    $this->plugin->setSource(array('test1', 'test2'));
-    $this->row->expects($this->exactly(2))
-      ->method('getSourceProperty')
-      ->will($this->returnCallback(function ($argument)  use ($map) { return $map[$argument]; } ));
-    $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, array('source_value1', 'source_value2'));
-  }
-
-  function testTransformSourceStringAt() {
-    $this->row->expects($this->once())
-      ->method('getSourceProperty')
-      ->with('@test')
-      ->will($this->returnValue('source_value'));
-    $this->plugin->setSource('@@test');
-    $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'source_value');
-  }
-
-  function testTransformSourceArrayAt() {
-    $map = array(
-      'test1' => 'source_value1',
-      '@test2' => 'source_value2',
-      '@test3' => 'source_value3',
-      'test4' => 'source_value4',
-    );
-    $this->plugin->setSource(array('test1', '@@test2', '@@test3', 'test4'));
-    $this->row->expects($this->exactly(4))
-      ->method('getSourceProperty')
-      ->will($this->returnCallback(function ($argument)  use ($map) { return $map[$argument]; } ));
-    $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, array('source_value1', 'source_value2', 'source_value3', 'source_value4'));
-  }
-}
-
-namespace Drupal\migrate\Plugin\migrate\process;
-
-class TestGet extends Get {
-  function __construct() {
-  }
-  function setSource($source) {
-    $this->configuration['source'] = $source;
-  }
-}
diff --git a/core/modules/migrate/tests/Drupal/migrate/Tests/process/MigrateProcessTestCase.php b/core/modules/migrate/tests/Drupal/migrate/Tests/process/MigrateProcessTestCase.php
deleted file mode 100644
index d99a865..0000000
--- a/core/modules/migrate/tests/Drupal/migrate/Tests/process/MigrateProcessTestCase.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\migrate\Tests\process\MigrateProcessTestCase.
- */
-
-namespace Drupal\migrate\Tests\process;
-
-use Drupal\migrate\Tests\MigrateTestCase;
-
-abstract class MigrateProcessTestCase extends MigrateTestCase {
-
-  /**
-   * @var \Drupal\migrate\Plugin\migrate\process\TestGet
-   */
-  protected $plugin;
-
-  /**
-   * @var \Drupal\migrate\Row
-   */
-  protected $row;
-
-  /**
-   * @var \Drupal\migrate\MigrateExecutable
-   */
-  protected $migrateExecutable;
-
-  function setUp() {
-    $this->row = $this->getMockBuilder('Drupal\migrate\Row')
-      ->disableOriginalConstructor()
-      ->getMock();
-    $this->migrateExecutable = $this->getMockBuilder('Drupal\migrate\MigrateExecutable')
-      ->disableOriginalConstructor()
-      ->getMock();
-    parent::setUp();
-  }
-
-}
diff --git a/core/modules/node/lib/Drupal/node/Entity/Node.php b/core/modules/node/lib/Drupal/node/Entity/Node.php
index dddecb3..f67d15b 100644
--- a/core/modules/node/lib/Drupal/node/Entity/Node.php
+++ b/core/modules/node/lib/Drupal/node/Entity/Node.php
@@ -49,13 +49,12 @@
  *   bundle_keys = {
  *     "bundle" = "type"
  *   },
- *   bundle_entity_type = "node_type",
+ *   route_base_path = "admin/structure/types/manage/{bundle}",
  *   permission_granularity = "bundle",
  *   links = {
  *     "canonical" = "node.view",
  *     "edit-form" = "node.page_edit",
- *     "version-history" = "node.revision_overview",
- *     "admin-form" = "node.type_edit"
+ *     "version-history" = "node.revision_overview"
  *   }
  * )
  */
diff --git a/core/modules/node/node.local_tasks.yml b/core/modules/node/node.local_tasks.yml
index ecf6298..24d9ef2 100644
--- a/core/modules/node/node.local_tasks.yml
+++ b/core/modules/node/node.local_tasks.yml
@@ -16,7 +16,3 @@ node.revision_overview:
   tab_root_id: node.view
   title: 'Revisions'
   weight: 20
-node.type_edit:
-  title: 'Edit'
-  route_name: node.type_edit
-  tab_root_id: node.type_edit
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index a860f3f..79c7b44 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -949,6 +949,16 @@ function node_menu() {
     'title' => 'List',
     'type' => MENU_DEFAULT_LOCAL_TASK,
   );
+  $items['admin/structure/types/manage/%node_type'] = array(
+    'title' => 'Edit content type',
+    'title callback' => 'entity_page_label',
+    'title arguments' => array(4),
+    'route_name' => 'node.type_edit',
+  );
+  $items['admin/structure/types/manage/%node_type/edit'] = array(
+    'title' => 'Edit',
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+  );
   $items['node/add'] = array(
     'title' => 'Add content',
     'route_name' => 'node.add_page',
diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc
index cdeb8a0..6c82604 100644
--- a/core/modules/node/node.views.inc
+++ b/core/modules/node/node.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data for node.module.
+ * Provide views data and handlers for node.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 use Drupal\views\Analyzer;
diff --git a/core/modules/picture/lib/Drupal/picture/Entity/PictureMapping.php b/core/modules/picture/lib/Drupal/picture/Entity/PictureMapping.php
index e6ce436..0f056a9 100644
--- a/core/modules/picture/lib/Drupal/picture/Entity/PictureMapping.php
+++ b/core/modules/picture/lib/Drupal/picture/Entity/PictureMapping.php
@@ -128,7 +128,7 @@ protected function loadAllMappings() {
     $loaded_mappings = $this->mappings;
     $this->mappings = array();
     if ($this->breakpointGroup) {
-      foreach ($this->breakpointGroup->getBreakpoints() as $breakpoint_id => $breakpoint) {
+      foreach ($this->breakpointGroup->breakpoints as $breakpoint_id => $breakpoint) {
         // Get the mapping for the default multiplier.
         $this->mappings[$breakpoint_id]['1x'] = '';
         if (isset($loaded_mappings[$breakpoint_id]['1x'])) {
diff --git a/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php b/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php
index 5651ef9..00f5b9f 100644
--- a/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php
+++ b/core/modules/picture/lib/Drupal/picture/PictureMappingFormController.php
@@ -73,8 +73,7 @@ public function form(array $form, array &$form_state) {
     $image_styles = image_style_options(TRUE);
     foreach ($picture_mapping->mappings as $breakpoint_id => $mapping) {
       foreach ($mapping as $multiplier => $image_style) {
-        $breakpoint = $picture_mapping->breakpointGroup->getBreakpointById($breakpoint_id);
-        $label = $multiplier . ' ' . $breakpoint->name . ' [' . $breakpoint->mediaQuery . ']';
+        $label = $multiplier . ' ' . $picture_mapping->breakpointGroup->breakpoints[$breakpoint_id]->name . ' [' . $picture_mapping->breakpointGroup->breakpoints[$breakpoint_id]->mediaQuery . ']';
         $form['mappings'][$breakpoint_id][$multiplier] = array(
           '#type' => 'select',
           '#title' => check_plain($label),
diff --git a/core/modules/picture/lib/Drupal/picture/Plugin/Field/FieldFormatter/PictureFormatter.php b/core/modules/picture/lib/Drupal/picture/Plugin/Field/FieldFormatter/PictureFormatter.php
index a28e5fb..f34b37a 100644
--- a/core/modules/picture/lib/Drupal/picture/Plugin/Field/FieldFormatter/PictureFormatter.php
+++ b/core/modules/picture/lib/Drupal/picture/Plugin/Field/FieldFormatter/PictureFormatter.php
@@ -133,8 +133,9 @@ public function viewElements(FieldItemListInterface $items) {
           // Make sure that the breakpoint exists and is enabled.
           // @todo add the following when breakpoint->status is added again:
           // $picture_mapping->breakpointGroup->breakpoints[$breakpoint_name]->status
-          $breakpoint = $picture_mapping->breakpointGroup->getBreakpointById($breakpoint_name);
-          if ($breakpoint) {
+          if (isset($picture_mapping->breakpointGroup->breakpoints[$breakpoint_name])) {
+            $breakpoint = $picture_mapping->breakpointGroup->breakpoints[$breakpoint_name];
+
             // Determine the enabled multipliers.
             $multipliers = array_intersect_key($multipliers, $breakpoint->multipliers);
             foreach ($multipliers as $multiplier => $image_style) {
diff --git a/core/modules/picture/lib/Drupal/picture/Tests/PictureAdminUITest.php b/core/modules/picture/lib/Drupal/picture/Tests/PictureAdminUITest.php
index 3b908db..b023fe5 100644
--- a/core/modules/picture/lib/Drupal/picture/Tests/PictureAdminUITest.php
+++ b/core/modules/picture/lib/Drupal/picture/Tests/PictureAdminUITest.php
@@ -67,7 +67,7 @@ public function setUp() {
         ),
       ));
       $breakpoint->save();
-      $breakpoint_group->addBreakpoints(array($breakpoint));
+      $breakpoint_group->breakpoints[$breakpoint->id()] = $breakpoint;
     }
     $breakpoint_group->save();
 
diff --git a/core/modules/picture/lib/Drupal/picture/Tests/PictureFieldDisplayTest.php b/core/modules/picture/lib/Drupal/picture/Tests/PictureFieldDisplayTest.php
index 7c11a6f..c19b63c 100644
--- a/core/modules/picture/lib/Drupal/picture/Tests/PictureFieldDisplayTest.php
+++ b/core/modules/picture/lib/Drupal/picture/Tests/PictureFieldDisplayTest.php
@@ -77,7 +77,7 @@ public function setUp() {
         ),
       ));
       $breakpoint->save();
-      $breakpoint_group->addBreakpoints(array($breakpoint));
+      $breakpoint_group->breakpoints[$breakpoint->id()] = $breakpoint;
     }
     $breakpoint_group->save();
 
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
index 5eb5b26..b7fb02f 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
@@ -13,7 +13,6 @@
 use Symfony\Component\DependencyInjection\Reference;
 use Drupal\Core\Database\Database;
 use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\HttpFoundation\Request;
 
 /**
  * Base test case class for Drupal unit tests.
@@ -189,8 +188,7 @@ public function containerBuild(ContainerBuilder $container) {
       $definition = $container->getDefinition('path_processor_alias');
       $definition->clearTag('path_processor_inbound')->clearTag('path_processor_outbound');
     }
-    $request = Request::create('/');
-    $this->container->set('request', $request);
+
   }
 
   /**
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
index 2108b67..c00f72f 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
@@ -18,7 +18,6 @@
 use Drupal\Core\DrupalKernel;
 use Drupal\Core\Language\Language;
 use Drupal\Core\StreamWrapper\PublicStream;
-use Symfony\Component\HttpFoundation\Request;
 
 /**
  * Base class for Drupal tests.
@@ -974,10 +973,6 @@ protected function prepareEnvironment() {
     // Register info parser.
     $this->container->register('info_parser', 'Drupal\Core\Extension\InfoParser');
 
-    $request = Request::create('/');
-    $this->container->set('request', $request);
-    $this->container->set('current_user', $GLOBALS['user']);
-
     \Drupal::setContainer($this->container);
 
     // Unset globals.
@@ -1040,16 +1035,12 @@ protected function prepareConfigDirectories() {
    *   enabled modules to be immediately available in the same request.
    */
   protected function rebuildContainer() {
-    // Preserve the request object after the container rebuild.
-    $request = \Drupal::request();
-
     $this->kernel = new DrupalKernel('testing', drupal_classloader(), FALSE);
     $this->kernel->boot();
     // DrupalKernel replaces the container in \Drupal::getContainer() with a
     // different object, so we need to replace the instance on this test class.
     $this->container = \Drupal::getContainer();
     // The global $user is set in TestBase::prepareEnvironment().
-    $this->container->set('request', $request);
     $this->container->set('current_user', $GLOBALS['user']);
   }
 
diff --git a/core/modules/statistics/statistics.views.inc b/core/modules/statistics/statistics.views.inc
index fe9a9e6..3814692 100644
--- a/core/modules/statistics/statistics.views.inc
+++ b/core/modules/statistics/statistics.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data for statistics.module.
+ * Provide views data and handlers for statistics.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.views.inc b/core/modules/system/tests/modules/entity_test/entity_test.views.inc
index 389923a..32da74d 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.views.inc
+++ b/core/modules/system/tests/modules/entity_test/entity_test.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data for entity_test.module.
+ * Provide views data and handlers for entity_test.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Controller/EntityTestController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Controller/EntityTestController.php
index a6a42ee..ad22414 100644
--- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Controller/EntityTestController.php
+++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Controller/EntityTestController.php
@@ -30,11 +30,4 @@ public function testEdit(Request $request) {
     return entity_test_edit($entity);
   }
 
-  /**
-   * Returns an empty page.
-   */
-  public function testAdmin() {
-    return '';
-  }
-
 }
diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php
index b4ad49b..5ba7091 100644
--- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php
+++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php
@@ -37,10 +37,10 @@
  *     "bundle" = "type",
  *     "label" = "name"
  *   },
+ *   route_base_path = "admin/structure/entity-test/manage/{bundle}",
  *   links = {
  *     "canonical" = "entity_test.render",
- *     "edit-form" = "entity_test.edit_entity_test",
- *     "admin-form" = "entity_test.admin_entity_test"
+ *     "edit-form" = "entity_test.edit_entity_test"
  *   }
  * )
  */
diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php
index e73ff5e..c3f9212 100644
--- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php
+++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestMul.php
@@ -36,10 +36,10 @@
  *     "bundle" = "type",
  *     "label" = "name"
  *   },
+ *   route_base_path = "entity_test_mul/structure/{bundle}",
  *   links = {
  *     "canonical" = "entity_test.edit_entity_test_mul",
- *     "edit-form" = "entity_test.edit_entity_test_mul",
- *     "admin-form" = "entity_test.admin_entity_test_mul"
+ *     "edit-form" = "entity_test.edit_entity_test_mul"
  *   }
  * )
  */
diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Routing/RouteSubscriber.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Routing/RouteSubscriber.php
index 91a43cd..0379d37 100644
--- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Routing/RouteSubscriber.php
+++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Routing/RouteSubscriber.php
@@ -39,13 +39,6 @@ protected function routes(RouteCollection $collection) {
         ))
       );
       $collection->add("entity_test.edit_$entity_type", $route);
-
-      $route = new Route(
-        "$entity_type/structure/{bundle}",
-        array('_content' => '\Drupal\entity_test\Controller\EntityTestController::testAdmin'),
-        array('_permission' => 'administer entity_test content')
-      );
-      $collection->add("entity_test.admin_$entity_type", $route);
     }
   }
 
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
index a091d1a..0b7c3d6 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php
@@ -44,12 +44,11 @@
  *   bundle_keys = {
  *     "bundle" = "vid"
  *   },
- *   bundle_entity_type = "taxonomy_vocabulary",
  *   links = {
  *     "canonical" = "taxonomy.term_page",
- *     "edit-form" = "taxonomy.term_edit",
- *     "admin-form" = "taxonomy.overview_terms"
+ *     "edit-form" = "taxonomy.term_edit"
  *   },
+ *   route_base_path = "admin/structure/taxonomy/manage/{bundle}",
  *   permission_granularity = "bundle"
  * )
  */
diff --git a/core/modules/taxonomy/taxonomy.local_tasks.yml b/core/modules/taxonomy/taxonomy.local_tasks.yml
index cdcb4ea..a04379e 100644
--- a/core/modules/taxonomy/taxonomy.local_tasks.yml
+++ b/core/modules/taxonomy/taxonomy.local_tasks.yml
@@ -7,12 +7,3 @@ taxonomy.term_edit:
   title: 'Edit'
   route_name: taxonomy.term_edit
   tab_root_id: taxonomy.term_page
-
-taxonomy.overview_terms:
-  title: 'List'
-  route_name: taxonomy.overview_terms
-  tab_root_id: taxonomy.overview_terms
-taxonomy.vocabulary_edit:
-  title: 'Edit'
-  route_name: taxonomy.vocabulary_edit
-  tab_root_id: taxonomy.overview_terms
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index c5f6153..72222aa 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -240,6 +240,14 @@ function taxonomy_menu() {
     'description' => 'Manage tagging, categorization, and classification of your content.',
     'route_name' => 'taxonomy.vocabulary_list',
   );
+  $items['admin/structure/taxonomy/list'] = array(
+    'title' => 'List',
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+  );
+  $items['admin/structure/taxonomy/add'] = array(
+    'route_name' => 'taxonomy.vocabulary_add',
+    'type' => MENU_SIBLING_LOCAL_TASK,
+  );
 
   $items['taxonomy/term/%taxonomy_term'] = array(
     'title' => 'Taxonomy term',
diff --git a/core/modules/taxonomy/taxonomy.pages.inc b/core/modules/taxonomy/taxonomy.pages.inc
index 96f84aa..fb88184 100644
--- a/core/modules/taxonomy/taxonomy.pages.inc
+++ b/core/modules/taxonomy/taxonomy.pages.inc
@@ -24,23 +24,11 @@ function taxonomy_term_page(Term $term) {
   foreach ($term->uriRelationships() as $rel) {
     $uri = $term->uri($rel);
     // Set the term path as the canonical URL to prevent duplicate content.
-    $build['#attached']['drupal_add_html_head_link'][] = array(
-      array(
-        'rel' => $rel,
-        'href' => url($uri['path'], $uri['options']),
-      ),
-      TRUE,
-    );
+    drupal_add_html_head_link(array('rel' => $rel, 'href' => url($uri['path'], $uri['options'])), TRUE);
 
     if ($rel == 'canonical') {
       // Set the non-aliased canonical path as a default shortlink.
-      $build['#attached']['drupal_add_html_head_link'][] = array(
-        array(
-          'rel' => 'shortlink',
-          'href' => url($uri['path'], array_merge($uri['options'], array('alias' => TRUE))),
-        ),
-        TRUE,
-      );
+      drupal_add_html_head_link(array('rel' => 'shortlink', 'href' => url($uri['path'], array_merge($uri['options'], array('alias' => TRUE)))), TRUE);
     }
   }
 
diff --git a/core/modules/taxonomy/taxonomy.views.inc b/core/modules/taxonomy/taxonomy.views.inc
index 3404b3a..001c125 100644
--- a/core/modules/taxonomy/taxonomy.views.inc
+++ b/core/modules/taxonomy/taxonomy.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data for taxonomy.module.
+ * Provide views data and handlers for taxonomy.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 use Drupal\Core\Entity\FieldableDatabaseStorageController;
diff --git a/core/modules/toolbar/config/breakpoint.breakpoint.module.toolbar.narrow.yml b/core/modules/toolbar/config/breakpoint.breakpoint.module.toolbar.narrow.yml
deleted file mode 100644
index 742e76f..0000000
--- a/core/modules/toolbar/config/breakpoint.breakpoint.module.toolbar.narrow.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: module.toolbar.narrow
-uuid: cb5e5f7c-b443-4d0b-ae5e-948ba336a0cb
-name: narrow
-label: narrow
-mediaQuery: 'only screen and (min-width: 16.5em)'
-source: toolbar
-sourceType: module
-weight: 0
-multipliers:
-  1x: 1x
-status: true
-langcode: en
diff --git a/core/modules/toolbar/config/breakpoint.breakpoint.module.toolbar.standard.yml b/core/modules/toolbar/config/breakpoint.breakpoint.module.toolbar.standard.yml
deleted file mode 100644
index e5c5c33..0000000
--- a/core/modules/toolbar/config/breakpoint.breakpoint.module.toolbar.standard.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: module.toolbar.standard
-uuid: 19981d7a-2dc3-4b3f-be00-a4d8a7c12c07
-name: standard
-label: standard
-mediaQuery: 'only screen and (min-width: 38.125em)'
-source: toolbar
-sourceType: module
-weight: 1
-multipliers:
-  1x: 1x
-status: true
-langcode: en
diff --git a/core/modules/toolbar/config/breakpoint.breakpoint.module.toolbar.wide.yml b/core/modules/toolbar/config/breakpoint.breakpoint.module.toolbar.wide.yml
deleted file mode 100644
index ab5ed2f..0000000
--- a/core/modules/toolbar/config/breakpoint.breakpoint.module.toolbar.wide.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: module.toolbar.wide
-uuid: 8797545b-0b39-493d-8c00-b4ae721bf447
-name: wide
-label: wide
-mediaQuery: 'only screen and (min-width: 52em)'
-source: toolbar
-sourceType: module
-weight: 2
-multipliers:
-  1x: 1x
-status: true
-langcode: en
diff --git a/core/modules/toolbar/config/breakpoint.breakpoint_group.module.toolbar.toolbar.yml b/core/modules/toolbar/config/breakpoint.breakpoint_group.module.toolbar.toolbar.yml
deleted file mode 100644
index 4d09153..0000000
--- a/core/modules/toolbar/config/breakpoint.breakpoint_group.module.toolbar.toolbar.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: module.toolbar.toolbar
-uuid: 03945598-b3ae-4ea7-ad25-375b52f6f0a4
-name: toolbar
-label: toolbar
-breakpoint_ids:
-  - module.toolbar.narrow
-  - module.toolbar.standard
-  - module.toolbar.wide
-source: toolbar
-sourceType: module
-status: true
-langcode: en
diff --git a/core/modules/toolbar/config/schema/toolbar.schema.yml b/core/modules/toolbar/config/schema/toolbar.schema.yml
new file mode 100644
index 0000000..c0949f2
--- /dev/null
+++ b/core/modules/toolbar/config/schema/toolbar.schema.yml
@@ -0,0 +1,25 @@
+# Schema for the configuration files of the toolbar module.
+
+toolbar.settings:
+  type: mapping
+  label: 'Toolbar settings'
+  mapping:
+    breakpoints:
+      type: sequence
+      label: 'Breakpoints'
+      sequence:
+        - type: string
+
+toolbar.breakpoints:
+  type: mapping
+  label: 'Toolbar breakpoint settings'
+  mapping:
+    narrow:
+      type: string
+      label: 'Narrow'
+    standard:
+      type: string
+      label: 'Standard'
+    wide:
+      type: string
+      label: 'Wide'
diff --git a/core/modules/toolbar/config/toolbar.breakpoints.yml b/core/modules/toolbar/config/toolbar.breakpoints.yml
new file mode 100644
index 0000000..74b318e
--- /dev/null
+++ b/core/modules/toolbar/config/toolbar.breakpoints.yml
@@ -0,0 +1,3 @@
+narrow: 'only screen and (min-width: 16.5em)'
+standard: 'only screen and (min-width: 38.125em)'
+wide: 'only screen and (min-width: 52em)'
diff --git a/core/modules/toolbar/config/toolbar.settings.yml b/core/modules/toolbar/config/toolbar.settings.yml
new file mode 100644
index 0000000..1f2de55
--- /dev/null
+++ b/core/modules/toolbar/config/toolbar.settings.yml
@@ -0,0 +1,4 @@
+breakpoints:
+  - module.toolbar.narrow
+  - module.toolbar.standard
+  - module.toolbar.wide
diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module
index 45610c1..85bfafa 100644
--- a/core/modules/toolbar/toolbar.module
+++ b/core/modules/toolbar/toolbar.module
@@ -192,7 +192,7 @@ function toolbar_pre_render($element) {
       function ($object) {
         return $object->mediaQuery;
       },
-      $breakpoints->getBreakpoints()
+      $breakpoints->breakpoints
     );
 
     $element['#attached']['js'][] = array(
diff --git a/core/modules/tracker/tracker.views.inc b/core/modules/tracker/tracker.views.inc
index 14c125e..1a5e1fb 100644
--- a/core/modules/tracker/tracker.views.inc
+++ b/core/modules/tracker/tracker.views.inc
@@ -3,6 +3,8 @@
 /**
  * @file
  * Provide views data for tracker.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/modules/user/lib/Drupal/user/Entity/User.php b/core/modules/user/lib/Drupal/user/Entity/User.php
index c667d20..fe90bfc 100644
--- a/core/modules/user/lib/Drupal/user/Entity/User.php
+++ b/core/modules/user/lib/Drupal/user/Entity/User.php
@@ -32,6 +32,7 @@
  *   admin_permission = "administer user",
  *   base_table = "users",
  *   uri_callback = "user_uri",
+ *   route_base_path = "admin/config/people/accounts",
  *   label_callback = "user_label",
  *   fieldable = TRUE,
  *   translatable = TRUE,
@@ -41,8 +42,7 @@
  *   },
  *   links = {
  *     "canonical" = "user.view",
- *     "edit-form" = "user.edit",
- *     "admin-form" = "user.account_settings"
+ *     "edit-form" = "user.edit"
  *   }
  * )
  */
diff --git a/core/modules/user/user.views.inc b/core/modules/user/user.views.inc
index 52d28eb..f49e812 100644
--- a/core/modules/user/user.views.inc
+++ b/core/modules/user/user.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data for user.module.
+ * Provide views data and handlers for user.module.
+ *
+ * @ingroup views_module_handlers
  */
 
 use Drupal\views\ViewExecutable;
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
index 0268284..7af12f7 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
@@ -14,7 +14,6 @@
 use Drupal\views\ViewExecutable;
 use Drupal\views\Plugin\views\PluginBase;
 use Drupal\views\Views;
-use Symfony\Component\DependencyInjection\Exception\RuntimeException as DependencyInjectionRuntimeException;
 
 /**
  * @defgroup views_display_plugins Views display plugins
@@ -887,15 +886,8 @@ public function getHandlers($type) {
         // If this is during form submission and there are temporary options
         // which can only appear if the view is in the edit cache, use those
         // options instead. This is used for AJAX multi-step stuff.
-        // @todo Remove dependency on Request object
-        //   https://drupal.org/node/2059003.
-        try {
-          $request = \Drupal::request();
-          if ($request->request->get('form_id') && isset($this->view->temporary_options[$type][$id])) {
-            $info = $this->view->temporary_options[$type][$id];
-          }
-        }
-        catch (DependencyInjectionRuntimeException $e) {
+        if (\Drupal::request()->request->get('form_id') && isset($this->view->temporary_options[$type][$id])) {
+          $info = $this->view->temporary_options[$type][$id];
         }
 
         if ($info['id'] != $id) {
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php
index 136e5bb..7b1e0b1 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php
@@ -57,13 +57,13 @@ public function attachTo($display_id, $path, $title) {
         '#url' => $url,
         '#title' => $title,
       );
-      $feed_icon['#attached']['drupal_add_html_head_link'][][] = array(
+      $this->view->feed_icon .= drupal_render($feed_icon);
+      drupal_add_html_head_link(array(
         'rel' => 'alternate',
         'type' => 'application/rss+xml',
         'title' => $title,
-        'href' => $url,
-      );
-      $this->view->feed_icon .= drupal_render($feed_icon);
+        'href' => $url
+      ));
     }
   }
 
diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayPageTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayPageTest.php
index b4e343d..dc51709 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayPageTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayPageTest.php
@@ -81,14 +81,11 @@ public function testPageResponses() {
     $response = $this->container->get('http_kernel')->handle($subrequest, HttpKernelInterface::SUB_REQUEST);
     $this->assertEqual($response->getStatusCode(), 200);
 
-    $subrequest = Request::create('/test_page_display_200', 'GET');
-    \Drupal::getContainer()->set('request', $subrequest);
-
     // Test accessing a disabled page for a view.
     $view = views_get_view('test_page_display');
     // Disable the view, rebuild menu, and request the page again.
     $view->storage->disable()->save();
-
+    $subrequest = Request::create('/test_page_display_200', 'GET');
     $response = $this->container->get('http_kernel')->handle($subrequest, HttpKernelInterface::SUB_REQUEST);
     $this->assertEqual($response->getStatusCode(), 404);
   }
diff --git a/core/modules/views/views.api.php b/core/modules/views/views.api.php
index a1fa531..ea2c97c 100644
--- a/core/modules/views/views.api.php
+++ b/core/modules/views/views.api.php
@@ -839,3 +839,11 @@ function hook_views_plugins_wizard_alter(array &$plugins) {
 /**
  * @}
  */
+
+/**
+ * @defgroup views_module_handlers Views module handlers
+ * @{
+ * Handlers exposed by various modules to Views.
+ * @}
+ */
+
diff --git a/core/modules/views/views.views.inc b/core/modules/views/views.views.inc
index edf844a..b3af1d4 100644
--- a/core/modules/views/views.views.inc
+++ b/core/modules/views/views.views.inc
@@ -2,7 +2,9 @@
 
 /**
  * @file
- * Provide views data that isn't tied to any other module.
+ * Provide views data and handlers that aren't tied to any other module.
+ *
+ * @ingroup views_module_handlers
  */
 
 /**
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 7912f6a..58f45ae 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -39,10 +39,6 @@
   exit;
 }
 simpletest_classloader_register();
-// We have to add a Request.
-$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
-$container = \Drupal::getContainer();
-$container->set('request', $request);
 
 if ($args['clean']) {
   // Clean up left-over times and directories.
@@ -481,11 +477,8 @@ function simpletest_script_run_one_test($test_id, $test_class) {
   try {
     // Bootstrap Drupal.
     drupal_bootstrap(DRUPAL_BOOTSTRAP_CODE);
+
     simpletest_classloader_register();
-    // We have to add a Request.
-    $request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
-    $container = \Drupal::getContainer();
-    $container->set('request', $request);
 
     // Override configuration according to command line parameters.
     $conf['simpletest.settings']['verbose'] = $args['verbose'];
diff --git a/core/themes/bartik/config/bartik.breakpoints.yml b/core/themes/bartik/config/bartik.breakpoints.yml
new file mode 100644
index 0000000..501f417
--- /dev/null
+++ b/core/themes/bartik/config/bartik.breakpoints.yml
@@ -0,0 +1,3 @@
+mobile: '(min-width: 0px)'
+narrow: 'all and (min-width: 560px) and (max-width: 850px)'
+wide: 'all and (min-width: 851px)'
diff --git a/core/themes/bartik/config/breakpoint.breakpoint.theme.bartik.mobile.yml b/core/themes/bartik/config/breakpoint.breakpoint.theme.bartik.mobile.yml
deleted file mode 100644
index 99740ce..0000000
--- a/core/themes/bartik/config/breakpoint.breakpoint.theme.bartik.mobile.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: theme.bartik.mobile
-uuid: 676e11ac-c254-415a-881c-28786167ed69
-name: mobile
-label: mobile
-mediaQuery: '(min-width: 0px)'
-source: bartik
-sourceType: theme
-weight: 0
-multipliers:
-  1x: 1x
-status: true
-langcode: en
diff --git a/core/themes/bartik/config/breakpoint.breakpoint.theme.bartik.narrow.yml b/core/themes/bartik/config/breakpoint.breakpoint.theme.bartik.narrow.yml
deleted file mode 100644
index 26597ae..0000000
--- a/core/themes/bartik/config/breakpoint.breakpoint.theme.bartik.narrow.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: theme.bartik.narrow
-uuid: da7ce8eb-f006-4a2f-8557-87ac4f62d5cd
-name: narrow
-label: narrow
-mediaQuery: 'all and (min-width: 560px) and (max-width: 850px)'
-source: bartik
-sourceType: theme
-weight: 1
-multipliers:
-  1x: 1x
-status: true
-langcode: en
diff --git a/core/themes/bartik/config/breakpoint.breakpoint.theme.bartik.wide.yml b/core/themes/bartik/config/breakpoint.breakpoint.theme.bartik.wide.yml
deleted file mode 100644
index 90b38db..0000000
--- a/core/themes/bartik/config/breakpoint.breakpoint.theme.bartik.wide.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: theme.bartik.wide
-uuid: 42288274-fd42-49cc-bb0d-131c13e2b46b
-name: wide
-label: wide
-mediaQuery: 'all and (min-width: 851px)'
-source: bartik
-sourceType: theme
-weight: 2
-multipliers:
-  1x: 1x
-status: true
-langcode: en
diff --git a/core/themes/bartik/config/breakpoint.breakpoint_group.theme.bartik.bartik.yml b/core/themes/bartik/config/breakpoint.breakpoint_group.theme.bartik.bartik.yml
deleted file mode 100644
index 9ae2b82..0000000
--- a/core/themes/bartik/config/breakpoint.breakpoint_group.theme.bartik.bartik.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-id: theme.bartik.bartik
-uuid: 7f6492dc-028c-47e9-bb00-c280cc21586c
-name: bartik
-label: Bartik
-breakpoint_ids:
-  - theme.bartik.mobile
-  - theme.bartik.narrow
-  - theme.bartik.wide
-source: bartik
-sourceType: theme
-status: true
-langcode: en
diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css
index 6314e93..5dad110 100644
--- a/core/themes/bartik/css/style.css
+++ b/core/themes/bartik/css/style.css
@@ -953,17 +953,17 @@ ul.links {
 
 /* ------------------ Footer ------------------ */
 
-#footer-wrapper .block .content {
+#footer-wrapper {
   color: #c0c0c0;
   color: rgba(255, 255, 255, 0.65);
   font-size: 0.857em;
 }
-#footer-wrapper .block .content a {
+#footer-wrapper a {
   color: #fcfcfc;
   color: rgba(255, 255, 255, 0.8);
 }
-#footer-wrapper .block .content a:hover,
-#footer-wrapper .block .content a:focus {
+#footer-wrapper a:hover,
+#footer-wrapper a:focus {
   color: #fefefe;
   color: rgba(255, 255, 255, 0.95);
   text-decoration: underline;
diff --git a/core/update.php b/core/update.php
index f3f381b..7abd566 100644
--- a/core/update.php
+++ b/core/update.php
@@ -450,14 +450,13 @@ function update_check_requirements($skip_warnings = FALSE) {
 
 // Determine if the current user has access to run update.php.
 drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES);
+require_once DRUPAL_ROOT . '/' . settings()->get('session_inc', 'core/includes/session.inc');
+drupal_session_initialize();
 
 // A request object from the HTTPFoundation to tell us about the request.
 $request = Request::createFromGlobals();
 \Drupal::getContainer()->set('request', $request);
 
-require_once DRUPAL_ROOT . '/' . settings()->get('session_inc', 'core/includes/session.inc');
-drupal_session_initialize();
-
 // Ensure that URLs generated for the home and admin pages don't have 'update.php'
 // in them.
 $generator = \Drupal::urlGenerator();
