diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 4250091..cd88075 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -3,7 +3,7 @@
 use Drupal\Core\Database\Database;
 use Symfony\Component\ClassLoader\UniversalClassLoader;
 use Symfony\Component\ClassLoader\ApcUniversalClassLoader;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Drupal\Component\DependencyInjection\ContainerBuilder;
 
 /**
  * @file
@@ -2152,6 +2152,22 @@ function _drupal_bootstrap_configuration() {
     // All Drupal-namespaced code in core lives in /core/lib/Drupal.
     'Drupal' => DRUPAL_ROOT . '/core/lib',
   ));
+
+  // @todo The remainder of this function should move elsewhere. Where?
+
+  // Register a default cache implementation. Modules can override this fallback
+  // by calling registerFallback('cache.{cache.bin}', ...), or can register
+  // specific cache bins with register() (e.g., register('cache.form', ...).
+  drupal_container()->registerFallback('cache.{cache.bin}', 'Drupal\Core\Cache\DatabaseBackend')
+    ->setArguments(array('%cache.bin%'));
+
+  // Register default implementations for plugin types and plugins.
+  drupal_container()->registerFallback('plugin.type.{plugin.scope}.{plugin.type}', 'Drupal\Core\Plugin\PluginType')
+    ->setArguments(array('%plugin.scope%', '%plugin.type%'));
+  drupal_container()->registerFallback('plugin.plugin.{plugin.scope}.{plugin.type}.{plugin.id}', NULL)
+    ->setFactoryService('plugin.plugin.%plugin.scope%.%plugin.type%')
+    ->setFactoryMethod('getPlugin')
+    ->setArguments(array('%plugin.id%'));
 }
 
 /**
@@ -2322,7 +2338,7 @@ function drupal_get_bootstrap_phase() {
  * @param $reset
  *   TRUE or FALSE depending on whether the Container instance is to be reset.
  *
- * @return Symfony\Component\DependencyInjection\ContainerBuilder
+ * @return Drupal\Component\DependencyInjection\ContainerBuilder
  *   The instance of the Drupal Container used to set up and maintain object
  *   instances.
  */
diff --git a/core/includes/cache.inc b/core/includes/cache.inc
index d3c3414..d0b7391 100644
--- a/core/includes/cache.inc
+++ b/core/includes/cache.inc
@@ -28,17 +28,7 @@ function cache($bin = 'cache') {
   // bin names to be passed as arguments.
   $bin = str_replace('cache_', '', $bin);
 
-  // We do not use drupal_static() here because we do not want to change the
-  // storage of a cache bin mid-request.
-  static $cache_objects;
-  if (!isset($cache_objects[$bin])) {
-    $class = variable_get('cache_class_' . $bin);
-    if (!isset($class)) {
-      $class = variable_get('cache_default_class', 'Drupal\Core\Cache\DatabaseBackend');
-    }
-    $cache_objects[$bin] = new $class($bin);
-  }
-  return $cache_objects[$bin];
+  return drupal_container()->get('cache.' . $bin);
 }
 
 /**
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 07e25a0..df421bd 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -297,7 +297,8 @@ function install_begin_request(&$install_state) {
   // because any data put in the cache during the installer is inherently
   // suspect, due to the fact that Drupal is not fully set up yet.
   require_once DRUPAL_ROOT . '/core/includes/cache.inc';
-  $conf['cache_default_class'] = 'Drupal\Core\Cache\InstallBackend';
+  drupal_container()->registerFallback('cache.{cache.bin}', 'Drupal\Core\Cache\InstallBackend')
+    ->setArguments(array('%cache.bin%'));
 
   // Prepare for themed output. We need to run this at the beginning of the
   // page request to avoid a different theme accidentally getting set. (We also
diff --git a/core/lib/Drupal/Component/DependencyInjection/ContainerBuilder.php b/core/lib/Drupal/Component/DependencyInjection/ContainerBuilder.php
new file mode 100644
index 0000000..10a6eb4
--- /dev/null
+++ b/core/lib/Drupal/Component/DependencyInjection/ContainerBuilder.php
@@ -0,0 +1,115 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Component\DependencyInjection\ContainerBuilder.
+ */
+
+namespace Drupal\Component\DependencyInjection;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder as SymfonyContainerBuilder;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+
+/**
+ * @todo Add documentation here.
+ */
+class ContainerBuilder extends SymfonyContainerBuilder {
+  protected $fallbacks = array();
+
+  /**
+   * @todo Add documentation here.
+   */
+  public function registerFallback($idPattern, $class = null) {
+    return $this->fallbacks[strtolower($idPattern)] = new Definition($class);
+  }
+
+  /**
+   * @todo Add documentation here.
+   */
+  public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
+    $id = strtolower($id);
+
+    try {
+      return parent::get($id, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE);
+    }
+    catch (InvalidArgumentException $e) {
+      // If a fallback service definition exists, create a service based on
+      // that, populating the service container with parameters fetched from the
+      // service id.
+      if (!$this->hasDefinition($id) && ($fallback = $this->findFallback($id))) {
+        $parameters = $this->getParametersFromId($id, $fallback);
+        foreach ($parameters as $name => $value) {
+          $this->setParameter($name, $value);
+        }
+        $this->setDefinition($id, $this->fallbacks[$fallback]);
+        $service = $this->get($id, $invalidBehavior);
+        // The parameters values only apply to this particular service id, not
+        // to any others using the same fallback, so clean them up.
+        foreach ($parameters as $name => $value) {
+          $this->setParameter($name, NULL);
+        }
+        return $service;
+      }
+
+      if ($invalidBehavior === ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
+        throw $e;
+      }
+    }
+  }
+
+  /**
+   * @todo Add documentation here.
+   */
+  protected function findFallback($id) {
+    // @todo Optimize this by structuring $this->fallbacks to be more
+    //   efficiently searched.
+    // @todo Add best fit logic if there are multiple matches. For example, if
+    //   $id = 'a.b.c' and there are two fallbacks: 'a.{foo}.{bar}' and
+    //   'a.b.{bar}', the latter (more specific) one should be returned.
+    foreach ($this->fallbacks as $fallback => $definition) {
+      $regex = '/' . preg_replace('/\\\{.*?\\\}/', '\\w+', preg_quote($fallback, '/')) . '/';
+      if (preg_match($regex, $id)) {
+        return $fallback;
+      }
+    }
+  }
+
+  /**
+   * @todo Add documentation here.
+   */
+  protected function getParametersFromId($id, $fallback) {
+    // @todo Clean this up. Basically, if $fallback = 'a.b.{c.d}.{e.f}.g' and
+    //   $id = 'a.b.foo.bar.g', return array('c.d' => 'foo', 'e.f' => 'bar').
+    $idParts = explode('.', $id);
+    $parameters = array();
+    $fallbackParts = array();
+    $fallbackPart = array();
+    $placeholder = FALSE;
+    foreach (explode('.', $fallback) as $part) {
+      if (substr($part, 0, 1) == '{') {
+        $fallbackPart = array();
+        $placeholder = TRUE;
+      }
+      if (substr($part, -1, 1) == '}') {
+        $placeholder = FALSE;
+        $fallbackPart[] = $part;
+        $part = implode('.', $fallbackPart);
+      }
+      if ($placeholder) {
+        $fallbackPart[] = $part;
+      }
+      else {
+        $fallbackParts[] = $part;
+      }
+    }
+    foreach ($fallbackParts as $i => $part) {
+      if (substr($part, 0, 1) == '{' && substr($part, -1, 1) == '}') {
+        $parameters[substr($part, 1, -1)] = $idParts[$i];
+      }
+    }
+    return $parameters;
+  }
+
+}
diff --git a/core/lib/Drupal/Component/Plugin/Exception/PluginException.php b/core/lib/Drupal/Component/Plugin/Exception/PluginException.php
new file mode 100644
index 0000000..731b4c5
--- /dev/null
+++ b/core/lib/Drupal/Component/Plugin/Exception/PluginException.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * @file
+ * Base exception object for grouping other plugin exceptions.
+ */
+
+namespace Drupal\Component\Plugin\Exception;
+
+/**
+ * Exception class used as a base for plugin related errors.
+ */
+class PluginException extends \Exception { }
diff --git a/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php b/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php
new file mode 100644
index 0000000..498c85a
--- /dev/null
+++ b/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Component\Plugin\Factory\DefaultFactory.
+ */
+
+namespace Drupal\Component\Plugin\Factory;
+use Drupal\Component\Plugin\PluginInterface;
+use Drupal\Component\Plugin\Exception\PluginException;
+
+/**
+ * Default factory for creating configured plugin instances.
+ */
+class DefaultFactory {
+
+  public static function createInstance(PluginInterface $plugin, array $configuration) {
+    // Get the class to instantiate.
+    $definition = $plugin->getDefinition();
+    $class = isset($definition['plugin']['instance_creation']['class']) ? $definition['plugin']['instance_creation']['class'] : NULL;
+    if (empty($class)) {
+      throw new PluginException('Plugin instance class was not specified.');
+    }
+    if (!class_exists($class)) {
+      throw new PluginException(sprintf('Plugin instance class "%s" does not exist.', $class));
+    }
+
+    // Create the instance. If the constructor takes arguments, populate them
+    // with the corresponding configuration value.
+    $reflector = new \ReflectionClass($class);
+    if ($reflector->hasMethod('__construct')) {
+      $parameters = $reflector->getMethod('__construct')->getParameters();
+      $arguments = array();
+      foreach ($parameters as $parameter) {
+        $arguments[] = isset($configuration[$parameter->name]) ? $configuration[$parameter->name] : NULL;
+      }
+      $instance = $reflector->newInstanceArgs($arguments);
+    }
+    else {
+      $instance = new $class();
+    }
+
+    // Configure the instance.
+    // @todo Allow the definition to specify a 'configurator' callable (similar
+    //   to what Symfony's service container allows) instead of hardcoding the
+    //   method name.
+    $instance->configure($configuration);
+
+    return $instance;
+  }
+
+}
diff --git a/core/lib/Drupal/Component/Plugin/Plugin.php b/core/lib/Drupal/Component/Plugin/Plugin.php
new file mode 100644
index 0000000..4dcdf45
--- /dev/null
+++ b/core/lib/Drupal/Component/Plugin/Plugin.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Component\Plugin\Plugin.
+ */
+
+namespace Drupal\Component\Plugin;
+
+/**
+ * Implements a class for plugins whose definition can be provided by the caller instantiating this class.
+ */
+class Plugin implements PluginInterface {
+
+  protected $pluginType;
+  protected $id;
+  protected $definition;
+
+  public function __construct(PluginTypeInterface $pluginType, $id, $definition = array()) {
+    $this->pluginType = $pluginType;
+    $this->id = $id;
+    $this->definition = $definition;
+  }
+
+  public function createInstance($configuration) {
+    $factory = $this->getFactory();
+    return call_user_func($factory, $this, $configuration);
+  }
+
+  /**
+   * Helper function that gets the PHP callable to use for creating a plugin instance.
+   */
+  protected function getFactory() {
+    return isset($this->definition['plugin']['instance_creation']['factory']) ? $this->definition['plugin']['instance_creation']['factory'] : 'Drupal\Component\Plugin\Factory\DefaultFactory::createInstance';
+  }
+}
diff --git a/core/lib/Drupal/Component/Plugin/PluginInterface.php b/core/lib/Drupal/Component/Plugin/PluginInterface.php
new file mode 100644
index 0000000..24c1af2
--- /dev/null
+++ b/core/lib/Drupal/Component/Plugin/PluginInterface.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Component\Plugin\PluginInterface.
+ */
+
+namespace Drupal\Component\Plugin;
+
+/**
+ * Defines an interface for accessing information about a plugin and creating configured instances for it.
+ */
+interface PluginInterface {
+
+  /**
+   * Get the plugin definition.
+   *
+   * @return array
+   *   The plugin definition.
+   */
+  public function getDefinition();
+
+  /**
+   * Create a configured instance of this plugin.
+   *
+   * @param array $configuration
+   *   Configuration data for the instance.
+   *
+   * @return object
+   *   A plugin instance. The plugin implementation determines what class to
+   *   instantiate for its plugin instances.
+   */
+  public function createInstance($configuration);
+
+}
diff --git a/core/lib/Drupal/Component/Plugin/PluginType.php b/core/lib/Drupal/Component/Plugin/PluginType.php
new file mode 100644
index 0000000..d494c40
--- /dev/null
+++ b/core/lib/Drupal/Component/Plugin/PluginType.php
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Component\Plugin\PluginType.
+ */
+
+namespace Drupal\Component\Plugin;
+use Drupal\Component\Plugin\Exception\PluginException;
+
+/**
+ * Implements a class for plugin types whose definition and plugin list can be provided by the caller instantiating this class.
+ */
+class PluginType implements PluginTypeInterface {
+
+  protected $scope;
+  protected $type;
+  protected $definition;
+  protected $pluginDefinitions;
+  protected $plugins = array();
+
+  public function __construct($scope, $type, $definition = array(), $pluginDefinitions = array()) {
+    $this->scope = $scope;
+    $this->type = $type;
+    $this->definition = $definition;
+    $this->pluginDefinitions = $pluginDefinitions;
+  }
+
+  public function getDefinition() {
+    return $this->definition;
+  }
+
+  public function getPluginIds() {
+    return array_keys($this->pluginDefinitions);
+  }
+
+  public function getPlugin($id) {
+    if (!isset($this->plugins[$id])) {
+      if (!isset($this->pluginDefinitions[$id])) {
+        throw new PluginException(sprintf('Plugin "%s" does not exist.', $id));
+      }
+      $class = $this->getPluginClass();
+      if (!class_exists($class)) {
+        throw new PluginException(sprintf('Plugin class "%s" does not exist.', $class));
+      }
+      $this->plugins[$id] = new $class($this, $id, $this->pluginDefinitions[$id]);
+    }
+    return $this->plugins[$id];
+  }
+
+  /**
+   * Helper function that gets the class to use for accessing plugins of this type.
+   */
+  protected function getPluginClass() {
+    return isset($this->definition['plugin']['plugin_class']) ? $this->definition['plugin']['plugin_class'] : 'Drupal\Component\Plugin\Plugin';
+  }
+}
diff --git a/core/lib/Drupal/Component/Plugin/PluginTypeInterface.php b/core/lib/Drupal/Component/Plugin/PluginTypeInterface.php
new file mode 100644
index 0000000..9d67a8a
--- /dev/null
+++ b/core/lib/Drupal/Component/Plugin/PluginTypeInterface.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Component\Plugin\PluginTypeInterface.
+ */
+
+namespace Drupal\Component\Plugin;
+
+/**
+ * Defines an interface for accessing information about a plugin type and its available plugins.
+ */
+interface PluginTypeInterface {
+
+  /**
+   * Get the plugin type definition.
+   *
+   * @return array
+   *   The plugin type definition.
+   */
+  public function getDefinition();
+
+  /**
+   * Get the list of all plugins for a type.
+   *
+   * @return array
+   *   An array of plugin ids.
+   */
+  public function getPluginIds();
+
+  /**
+   * Get the plugin object for a particular plugin.
+   *
+   * @param string $id
+   *   A plugin id.
+   *
+   * @return Drupal\Component\Plugin\PluginInterface
+   *   The plugin object.
+   */
+  public function getPlugin($id);
+
+}
diff --git a/core/lib/Drupal/Core/Plugin/PluginType.php b/core/lib/Drupal/Core/Plugin/PluginType.php
new file mode 100644
index 0000000..9bede27
--- /dev/null
+++ b/core/lib/Drupal/Core/Plugin/PluginType.php
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\Core\Plugin\PluginType.
+ */
+
+namespace Drupal\Core\Plugin;
+use Drupal\Component\Plugin\PluginType as BasePluginType;
+
+/**
+ * Implements a class for plugin types whose definition and plugin list can be discovered from Drupal's Config system.
+ */
+class PluginType extends BasePluginType {
+
+  protected $scope;
+  protected $type;
+  protected $definition;
+  protected $pluginDefinitions = array();
+
+  public function __construct($scope, $type) {
+    $this->scope = $scope;
+    $this->type = $type;
+    $this->definition = config("plugin.type.$scope.$type")->get();
+  }
+
+  public function getPluginIds() {
+    $pluginIds = array();
+    $configPrefix = $this->getPluginConfigPrefix();
+    $configPrefixLength = strlen($configPrefix);
+    foreach (config_get_verified_storage_names_with_prefix($configPrefix) as $configName) {
+      $pluginIds[] = substr($configName, $configPrefixLength + 1);
+    }
+    return $pluginIds;
+  }
+
+  public function getPlugin($id) {
+    if (!isset($this->pluginDefinitions[$id])) {
+      $this->pluginDefinitions[$id] = config($this->getPluginConfigPrefix() . '.' . $id)->get();
+    }
+    return parent::getPlugin($id);
+  }
+
+  /**
+   * Helper function that gets the config prefix for plugins of this type.
+   */
+  protected function getPluginConfigPrefix() {
+    return !empty($this->definition['plugin']['config_prefix']) ? $this->definition['plugin']['config_prefix'] : "plugin.plugin.{$this->scope}.{$this->type}";
+  }
+}
