diff --git a/core/includes/common.inc b/core/includes/common.inc
index ff70536..7e2078d 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -398,7 +398,7 @@ function drupal_add_feed($url = NULL, $title = '') {
  */
 function drupal_get_feeds($delimiter = "\n") {
   $feeds = drupal_add_feed();
-  return implode($feeds, $delimiter);
+  return new Twig_Markup(implode($feeds, $delimiter), 'UTF-8');
 }
 
 /**
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 5402dae..8f85cda 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2042,7 +2042,7 @@ function template_preprocess_html(&$variables) {
 
   $variables['html_attributes'] = $page->getHtmlAttributes();
   $variables['attributes'] = $page->getBodyAttributes();
-  $variables['page'] = $page->getContent();
+  $variables['page'] = new Twig_Markup($page->getContent(), 'UTF-8');
 
   // Compile a list of classes that are going to be applied to the body element.
   // This allows advanced theming based on context (home page, node of certain type, etc.).
@@ -2252,7 +2252,7 @@ function template_preprocess_page(&$variables) {
   // @see menu_tree_page_data()
   $variables['breadcrumb'] = array(
     '#theme' => 'breadcrumb',
-    '#breadcrumb' => \Drupal::service('breadcrumb')->build(\Drupal::request()->attributes->all()),
+    '#breadcrumb' => new Twig_Markup(\Drupal::service('breadcrumb')->build(\Drupal::request()->attributes->all()), 'UTF-8'),
   );
 }
 
@@ -2468,7 +2468,7 @@ function template_preprocess_maintenance_page(&$variables) {
     $variables['attributes']['class'][] = 'sidebar-' . $variables['layout'];
   }
 
-  $variables['head'] = drupal_get_html_head();
+  $variables['head'] = new RenderWrapper('drupal_get_html_head');
 
   // While this code is used in the installer, the language module may not be
   // enabled yet (even maybe no database set up yet), but an RTL language
@@ -2527,7 +2527,7 @@ function template_preprocess_install_page(&$variables) {
  */
 function template_preprocess_region(&$variables) {
   // Create the $content variable that templates expect.
-  $variables['content'] = $variables['elements']['#children'];
+  $variables['content'] = new Twig_Markup($variables['elements']['#children'], 'UTF-8');
   $variables['region'] = $variables['elements']['#region'];
 
   $variables['attributes']['class'][] = 'region';
diff --git a/core/lib/Drupal/Core/CoreServiceProvider.php b/core/lib/Drupal/Core/CoreServiceProvider.php
index 098b165..7034eac 100644
--- a/core/lib/Drupal/Core/CoreServiceProvider.php
+++ b/core/lib/Drupal/Core/CoreServiceProvider.php
@@ -124,15 +124,12 @@ public static function registerTwig(ContainerBuilder $container) {
         // When in the installer, twig_cache must be FALSE until we know the
         // files folder is writable.
         'cache' => drupal_installation_attempted() ? FALSE : settings()->get('twig_cache', TRUE),
-        'base_template_class' => 'Drupal\Core\Template\TwigTemplate',
-        // @todo Remove in followup issue
-        // @see http://drupal.org/node/1712444.
-        'autoescape' => FALSE,
+        'autoescape' => TRUE,
         // @todo Remove in followup issue
         // @see http://drupal.org/node/1806538.
         'strict_variables' => FALSE,
-        'debug' => settings()->get('twig_debug', FALSE),
-        'auto_reload' => settings()->get('twig_auto_reload', NULL),
+        'debug' => TRUE,
+        'auto_reload' => TRUE,
       ))
       ->addMethodCall('addExtension', array(new Definition('Drupal\Core\Template\TwigExtension')))
       // @todo Figure out what to do about debugging functions.
diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php
index 9cd17b0..0a20859 100644
--- a/core/lib/Drupal/Core/Template/TwigExtension.php
+++ b/core/lib/Drupal/Core/Template/TwigExtension.php
@@ -17,18 +17,21 @@
  * @see \Drupal\Core\CoreServiceProvider
  */
 class TwigExtension extends \Twig_Extension {
+
+  /**
+   * {@inheritdoc}
+   */
   public function getFunctions() {
-    // @todo re-add unset => twig_unset if this is really needed
     return array(
       // @todo Remove URL function once http://drupal.org/node/1778610 is resolved.
       'url' => new \Twig_Function_Function('url'),
-      // These functions will receive a TwigReference object, if a render array is detected
-      'hide' => new TwigReferenceFunction('twig_hide'),
-      'render_var' => new TwigReferenceFunction('twig_render_var'),
-      'show' => new TwigReferenceFunction('twig_show'),
+      'render_var' => new \Twig_Function_Function('twig_render_var'),
     );
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public function getFilters() {
     return array(
       't' => new \Twig_Filter_Function('t'),
@@ -40,9 +43,14 @@ public function getFilters() {
       // @see TwigNodeTrans::compileString()
       'passthrough' => new \Twig_Filter_Function('twig_raw_filter'),
       'placeholder' => new \Twig_Filter_Function('twig_raw_filter'),
+      // @todo Consider renaming to 'exclude' or 'without'.
+      'hide' => new \Twig_Filter_Function('twig_hide'),
     );
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public function getNodeVisitors() {
     // The node visitor is needed to wrap all variables with
     // render_var -> twig_render_var() function.
@@ -51,16 +59,16 @@ public function getNodeVisitors() {
     );
   }
 
+  /**
+   * {@inheritdoc}
+   */
   public function getTokenParsers() {
     return array(
-      new TwigFunctionTokenParser('hide'),
-      new TwigFunctionTokenParser('show'),
       new TwigTransTokenParser(),
     );
   }
 
-  public function getName()
-  {
+  public function getName() {
     return 'drupal_core';
   }
 }
diff --git a/core/lib/Drupal/Core/Template/TwigFunctionTokenParser.php b/core/lib/Drupal/Core/Template/TwigFunctionTokenParser.php
deleted file mode 100644
index 2d123cc..0000000
--- a/core/lib/Drupal/Core/Template/TwigFunctionTokenParser.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\Core\Template\TwigFunctionTokenParser.
- */
-
-namespace Drupal\Core\Template;
-
-/**
- * A class that defines the Twig token parser for Drupal.
- *
- * The token parser converts a token stream created from template source
- * code into an Abstract Syntax Tree (AST).  The AST will later be compiled
- * into PHP code usable for runtime execution of the template.
- *
- * @see core\vendor\twig\twig\lib\Twig\TokenParser.php
- */
-class TwigFunctionTokenParser extends \Twig_TokenParser {
-
-  /**
-   * The name of tag. Can be 'hide' or 'show'.
-   *
-   * @var string
-   */
-  protected $tag;
-
-  /**
-   * Constructor for TwigFunctionTokenParser.
-   *
-   * Locally scope variables.
-   */
-  public function __construct($tag = 'hide') {
-    $this->tag = $tag;
-  }
-
-  /**
-   * Parses a token and returns a node.
-   *
-   * @param Twig_Token $token A Twig_Token instance.
-   *
-   * @return Twig_Node_Print A Twig_Node_Print instance.
-   */
-  public function parse(\Twig_Token $token) {
-    $lineno = $token->getLine();
-
-    $expr = $this->parser->getExpressionParser()->parseExpression();
-    $this->parser->getStream()->expect(\Twig_Token::BLOCK_END_TYPE);
-    return new \Twig_Node_Print(new \Twig_Node_Expression_Function($this->tag, new \Twig_Node(array($expr)), $lineno), $lineno);
-  }
-
-  /**
-   * Gets the tag name associated with this token parser.
-   *
-   * @return string The tag name
-   */
-  public function getTag() {
-    return $this->tag;
-  }
-}
diff --git a/core/lib/Drupal/Core/Template/TwigNodeVisitor.php b/core/lib/Drupal/Core/Template/TwigNodeVisitor.php
index 710faa0..b6cee84 100644
--- a/core/lib/Drupal/Core/Template/TwigNodeVisitor.php
+++ b/core/lib/Drupal/Core/Template/TwigNodeVisitor.php
@@ -19,74 +19,60 @@
 class TwigNodeVisitor implements \Twig_NodeVisitorInterface {
 
   /**
-   * TRUE when this node is a function getting arguments by reference.
-   *
-   * For example: 'hide' or 'render' are such functions.
-   *
-   * @var bool
-   */
-  protected $isReference = FALSE;
-
-  /**
-   * Implements Twig_NodeVisitorInterface::enterNode().
+   * {@inheritdoc}
    */
   function enterNode(\Twig_NodeInterface $node, \Twig_Environment $env) {
-   if ($node instanceof \Twig_Node_Expression_Function) {
-      $name = $node->getAttribute('name');
-      $func = $env->getFunction($name);
 
-      // Optimization: Do not support nested functions.
-      if ($this->isReference && $func instanceof \Twig_Function_Function) {
-        $this->isReference = FALSE;
-      }
-      if ($func instanceof TwigReferenceFunction) {
-        // We need to create a TwigReference
-        $this->isReference = TRUE;
-      }
-    }
-    if ($node instanceof \Twig_Node_Print) {
-       // Our injected render_var needs arguments passed by reference -- in case of render array
-      $this->isReference = TRUE;
-    }
+
+
+    // if ($node instanceof \Twig_Node_Expression_Function) {
+    //   $name = $node->getAttribute('name');
+    //   $func = $env->getFunction($name);
+
+    //   // Optimization: Do not support nested functions.
+    //   if ($this->isReference && $func instanceof \Twig_Function_Function) {
+    //     $this->isReference = FALSE;
+    //   }
+
+    // }
+    // if ($node instanceof \Twig_Node_Print) {
+    //    // Our injected render_var needs arguments passed by reference -- in case of render array
+    //   $this->isReference = TRUE;
+    // }
 
     return $node;
   }
-
   /**
-   * Implements Twig_NodeVisitorInterface::leaveNode().
-   *
-   * We use this to inject a call to render_var -> twig_render_var()
-   * before anything is printed.
-   *
-   * @see twig_render
+   * {@inheritdoc}
    */
   function leaveNode(\Twig_NodeInterface $node, \Twig_Environment $env) {
     if ($node instanceof \Twig_Node_Print) {
-      $this->isReference = FALSE;
-
       $class = get_class($node);
-      return new $class(
-        new \Twig_Node_Expression_Function('render_var', new \Twig_Node(array($node->getNode('expr'))), $node->getLine()),
-        $node->getLine()
-      );
-    }
-
-    if ($this->isReference) {
-      if ($node instanceof \Twig_Node_Expression_Name) {
-        $name = $node->getAttribute('name');
-        return new TwigNodeExpressionNameReference($name, $node->getLine());
+      $exp = $node->getNode('expr');
+      if ($exp instanceof \Twig_Node_Expression_Name) {
+        return new $class(
+          new \Twig_Node_Expression_Function('render_var', new \Twig_Node(array($exp)), $node->getLine()),
+          $node->getLine()
+        );
       }
-      elseif ($node instanceof \Twig_Function_Function) {
-        // Do something!
-        $this->isReference = FALSE;
+      elseif($exp->hasAttribute('type') && $exp->getAttribute('type') == 'array') {
+        return new $class(
+          new \Twig_Node_Expression_Function('render_var', new \Twig_Node(array($exp)), $node->getLine()),
+          $node->getLine()
+        );
       }
-    }
+      else {
+
 
+        return $node;
+      }
+
+    }
     return $node;
   }
 
   /**
-   * Implements Twig_NodeVisitorInterface::getPriority().
+   * {@inheritdoc}
    */
   function getPriority() {
     // We want to run before other NodeVisitors like Escape or Optimizer
diff --git a/core/lib/Drupal/Core/Template/TwigReference.php b/core/lib/Drupal/Core/Template/TwigReference.php
deleted file mode 100644
index 0b8b506..0000000
--- a/core/lib/Drupal/Core/Template/TwigReference.php
+++ /dev/null
@@ -1,131 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\Core\Template\TwigReference.
- */
-
-namespace Drupal\Core\Template;
-
-/**
- * A class used to pass variables by reference while they are used in twig.
- *
- * This is done by saving a reference to the original render array within a
- * TwigReference via the setReference() method like this:
- * @code
- * $obj = new TwigReference();
- * $obj->setReference($variable);
- * @endcode
- *
- * When a TwigReference is accessed via the offsetGet method the resulting
- * reference is again wrapped within a TwigReference. Therefore references to
- * render arrays within render arrays are also retained.
- *
- * To unwrap TwigReference objects the reference can be retrieved out of the
- * object by calling the getReference() method like this:
- * @code
- * $variable = &$obj->getReference();
- * @endcode
- * This allows render(), hide() and show() to access the original variable and
- * 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
- */
-class TwigReference extends \ArrayObject {
-
-  /**
-   * Holds an internal reference to the original array.
-   *
-   * @var array
-   */
-  protected $writableRef = array();
-
-  /**
-   * Constructs a \Drupal\Core\Template\TwigReference object.
-   *
-   * The argument to the constructor is ignored as it is not safe that this will
-   * always be a reference.
-   *
-   * To set a reference use:
-   * @code
-   * $obj = new TwigReference();
-   * $obj->setReference($variable);
-   * @endcode
-   *
-   * @param $array
-   *   The array parameter is ignored and not passed to the parent
-   */
-  public function __construct($array = NULL) {
-    parent::__construct();
-  }
-
-  /**
-   * Sets a reference in the internal storage.
-   *
-   * @param $array
-   *   The array to set as internal reference.
-   */
-  public function setReference(&$array) {
-    $this->exchangeArray($array);
-    $this->writableRef = &$array;
-  }
-
-  /**
-   * Gets a reference to the internal storage.
-   *
-   * Should be called like:
-   * @code
-   * $reference = &$obj->getReference();
-   * @endcode
-   *
-   * @return
-   *   Returns the stored internal reference.
-   */
-  public function &getReference() {
-    return $this->writableRef;
-  }
-
-  /**
-   * Sets offset in internal reference and internal storage to value.
-   *
-   * This is just for completeness, but should never be used, because
-   * twig cannot set properties and should not.
-   *
-   * @link http://php.net/manual/en/arrayaccess.offsetset.php
-   * @param mixed $offset
-   *   The offset to assign the value to.
-   * @param mixed $value
-   *   The value to set.
-   */
-  public function offsetSet($offset, $value) {
-    $this->writableRef[$offset] = $value;
-    parent::offsetSet($offset, $value);
-  }
-
-  /**
-   * Retrieves offset from internal reference.
-   *
-   * In case of a render array, it is wrapped again within a TwigReference
-   * object.
-   *
-   * @param mixed $offset
-   *   The offset to retrieve.
-   *
-   * @return mixed
-   *   Returns a TwigReference object wrapping the array if the retrieved offset
-   *   is a complex array (i.e. not an attribute). Else it returns the retrived
-   *   offset directly.
-   */
-  public function offsetGet($offset) {
-    if (!is_array($this->writableRef[$offset]) || $offset[0] == '#') {
-      return $this->writableRef[$offset];
-    }
-
-    // Wrap the returned array in a new TwigReference.
-    $x = clone $this; // clone is faster than new
-    $x->setReference($this->writableRef[$offset]);
-    return $x;
-  }
-}
diff --git a/core/lib/Drupal/Core/Template/TwigReferenceFunction.php b/core/lib/Drupal/Core/Template/TwigReferenceFunction.php
deleted file mode 100644
index 6ca4cbd..0000000
--- a/core/lib/Drupal/Core/Template/TwigReferenceFunction.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\Core\Template\TwigReferenceFunction.
- */
-
-namespace Drupal\Core\Template;
-
-/**
- * This class is used to create functions requiring references like 'hide'.
- */
-class TwigReferenceFunction extends \Twig_Function_Function {
-}
diff --git a/core/lib/Drupal/Core/Template/TwigReferenceFunctions.php b/core/lib/Drupal/Core/Template/TwigReferenceFunctions.php
deleted file mode 100644
index 4f584d1..0000000
--- a/core/lib/Drupal/Core/Template/TwigReferenceFunctions.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\Core\Template\TwigReferenceFunctions.
- */
-
-namespace Drupal\Core\Template;
-
-/**
- * A helper used to unwrap TwigReference objects transparently.
- *
- * This is providing a static magic function that makes it easier to unwrap
- * TwigReference objects and pass variables by reference to show(), hide() and
- * render().
- *
- * The problem is that twig passes variables only by value. The following is a
- * simplified version of the generated code by twig when the property "links" of
- * a render array stored in $content should be hidden:
- * @code
- * $_content_ = $content;
- * hide(getAttribute($_content_, 'links'));
- * @endcode
- * As hide() is operating on a copy of the original array the hidden property
- * is not set on the original $content variable.
- *
- * TwigReferenceFunctions can be used in combination with TwigReference to solve
- * this problem:
- * @code
- * // 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_ = getContextReference($content);
- *
- * Drupal\Core\Template\TwigReferenceFunctions::hide(
- *   getAttribute($_content_, 'links')
- * );
- * @endcode
- * A TwigReference object is passed to the __callStatic function of
- * TwigReferenceFunctions. The method unwraps the TwigReference and calls the
- * hide() method essentially with a reference to $content['links'].
- *
- * Therefore the hidden property is correctly set and a successive call to
- * render() will not render the content twice.
- *
- * @see TwigReference
- * @see TwigReferenceFunction
- * @see TwigFactory
- *
- */
-class TwigReferenceFunctions {
-
-  /**
-   * Magic function to call functions called from twig templates with a
-   * reference to the original variable.
-   *
-   * This checks if the array provided by value is containing a reference to
-   * the original version. If yes it replaces the argument with its reference.
-   *
-   * @param $name
-   *   The name of the function to call.
-   * @param $arguments
-   *   The arguments to process and pass to the called function.
-   *
-   * @return mixed
-   *   Returns the output of the called function.
-   *
-   * @see TwigReference
-  */
-  public static function __callStatic($name, $arguments) {
-    foreach ($arguments as $key => $val) {
-      if (is_object($val) && $val instanceof TwigReference) {
-        $arguments[$key] = &$val->getReference();
-      }
-    }
-
-    // Needed to pass by reference -- could also restrict to maximum one
-    // argument instead
-    $args = array();
-    foreach ($arguments as $key => &$arg) {
-      $args[$key] = &$arg;
-    }
-
-    return call_user_func_array($name, $args);
-  }
-}
diff --git a/core/lib/Drupal/Core/Template/TwigTemplate.php b/core/lib/Drupal/Core/Template/TwigTemplate.php
deleted file mode 100644
index cb2d91d..0000000
--- a/core/lib/Drupal/Core/Template/TwigTemplate.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\Core\Template\TwigTemplate.
- */
-
-namespace Drupal\Core\Template;
-
-/**
- * This is the base class for compiled Twig templates.
- */
-abstract class TwigTemplate extends \Twig_Template {
-
-  /**
-   * A class used to pass variables by reference while they are used in Twig.
-   */
-  protected $twig_reference = NULL;
-
-  /**
-   * List of the name of variables to be passed around as references.
-   *
-   * @var array
-   */
-  protected $is_reference = array();
-
-  /**
-   * List of the name of variables to be passed around by value.
-   *
-   * @var array
-   */
-  protected $is_no_reference = array();
-
-  /**
-   * @param array $context
-   *   The variables available to the template.
-   * @param $item
-   *   The name of the variable.
-   * @return mixed
-   *   The requested variable.
-   */
-  final protected function getContextReference(&$context, $item)
-  {
-    // Optimized version. NULL is a valid value for $context[$item], we only
-    // want to error if it hasn't been defined at all.
-    if (!isset($context[$item]) && !array_key_exists($item, $context)) {
-      // 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)));
-      trigger_error($msg->getMessage(), E_USER_WARNING);
-      return NULL;
-    }
-
-    // Return item instead of its reference inside a loop.
-    // @todo 'hide' and 'show' are not supported inside a loop for now.
-    // This should be a non-issue as soon as this lands:
-    // @see http://drupal.org/node/1922304
-    if (isset($context['_seq'])) {
-      return $context[$item];
-    }
-
-    // The first test also finds empty / null render arrays
-    if (!$context[$item] || isset($this->is_no_reference[$item])) {
-      return $context[$item];
-    }
-
-    if (isset($context['_references'][$item])) {
-      return $context['_references'][$item];
-    }
-
-    // @todo Check if this is a render array (existence of #theme?)
-    if ((!isset($this->is_reference[$item])) && ($context[$item] instanceof \TwigMarkup || !is_array($context[$item]))) {
-      $this->is_no_reference[$item] = TRUE;
-      return $context[$item];
-    }
-
-    if ($this->twig_reference == NULL) {
-      $this->twig_reference = new TwigReference();
-    }
-    $ref = clone $this->twig_reference; // clone is _much_ faster than new
-    $ref->setReference($context[$item]);
-
-    // Save that this is a reference
-    $context['_references'][$item] = $ref;
-    $this->is_reference[$item] = TRUE;
-
-    return $ref;
-  }
-}
diff --git a/core/modules/block/templates/block-list.html.twig b/core/modules/block/templates/block-list.html.twig
index 873d192..fb5ee44 100644
--- a/core/modules/block/templates/block-list.html.twig
+++ b/core/modules/block/templates/block-list.html.twig
@@ -13,10 +13,9 @@
  * @ingroup themeable
  */
 #}
-{% hide(form.place_blocks) %}
 <div class="layout-block-list clearfix">
   <div class="layout-region block-list-primary">
-    {{ form }}
+    {{ form|hide('place_blocks') }}
   </div>
   <div class="layout-region block-list-secondary">
     {{ form.place_blocks }}
diff --git a/core/modules/comment/templates/comment.html.twig b/core/modules/comment/templates/comment.html.twig
index 570448f..5e2b080 100644
--- a/core/modules/comment/templates/comment.html.twig
+++ b/core/modules/comment/templates/comment.html.twig
@@ -7,8 +7,7 @@
  * - author: Comment author. Can be a link or plain text.
  * - content: The content-related items for the comment display. Use
  *   {{ content }} to print them all, or print a subset such as
- *   {{ content.field_example }}. Use hide(content.field_example) to temporarily
- *   suppress the printing of a given element.
+ *   {{ content.field_example }}.
  * - created: Formatted date and time for when the comment was created.
  *   Preprocess functions can reformat it by calling format_date() with the
  *   desired parameters on the 'comment.created' variable.
@@ -93,8 +92,7 @@
 
   <div{{ content_attributes }}>
     {# We hide the links now so that we can render them later. #}
-    {% hide(content.links) %}
-    {{ content }}
+    {{ content|hide('links') }}
 
     {% if signature %}
       <div class="user-signature">
diff --git a/core/modules/node/templates/node-edit-form.html.twig b/core/modules/node/templates/node-edit-form.html.twig
index eee9ecc..510f0c0 100644
--- a/core/modules/node/templates/node-edit-form.html.twig
+++ b/core/modules/node/templates/node-edit-form.html.twig
@@ -15,11 +15,9 @@
  * @ingroup themeable
  */
 #}
-{% hide(form.advanced) %}
-{% hide(form.actions) %}
 <div class="layout-node-form clearfix">
   <div class="layout-region layout-region-node-main">
-    {{ form }}
+    {{ form|hide('advanced', 'actions') }}
   </div>
   <div class="layout-region layout-region-node-secondary">
     {{ form.advanced }}
diff --git a/core/modules/node/templates/node.html.twig b/core/modules/node/templates/node.html.twig
index 1f8c823..2099e3c 100644
--- a/core/modules/node/templates/node.html.twig
+++ b/core/modules/node/templates/node.html.twig
@@ -17,9 +17,7 @@
  *   - published: Whether the node is published.
  * - label: The title of the node.
  * - content: All node items. Use {{ content }} to print them all,
- *   or print a subset such as {{ content.field_example }}. Use
- *   {% hide(content.field_example) %} to temporarily suppress the printing
- *   of a given element.
+ *   or print a subset such as {{ content.field_example }}.
  * - user_picture: The node author's picture from user-picture.html.twig.
  * - date: Formatted creation date. Preprocess functions can reformat it by
  *   calling format_date() with the desired parameters on
@@ -94,8 +92,7 @@
 
   <div{{ content_attributes }}>
     {# We hide links now so that we can render them later. #}
-    {% hide(content.links) %}
-    {{ content }}
+    {{ content|hide('links') }}
   </div>
 
   {{ content.links }}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigReferenceObjectTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigReferenceObjectTest.php
deleted file mode 100644
index 88a4d22..0000000
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigReferenceObjectTest.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\system\Tests\Theme\TwigReferenceObjectTest.
- */
-
-namespace Drupal\system\Tests\Theme;
-
-/**
- * TwigReferenceObjectTest class.
- */
-class TwigReferenceObjectTest {
-  public function __construct($nid, $title) {
-    $this->nid = $nid;
-    $this->title = $title;
-  }
-}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigReferenceUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigReferenceUnitTest.php
deleted file mode 100644
index 0f9534e..0000000
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigReferenceUnitTest.php
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\system\Tests\Theme\TwigReferenceUnitTest.
- */
-
-namespace Drupal\system\Tests\Theme;
-
-use Drupal\simpletest\UnitTestBase;
-use Drupal\Core\Template\TwigReference;
-use Drupal\Core\Template\TwigReferenceFunctions;
-
-/**
- * Unit tests for TwigReference class.
- */
-class TwigReferenceUnitTest extends UnitTestBase {
-  public static function getInfo() {
-    return array(
-      'name' => 'Theme Twig References',
-      'description' => 'Tests TwigReference functions',
-      'group' => 'Theme',
-    );
-  }
-
-  function setUp() {
-    parent::setUp();
-    $this->variables = array(
-      'foo' => 'bar',
-      'baz' => array(
-        'foo' => '42',
-        'bar' => '23',
-      ),
-      'node' => new TwigReferenceObjectTest(
-        42,
-        'test node'
-      )
-    );
-  }
-
-  /**
-   * Test function for TwigReference class
-   */
-  function testTwigReference() {
-    // Create a new TwigReference wrapper
-    $wrapper = new TwigReference();
-    $wrapper->setReference($this->variables);
-
-    // Check that strings are returned as strings
-    $foo = $wrapper['foo'];
-    $this->assertEqual($foo, $this->variables['foo'], 'String returned from TwigReference is the same');
-    $this->assertTrue(is_string($foo), 'String returned from TwigReference is of type string');
-
-    // Check that arrays are wrapped again as TwigReference objects
-    $baz = $wrapper['baz'];
-    $this->assertTrue(is_object($baz), 'Array returned from TwigReference is of type object');
-    $this->assertTrue($baz instanceof TwigReference, 'Array returned from TwigReference is instance of TwigReference');
-
-    // Check that getReference is giving back a reference to the original array
-
-    $ref = &$baz->getReference();
-    $this->assertTrue(is_array($ref), 'getReference returns an array');
-
-    // Now modify $ref
-    $ref['#hidden'] = TRUE;
-    $this->assertEqual($ref['#hidden'], $this->variables['baz']['#hidden'], 'Property set on reference is passed to original array.');
-    $this->assertEqual($ref['#hidden'], $baz['#hidden'], 'Property set on reference is passed to wrapper.');
-
-    // Now modify $baz
-    $baz['hi'] = 'hello';
-
-    $this->assertEqual($baz['hi'], $this->variables['baz']['hi'], 'Property set on TwigReference object is passed to original array.');
-    $this->assertEqual($baz['hi'], $ref['hi'], 'Property set on TwigReference object is passed to reference.');
-
-    // Check that an object is passed through directly
-    $node = $wrapper['node'];
-    $this->assertTrue(is_object($node), 'Object returned from TwigReference is of type object');
-    $this->assertTrue($node instanceof TwigReferenceObjectTest, 'Object returned from TwigReference is instance of TwigReferenceObjectTest');
-  }
-
-  /**
-   * Test function for TwigReferenceFunctions class
-   */
-  function testTwigReferenceFunctions() {
-
-    // Create wrapper
-    $content = &$this->variables;
-
-    // Use twig nomenclature
-    $context['content'] = $content;
-
-    // Twig converts {{ hide(content.baz) }} to the following code
-
-    // This will have failed, because getAttribute returns a value and not a reference
-
-    try {
-      if (isset($context["content"])) {
-        $_content_ = $context["content"];
-      }
-      else {
-        $_content_ = NULL;
-      }
-      TwigReferenceFunctions::hide($this->getAttribute($_content_, "baz"));
-    }
-    catch (Exception $e) {
-      // Catch the critical warning that a value was passed by reference
-    }
-    $this->assertFalse(isset($content['baz']['#printed']), 'baz is not hidden in content after hide() via value');
-
-    // Now lets do the same with some TwigReference magic!
-
-    $content_wrapper = new TwigReference();
-    $content_wrapper->setReference($content);
-    $context['content'] = $content_wrapper;
-
-    // Twig converts {{ hide(content.baz) }} to the following code
-
-    // This will succeed, because getAttribute returns a value, but it is an object
-
-    if (isset($context["content"])) {
-      $_content_ = $context["content"];
-    }
-    else {
-      $_content_ = NULL;
-    }
-    TwigReferenceFunctions::hide($this->getAttribute($_content_, "baz"));
-
-    $this->assertTrue(isset($content['baz']['#printed']), 'baz is hidden in content after hide() via TwigReference object');
-
-    $type = TwigReferenceFunctions::gettype($this->getAttribute($_content_, "baz"));
-    $this->assertEqual($type, 'array', 'Type returned via TwigReferenceFunctions:: is an array.');
-
-    $type = gettype($this->getAttribute($_content_, "baz"));
-    $this->assertEqual($type, 'object', 'Type returned without TwigReferenceFunctions:: is an object.');
-  }
-
-  /**
-   *  Helper function to somehow simulate Twigs getAttribute function
-   */
-  public function getAttribute($array, $offset) {
-    if (isset($array[$offset])) {
-      return $array[$offset];
-    }
-
-    return NULL;
-  }
-}
diff --git a/core/modules/system/tests/modules/twig_extension_test/lib/Drupal/twig_extension_test/TwigExtension/TestExtension.php b/core/modules/system/tests/modules/twig_extension_test/lib/Drupal/twig_extension_test/TwigExtension/TestExtension.php
index 93da633..3c2b851 100644
--- a/core/modules/system/tests/modules/twig_extension_test/lib/Drupal/twig_extension_test/TwigExtension/TestExtension.php
+++ b/core/modules/system/tests/modules/twig_extension_test/lib/Drupal/twig_extension_test/TwigExtension/TestExtension.php
@@ -8,7 +8,6 @@
 namespace Drupal\twig_extension_test\TwigExtension;
 
 use Drupal\Core\Template\TwigExtension;
-use Drupal\Core\Template\TwigReferenceFunction;
 
 /**
  * A test Twig extension that adds a custom function and a custom filter.
diff --git a/core/modules/taxonomy/templates/taxonomy-term.html.twig b/core/modules/taxonomy/templates/taxonomy-term.html.twig
index a3986fa..13be3c9 100644
--- a/core/modules/taxonomy/templates/taxonomy-term.html.twig
+++ b/core/modules/taxonomy/templates/taxonomy-term.html.twig
@@ -8,11 +8,7 @@
  * - name: Name of the current term.
  * - content: Items for the content of the term (fields and description).
  *   Use 'content' to print them all, or print a subset such as
- *   'content.description'. Use the following code to temporarily suppress the
- *   printing of a given element:
- *   @code
- *   {% hide(content.description) %}
- *   @endcode
+ *   'content.description'.
  * - attributes: HTML attributes for the wrapper. The 'class' attribute
  *   contains the following classes by default:
  *   - taxonomy-term: The current template type, i.e. "theming hook".
diff --git a/core/themes/bartik/templates/comment.html.twig b/core/themes/bartik/templates/comment.html.twig
index ad03eb6..5e24380 100644
--- a/core/themes/bartik/templates/comment.html.twig
+++ b/core/themes/bartik/templates/comment.html.twig
@@ -7,8 +7,7 @@
  * - author: Comment author. Can be a link or plain text.
  * - content: The content-related items for the comment display. Use
  *   {{ content }} to print them all, or print a subset such as
- *   {{ content.field_example }}. Use hide(content.field_example) to temporarily
- *   suppress the printing of a given element.
+ *   {{ content.field_example }}.
  * - created: Formatted date and time for when the comment was created.
  *   Preprocess functions can reformat it by calling format_date() with the
  *   desired parameters on the 'comment.created' variable.
@@ -107,8 +106,7 @@
 
     <div{{ content_attributes }}>
       {# We hide the links now so that we can render them later. #}
-      {% hide(content.links) %}
-      {{ content }}
+      {{ content|hide('links') }}
     </div> <!-- /.content -->
 
     <footer class="comment-footer">
diff --git a/core/themes/bartik/templates/node.html.twig b/core/themes/bartik/templates/node.html.twig
index 6694211..9e2761a 100644
--- a/core/themes/bartik/templates/node.html.twig
+++ b/core/themes/bartik/templates/node.html.twig
@@ -17,9 +17,7 @@
  *   - published: Whether the node is published.
  * - label: The title of the node.
  * - content: All node items. Use {{ content }} to print them all,
- *   or print a subset such as {{ content.field_example }}. Use
- *   {% hide(content.field_example) %} to temporarily suppress the printing
- *   of a given element.
+ *   or print a subset such as {{ content.field_example }}.
  * - user_picture: The node author's picture from user-picture.html.twig.
  * - date: Formatted creation date. Preprocess functions can reformat it by
  *   calling format_date() with the desired parameters on
@@ -92,8 +90,7 @@
 
   <div class="content clearfix"{{ content_attributes }}>
     {# We hide links now so that we can render them later. #}
-    {% hide(content.links) %}
-    {{ content }}
+    {{ content|hide('links') }}
   </div>
 
   {% if content.links %}
diff --git a/core/themes/bartik/templates/page.html.twig b/core/themes/bartik/templates/page.html.twig
index 5602997..dbf4868 100644
--- a/core/themes/bartik/templates/page.html.twig
+++ b/core/themes/bartik/templates/page.html.twig
@@ -136,7 +136,7 @@
 
   {% if page.featured %}
     <aside id="featured"><div class="section clearfix">
-      {{ page.featured }}
+      {{ page.featured|raw }}
     </div></aside> <!-- /.section, /#featured -->
   {% endif %}
 
@@ -164,19 +164,19 @@
             {{ action_links }}
           </ul>
         {% endif %}
-      {{ page.content }}
+      {{ page.content|raw }}
       {{ feed_icons }}
     </section></main> <!-- /.section, /#content -->
 
     {% if page.sidebar_first %}
       <div id="sidebar-first" class="column sidebar"><aside class="section">
-        {{ page.sidebar_first }}
+        {{ page.sidebar_first|raw }}
       </aside></div><!-- /.section, /#sidebar-first -->
     {% endif %}
 
     {% if page.sidebar_second %}
       <div id="sidebar-second" class="column sidebar"><aside class="section">
-        {{ page.sidebar_second }}
+        {{ page.sidebar_second|raw }}
       </aside></div><!-- /.section, /#sidebar-second -->
     {% endif %}
 
@@ -184,9 +184,9 @@
 
   {% if page.triptych_first or page.triptych_middle or page.triptych_last %}
     <div id="triptych-wrapper"><aside id="triptych" class="clearfix">
-      {{ page.triptych_first }}
-      {{ page.triptych_middle }}
-      {{ page.triptych_last }}
+      {{ page.triptych_first|raw }}
+      {{ page.triptych_middle|raw }}
+      {{ page.triptych_last|raw }}
     </aside></div><!-- /#triptych, /#triptych-wrapper -->
   {% endif %}
 
@@ -194,10 +194,10 @@
 
     {% if page.footer_firstcolumn or page.footer_secondcolumn or page.footer_thirdcolumn or page.footer_fourthcolumn %}
       <div id="footer-columns" class="clearfix">
-        {{ page.footer_firstcolumn }}
-        {{ page.footer_secondcolumn }}
-        {{ page.footer_thirdcolumn }}
-        {{ page.footer_fourthcolumn }}
+        {{ page.footer_firstcolumn|raw }}
+        {{ page.footer_secondcolumn|raw }}
+        {{ page.footer_thirdcolumn|raw }}
+        {{ page.footer_fourthcolumn|raw }}
       </div><!-- /#footer-columns -->
     {% endif %}
 
diff --git a/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine
index 23e245c..c7644d3 100644
--- a/core/themes/engines/twig/twig.engine
+++ b/core/themes/engines/twig/twig.engine
@@ -4,7 +4,6 @@
  * @file
  * Handles integration of Twig templates with the Drupal theme system.
  */
-use Drupal\Core\Template\TwigReference;
 
 /**
  * Implements hook_theme().
@@ -93,13 +92,8 @@ function twig_render_template($template_file, $variables) {
  *   The rendered output or an Twig_Markup object.
  *
  * @see render
- * @see TwigNodeVisitor
  */
 function twig_render_var($arg) {
-  if ($arg instanceof TwigReference) {
-    $arg = &$arg->getReference();
-  }
-
   // Check for numeric zero.
   if ($arg === 0) {
     return 0;
@@ -110,7 +104,7 @@ function twig_render_var($arg) {
     return NULL;
   }
 
-  // Keep Twig_Markup objects intact to prepare for later autoescaping support
+  // Keep Twig_Markup objects intact to support autoescaping.
   if ($arg instanceOf Twig_Markup) {
     return $arg;
   }
@@ -121,37 +115,33 @@ function twig_render_var($arg) {
 
   if (is_object($arg)) {
     if (method_exists($arg, '__toString')) {
-      return (string) $arg;
+      return new Twig_Markup((string) $arg, 'UTF-8');
     }
     throw new Exception(t('Object of type "@class" cannot be printed.', array('@class' => get_class($arg))));
   }
 
   // This is a normal render array.
-  return render($arg);
+  return new Twig_Markup(render($arg), 'UTF-8');
 }
 
 /**
- * Wrapper around hide() that does not return the content.
+ * Sets a child's #printed property to TRUE to prevent it from rendering.
  *
- * @see hide
- */
-function twig_hide($element) {
-  if ($element instanceof TwigReference) {
-    $element = &$element->getReference();
-    hide($element);
-  }
-  // @todo Add warning in else case
-}
-
-/**
- * Wrapper around show() that does not return the content.
+ * @param TwigReference $element
+ *   The parent renderable array to hide the child items.
+ * @param string[] $args,...
+ *   The string keys of $element to prevent printing.
  *
- * @see show
+ * @return TwigReference
+ *   A TwigReference of a renderable array.
  */
-function twig_show($element) {
-  if ($element instanceof TwigReference) {
-    $element = &$element->getReference();
-    show($element);
+function twig_hide($element) {
+  $args = func_get_args();
+  unset($args[0]);
+  foreach ($args as $arg) {
+    if (isset($element[$arg])) {
+      $element[$arg]['#printed'] = TRUE;
+    }
   }
-  // @todo Add warning in else case
+  return $element;
 }
diff --git a/core/themes/seven/install-page.html.twig b/core/themes/seven/install-page.html.twig
index 1e9a1c2..47c87f6 100644
--- a/core/themes/seven/install-page.html.twig
+++ b/core/themes/seven/install-page.html.twig
@@ -39,7 +39,7 @@
 
   {% if sidebar_first %}
     <aside class="l-sidebar-first" role="complementary">
-      {{ sidebar_first }}
+      {{ sidebar_first|raw }}
     </aside>{# /.l-sidebar-first #}
   {% endif %}
 
@@ -48,12 +48,12 @@
       <h1>{{ title }}</h1>
     {% endif %}
     {{ messages }}
-    {{ content }}
+    {{ content|raw }}
   </main>
 
   {% if sidebar_second %}
     <aside class="l-sidebar-second" role="complementary">
-      {{ sidebar_second }}
+      {{ sidebar_second|raw }}
     </aside>{# /.l-sidebar-second #}
   {% endif %}
 
