diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 56e5f43..980d2cf 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -2412,7 +2412,7 @@ function drupal_container(Container $reset = NULL) {
   // which to reinitialize the stored objects, so a drupal_static_reset() call
   // would leave Drupal in a nonfunctional state.
   static $container = NULL;
-  if (isset($reset)) {
+  if (func_num_args()) {
     $container = $reset;
   }
   elseif (!isset($container)) {
diff --git a/core/lib/Drupal/Core/CoreBundle.php b/core/lib/Drupal/Core/CoreBundle.php
index f8e8691..fb2f13b 100644
--- a/core/lib/Drupal/Core/CoreBundle.php
+++ b/core/lib/Drupal/Core/CoreBundle.php
@@ -44,24 +44,6 @@ class CoreBundle extends Bundle
       ->addArgument(new Reference('request'))
       ->setScope('request');
 
-    // @todo Replace below lines with the commented out block below it when it's
-    //   performant to do so: http://drupal.org/node/1706064.
-    $dispatcher = $container->get('dispatcher');
-    $matcher = new \Drupal\Core\LegacyUrlMatcher();
-    $content_negotation = new \Drupal\Core\ContentNegotiation();
-    $dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\RouterListener($matcher));
-    $dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\ViewSubscriber($content_negotation));
-    $dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\AccessSubscriber());
-    $dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber());
-    $dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\PathSubscriber());
-    $dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\LegacyRequestSubscriber());
-    $dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\LegacyControllerSubscriber());
-    $dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\FinishResponseSubscriber());
-    $dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\RequestCloseSubscriber());
-    $dispatcher->addSubscriber(new \Drupal\Core\EventSubscriber\ConfigGlobalOverrideSubscriber());
-    $container->set('content_negotiation', $content_negotation);
-    $dispatcher->addSubscriber(\Drupal\Core\ExceptionController::getExceptionListener($container));
-    /*
     $container->register('matcher', 'Drupal\Core\LegacyUrlMatcher');
     $container->register('router_listener', 'Drupal\Core\EventSubscriber\RouterListener')
       ->addArgument(new Reference('matcher'))
@@ -86,7 +68,8 @@ class CoreBundle extends Bundle
       ->addTag('kernel.event_subscriber');
     $container->register('request_close_subscriber', 'Drupal\Core\EventSubscriber\RequestCloseSubscriber')
       ->addTag('kernel.event_subscriber');
-    $container->register('config_global_override_subscriber', '\Drupal\Core\EventSubscriber\ConfigGlobalOverrideSubscriber');
+    $container->register('config_global_override_subscriber', 'Drupal\Core\EventSubscriber\ConfigGlobalOverrideSubscriber')
+      ->addTag('kernel.event_subscriber');
     $container->register('database', 'Drupal\Core\Database\Connection')
       ->setFactoryClass('Drupal\Core\Database\Database')
       ->setFactoryMethod('getConnection')
@@ -103,6 +86,5 @@ class CoreBundle extends Bundle
 
     // Add a compiler pass for registering event subscribers.
     $container->addCompilerPass(new RegisterKernelListenersPass(), PassConfig::TYPE_AFTER_REMOVING);
-    */
   }
 }
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 869d4ee..d7a126a 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -12,6 +12,7 @@ use Symfony\Component\HttpKernel\Kernel;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Symfony\Component\Config\Loader\LoaderInterface;
 use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
+use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
 
 /**
  * The DrupalKernel class is the core of Drupal itself.
@@ -61,11 +62,19 @@ class DrupalKernel extends Kernel {
    * Initializes the service container.
    */
   protected function initializeContainer() {
-    // @todo We should be compiling the container and dumping to php so we don't
-    //   have to recompile every time. There is a separate issue for this, see
-    //   http://drupal.org/node/1668892.
-    $this->container = $this->buildContainer();
+    $class = $this->getContainerClass();
+    $cache_file = $class . '.php';
+
+    if (!drupal_php_storage('service_container')->exists($cache_file)) {
+      $container = $this->buildContainer();
+      $this->dumpDrupalContainer($cache_file, $container, $class, $this->getContainerBaseClass());
+    }
+
+    drupal_php_storage('service_container')->load($cache_file);
+
+    $this->container = new $class();
     $this->container->set('kernel', $this);
+
     drupal_container($this->container);
   }
 
@@ -84,10 +93,7 @@ class DrupalKernel extends Kernel {
     foreach ($this->bundles as $bundle) {
       $bundle->build($container);
     }
-
-    // @todo Compile the container: http://drupal.org/node/1706064.
-    //$container->compile();
-
+    $container->compile();
     return $container;
   }
 
@@ -101,6 +107,30 @@ class DrupalKernel extends Kernel {
   }
 
   /**
+   * Dumps the service container to PHP code in the config directory.
+   *
+   * This method is based on the dumpContinaer method in the parent class, but
+   * that method is reliant on the Config component which we do not use here.
+   *
+   * @param string           $cache_file     The full filename to write to.
+   * @param ContainerBuilder $container The service container
+   * @param string           $class     The name of the class to generate
+   * @param string           $baseClass The name of the container's base class
+   */
+  protected function dumpDrupalContainer($cache_file, ContainerBuilder $container, $class, $baseClass)
+  {
+    // cache the container
+    $dumper = new PhpDumper($container);
+    $content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass));
+
+    if (!$this->debug) {
+      $content = self::stripComments($content);
+    }
+
+    drupal_php_storage('service_container')->save($cache_file, $content);
+  }
+
+  /**
    * Overrides and eliminates this method from the parent class. Do not use.
    *
    * This method is part of the KernelInterface interface, but takes an object
diff --git a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
index 8065349..e341e46 100644
--- a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\Core\EventSubscriber;
 
+use Drupal\Core\Language\LanguageManager;
 use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
 use Symfony\Component\HttpKernel\KernelEvents;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -16,6 +17,12 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  */
 class FinishResponseSubscriber implements EventSubscriberInterface {
 
+  protected $language_manager;
+
+  public function __construct(LanguageManager $language_manager) {
+    $this->language_manager = $language_manager;
+  }
+
   /**
    * Sets extra headers on successful responses.
    *
@@ -30,10 +37,7 @@ class FinishResponseSubscriber implements EventSubscriberInterface {
     $response->headers->set('X-UA-Compatible', 'IE=edge,chrome=1', false);
 
     // Set the Content-language header.
-    // @todo Receive the LanguageManager object as a constructor argument when
-    //   the dependency injection container allows for it performantly:
-    //   http://drupal.org/node/1706064.
-    $response->headers->set('Content-language', language(LANGUAGE_TYPE_INTERFACE)->langcode);
+    $response->headers->set('Content-language', $this->language_manager->getLanguage(LANGUAGE_TYPE_INTERFACE)->langcode);
 
     // Because pages are highly dynamic, set the last-modified time to now
     // since the page is in fact being regenerated right now.
diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 25139e6..a6ffe62 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -670,6 +670,8 @@ abstract class WebTestBase extends TestBase {
     // container in drupal_container(). Drupal\simpletest\TestBase::tearDown()
     // restores the original container.
     // @see Drupal\Core\DrupalKernel::initializeContainer()
+    drupal_container(NULL);
+    drupal_container();
     $this->kernel = new DrupalKernel('testing', FALSE);
     // Booting the kernel is necessary to initialize the new DIC. While
     // normally the kernel gets booted on demand in
diff --git a/core/modules/system/tests/modules/bundle_test/lib/Drupal/bundle_test/BundleTestBundle.php b/core/modules/system/tests/modules/bundle_test/lib/Drupal/bundle_test/BundleTestBundle.php
index 768a1b0..c124007 100644
--- a/core/modules/system/tests/modules/bundle_test/lib/Drupal/bundle_test/BundleTestBundle.php
+++ b/core/modules/system/tests/modules/bundle_test/lib/Drupal/bundle_test/BundleTestBundle.php
@@ -20,9 +20,5 @@ class BundleTestBundle extends Bundle
   public function build(ContainerBuilder $container) {
     $container->register('bundle_test_class', 'Drupal\bundle_test\TestClass')
       ->addTag('kernel.event_subscriber');
-
-    // @todo Remove when the 'kernel.event_subscriber' tag above is made to
-    //   work: http://drupal.org/node/1706064.
-    $container->get('dispatcher')->addSubscriber($container->get('bundle_test_class'));
   }
 }
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 62107ab..c5eb216 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -479,7 +479,7 @@ function simpletest_script_cleanup($test_id, $test_class, $exitcode) {
     // simpletest_clean_temporary_directories() cannot be used here, since it
     // would also delete file directories of other tests that are potentially
     // running concurrently.
-    file_unmanaged_delete_recursive($test_directory);
+    file_unmanaged_delete_recursive($test_directory, array('Drupal\simpletest\TestBase', 'filePreDeleteCallback'));
     $messages[] = "- Removed test files directory.";
   }
 
