diff --git a/core/lib/Drupal/Core/Template/TwigReference.php b/core/lib/Drupal/Core/Template/TwigReference.php
index 0679c38..0b8b506 100644
--- a/core/lib/Drupal/Core/Template/TwigReference.php
+++ b/core/lib/Drupal/Core/Template/TwigReference.php
@@ -30,8 +30,8 @@
  * change it. The process of unwrapping and passing by reference to this
  * functions is done transparently by the TwigReferenceFunctions helper class.
  *
+ * @see TwigReferenceFunction
  * @see TwigReferenceFunctions
- * @see twig_convert_to_reference
  */
 class TwigReference extends \ArrayObject {
 
diff --git a/core/lib/Drupal/Core/Template/TwigReferenceFunctions.php b/core/lib/Drupal/Core/Template/TwigReferenceFunctions.php
index e3b1a84..bb7ea1d 100644
--- a/core/lib/Drupal/Core/Template/TwigReferenceFunctions.php
+++ b/core/lib/Drupal/Core/Template/TwigReferenceFunctions.php
@@ -28,13 +28,18 @@
  * TwigReferenceFunctions can be used in combination with TwigReference to solve
  * this problem:
  * @code
- * // Before calling the twig render function
- * $obj = new Drupal\Core\Template\TwigReference();
- * $obj->setReference($content);
+ * // Internally getContextReference returns the array wrapped in a
+ * // TwigReference if certain criteria are met
+ * function getContextReference(&$content) {
+ *   $obj = new Drupal\Core\Template\TwigReference();
+ *   $obj->setReference($content);
+ *   return $obj;
+ * }
  *
  * // [...]
  * // Simplified, generated twig code
- * $_content_ = $obj;
+ * $_content_ = getContextReference($content);
+ *
  * Drupal\Core\Template\TwigReferenceFunctions::hide(
  *   getAttribute($_content_, 'links')
  * );
@@ -47,7 +52,7 @@
  * render() will not render the content twice.
  *
  * @see TwigReference
- * @see twig_convert_to_reference
+ * @see TwigReferenceFunction
  * @see TwigFactory
  *
  */
@@ -69,7 +74,6 @@ class TwigReferenceFunctions {
    *   Returns the output of the called function.
    *
    * @see TwigReference
-   * @see twig_convert_to_reference()
   */
   public static function __callStatic($name, $arguments) {
     foreach ($arguments as $key => $val) {
diff --git a/core/lib/Drupal/Core/Template/TwigTemplate.php b/core/lib/Drupal/Core/Template/TwigTemplate.php
index e47e9f2..b23892c 100644
--- a/core/lib/Drupal/Core/Template/TwigTemplate.php
+++ b/core/lib/Drupal/Core/Template/TwigTemplate.php
@@ -26,6 +26,11 @@
   {
     // Optimized version
     if (!isset($context[$item])) {
+      // We don't want to throw an exception, but issue a warning instead.
+      // This is the easiest way to do so.
+      // @todo Decide based on prod vs. dev setting
+      $msg = new \Twig_Error(t('@item could not be found in _context.', array('@item' => $item)));
+      drupal_set_message($msg->getMessage(), 'warning');
       return null;
     }
 
diff --git a/core/modules/system/templates/datetime.twig b/core/modules/system/templates/datetime.twig
index a74aeac..b6c6f21 100644
--- a/core/modules/system/templates/datetime.twig
+++ b/core/modules/system/templates/datetime.twig
@@ -28,4 +28,5 @@
  * @see http://www.w3.org/TR/html5-author/the-time-element.html#attr-time-datetime
  */
 #}
-<time class="{{ attributes.class }}" {{ attributes }}>{{ html?text:(text|e) }}</time>
+{# @todo Revisit this once autoescape is enabled #}
+<time class="{{ attributes.class }}" {{ attributes }}>{{ html ? text : (text|escape) }}</time>
diff --git a/core/modules/system/tests/themes/test_theme_twig/template.php b/core/modules/system/tests/themes/test_theme_twig/template.php
index 8275818..a4abe2d 100644
--- a/core/modules/system/tests/themes/test_theme_twig/template.php
+++ b/core/modules/system/tests/themes/test_theme_twig/template.php
@@ -1,19 +1,2 @@
 <?php
 
-/**
- * Tests a theme overriding a suggestion of a base theme hook.
- */
-function test_theme_theme_test__suggestion($variables) {
-  return 'Theme hook implementor=test_theme_theme_test__suggestion(). Foo=' . $variables['foo'];
-}
-
-/**
- * Tests a theme implementing an alter hook.
- *
- * The confusing function name here is due to this being an implementation of
- * the alter hook invoked when the 'theme_test' module calls
- * drupal_alter('theme_test_alter').
- */
-function test_theme_theme_test_alter_alter(&$data) {
-  $data = 'test_theme_theme_test_alter_alter was invoked';
-}
diff --git a/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine
index 6d04f6f..abc4407 100644
--- a/core/themes/engines/twig/twig.engine
+++ b/core/themes/engines/twig/twig.engine
@@ -36,10 +36,6 @@ function twig_init($template) {
  * This retrieves the Twig_Environment from the Drupal Injection container and
  * renders the template.
  *
- * All complex variables that are no attributes are converted
- * into TwigReference ArrayObjects that allow passing of arrays
- * by reference within twig.
- *
  * @param $template_file
  *   The filename of the template to render.
  * @param $variables
@@ -47,12 +43,9 @@ function twig_init($template) {
  *
  * @return
  *   The output generated by the template.
- *
- * @see twig_convert_to_reference
  */
 function twig_render_template($template_file, $variables) {
   $variables['_references']=array();
-  $variables['_no_references']=array();
   return drupal_container()->get('twig')->loadTemplate($template_file)->render($variables);
 }
 
