diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index c962571..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,82 +0,0 @@
-# @file
-# .travis.yml - Drupal for Travis CI Integration
-#
-# Based for simpletest upon:
-#   https://github.com/sonnym/travis-ci-drupal-module-example
-
-language: php
-
-php:
-  - 5.3
-  - 5.4
-  - 5.5
-  - 5.6
-  - hhvm
-
-matrix:
-  fast_finish: true
-  allow_failures:
-    - php: hhvm
-
-env:
-  global:
-    # add composer's global bin directory to the path
-    # see: https://github.com/drush-ops/drush#install---composer
-    - PATH="$PATH:$HOME/.composer/vendor/bin"
-
-    # Drupal specific vars.
-    - DRUPAL_TI_MODULE_NAME="render_cache"
-    - DRUPAL_TI_DB="drupal_travis_db"
-    - DRUPAL_TI_DB_URL="mysql://root:@127.0.0.1/drupal_travis_db"
-    # Note: Do not add a trailing slash here.
-    - DRUPAL_TI_WEBSERVER_URL="http://127.0.0.1"
-    - DRUPAL_TI_WEBSERVER_PORT="8080"
-
-    # Simpletest specific commandline arguments.
-    - DRUPAL_TI_SIMPLETEST_ARGS="--verbose --color --concurrency 4 --url $DRUPAL_TI_WEBSERVER_URL:$DRUPAL_TI_WEBSERVER_PORT $DRUPAL_TI_MODULE_NAME"
-
-    # PHPUnit specific commandline arguments.
-    - DRUPAL_TI_PHPUNIT_ARGS=""
-
-    # Code coverage via coveralls.io
-    - DRUPAL_TI_COVERAGE="satooshi/php-coveralls:0.6.*"
-    # This needs to match your .coveralls.yml file.
-    - DRUPAL_TI_COVERAGE_FILE="build/logs/clover.xml"
-
-    # Debug options
-    #- DRUPAL_TI_DEBUG="-x -v"
-
-  matrix:
-    - DRUPAL_TI_RUNNERS="phpunit"
-    - DRUPAL_TI_RUNNERS="phpunit simpletest"
-
-mysql:
-  database: drupal_travis_db
-  username: root
-  encoding: utf8
-
-before_install:
-  - cd ./tests
-  - composer global require "lionsad/drupal_ti:dev-master"
-  - drupal-ti before_install
-
-install:
-  - drupal-ti install
-
-before_script:
-  - drupal-ti before_script
-
-script:
-  - drupal-ti script
-
-after_script:
-  - drupal-ti after_script
-
-notifications:
-  email: false
-  webhooks:
-    urls:
-      - https://webhooks.gitter.im/e/a891f7433344fc8ceb65
-    on_success: always
-    on_failure: always
-    on_start: false
diff --git a/README.md b/README.md
deleted file mode 100644
index 1e75651..0000000
--- a/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-render_cache
-============
-
-Render Cache Module on drupal.org - used for development and automated testing via travis
-
-[![Build Status](https://travis-ci.org/LionsAd/render_cache.svg?branch=7.x-2.x)](https://travis-ci.org/LionsAd/render_cache)
-[![Coverage Status](https://coveralls.io/repos/LionsAd/render_cache/badge.png?branch=7.x-2.x)](https://coveralls.io/r/LionsAd/render_cache?branch=7.x-2.x)
-[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/LionsAd/render_cache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
diff --git a/includes/drupal_render_8.inc b/includes/drupal_render_8.inc
deleted file mode 100644
index 729ee38..0000000
--- a/includes/drupal_render_8.inc
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-/**
- * @file 
- * A straight port of Drupal 8 render functions for advanced render caching.
- */
-
-if (!variable_get('render_cache_drupal_8_render_defined', FALSE)) {
-
-/**
- * Generates a render cache placeholder.
- *
- * This is used by drupal_pre_render_render_cache_placeholder() to generate
- * placeholders, but should also be called by #post_render_cache callbacks that
- * want to replace the placeholder with the final markup.
- *
- * @param string $callback
- *   The #post_render_cache callback that will replace the placeholder with its
- *   eventual markup.
- * @param array $context
- *   An array providing context for the #post_render_cache callback. This array
- *   will be altered to provide a 'token' key/value pair, if not already
- *   provided, to uniquely identify the generated placeholder.
- *
- * @return string
- *   The generated placeholder HTML.
- *
- * @throws \Exception
- *
- * @see drupal_render_cache_get()
- */
-function drupal_render_cache_generate_placeholder($callback, array &$context) {
-  if (!is_callable($callback)) {
-    throw new Exception(t('$callable must be a callable function or of the form service_id:method.'));
-  }
-
-  // Generate a unique token if one is not already provided.
-  $context += array(
-    'token' => base64_encode(drupal_random_bytes(55)),
-  );
-
-  return '<drupal-render-cache-placeholder callback="' . $callback . '" token="' . $context['token'] . '"></drupal-render-cache-placeholder>';
-}
-
-/**
- * Processes #post_render_cache callbacks.
- *
- * #post_render_cache callbacks may modify:
- * - #markup: to replace placeholders
- * - #attached: to add libraries or JavaScript settings
- *
- * Note that in either of these cases, #post_render_cache callbacks are
- * implicitly idempotent: a placeholder that has been replaced can't be replaced
- * again, and duplicate attachments are ignored.
- *
- * @param array &$elements
- *   The structured array describing the data being rendered.
- *
- * @see drupal_render()
- * @see drupal_render_collect_post_render_cache
- */
-function _drupal_render_process_post_render_cache(array &$elements) {
-  if (isset($elements['#post_render_cache'])) {
-    // Call all #post_render_cache callbacks, passing the provided context.
-    foreach (array_keys($elements['#post_render_cache']) as $callback) {
-      foreach ($elements['#post_render_cache'][$callback] as $context) {
-        $elements = call_user_func_array($callback, array($elements, $context));
-      }
-    }
-    // Make sure that any attachments added in #post_render_cache callbacks are
-    // also executed.
-    if (isset($elements['#attached'])) {
-      drupal_process_attached($elements);
-    }
-  }
-}
-
-}
diff --git a/lib/Drupal/Core/Cache/Cache.php b/lib/Drupal/Core/Cache/Cache.php
deleted file mode 100644
index 4428093..0000000
--- a/lib/Drupal/Core/Cache/Cache.php
+++ /dev/null
@@ -1,176 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Cache\Cache.
- */
-
-namespace Drupal\Core\Cache;
-
-use Drupal\Core\Database\Query\SelectInterface;
-
-/**
- * Helper methods for cache.
- *
- * @ingroup cache
- */
-class Cache {
-
-  /**
-   * Indicates that the item should never be removed unless explicitly deleted.
-   */
-  const PERMANENT = CacheBackendInterface::CACHE_PERMANENT;
-
-  /**
-   * Merges arrays of cache tags and removes duplicates.
-   *
-   * The cache tags array is returned in a format that is valid for
-   * \Drupal\Core\Cache\CacheBackendInterface::set().
-   *
-   * When caching elements, it is necessary to collect all cache tags into a
-   * single array, from both the element itself and all child elements. This
-   * allows items to be invalidated based on all tags attached to the content
-   * they're constituted from.
-   *
-   * @param string[] …
-   *   Arrays of cache tags to merge.
-   *
-   * @return string[]
-   *   The merged array of cache tags.
-   */
-  public static function mergeTags() {
-    $cache_tag_arrays = func_get_args();
-    $cache_tags = array();
-    foreach ($cache_tag_arrays as $tags) {
-      static::validateTags($tags);
-      $cache_tags = array_merge($cache_tags, $tags);
-    }
-    $cache_tags = array_unique($cache_tags);
-    sort($cache_tags);
-    return $cache_tags;
-  }
-
-  /**
-   * Validates an array of cache tags.
-   *
-   * Can be called before using cache tags in operations, to ensure validity.
-   *
-   * @param string[] $tags
-   *   An array of cache tags.
-   *
-   * @throws \LogicException
-   */
-  public static function validateTags(array $tags) {
-    if (empty($tags)) {
-      return;
-    }
-    foreach ($tags as $value) {
-      if (!is_string($value)) {
-        throw new \LogicException('Cache tags must be strings, ' . gettype($value) . ' given.');
-      }
-    }
-  }
-
-  /**
-   * Build an array of cache tags from a given prefix and an array of suffixes.
-   *
-   * Each suffix will be converted to a cache tag by appending it to the prefix,
-   * with a colon between them.
-   *
-   * @param string $prefix
-   *   A prefix string.
-   * @param array $suffixes
-   *   An array of suffixes. Will be cast to strings.
-   *
-   * @return string[]
-   *   An array of cache tags.
-   */
-  public static function buildTags($prefix, array $suffixes) {
-    $tags = array();
-    foreach ($suffixes as $suffix) {
-      $tags[] = $prefix . ':' . $suffix;
-    }
-    return $tags;
-  }
-
-  /**
-   * Deletes items from all bins with any of the specified tags.
-   *
-   * Many sites have more than one active cache backend, and each backend may
-   * use a different strategy for storing tags against cache items, and
-   * deleting cache items associated with a given tag.
-   *
-   * When deleting a given list of tags, we iterate over each cache backend, and
-   * and call deleteTags() on each.
-   *
-   * @param string[] $tags
-   *   The list of tags to delete cache items for.
-   */
-  public static function deleteTags(array $tags) {
-    static::validateTags($tags);
-    foreach (static::getBins() as $cache_backend) {
-      $cache_backend->deleteTags($tags);
-    }
-  }
-
-  /**
-   * Marks cache items from all bins with any of the specified tags as invalid.
-   *
-   * Many sites have more than one active cache backend, and each backend my use
-   * a different strategy for storing tags against cache items, and invalidating
-   * cache items associated with a given tag.
-   *
-   * When invalidating a given list of tags, we iterate over each cache backend,
-   * and call invalidateTags() on each.
-   *
-   * @param string[] $tags
-   *   The list of tags to invalidate cache items for.
-   */
-  public static function invalidateTags(array $tags) {
-    static::validateTags($tags);
-    foreach (static::getBins() as $cache_backend) {
-      $cache_backend->invalidateTags($tags);
-    }
-  }
-
-  /**
-   * Gets all cache bin services.
-   *
-   * @return array
-   *  An array of cache backend objects keyed by cache bins.
-   */
-  public static function getBins() {
-    $bins = array();
-    $container = \Drupal::getContainer();
-    foreach ($container->getParameter('cache_bins') as $service_id => $bin) {
-      $bins[$bin] = $container->get($service_id);
-    }
-    return $bins;
-  }
-
-  /**
-   * Generates a hash from a query object, to be used as part of the cache key.
-   *
-   * This smart caching strategy saves Drupal from querying and rendering to
-   * HTML when the underlying query is unchanged.
-   *
-   * Expensive queries should use the query builder to create the query and then
-   * call this function. Executing the query and formatting results should
-   * happen in a #pre_render callback.
-   *
-   * @param \Drupal\Core\Database\Query\SelectInterface $query
-   *   A select query object.
-   *
-   * @return string
-   *   A hash of the query arguments.
-   */
-/*
-// Commented out due to SelectInterface not available in D7.
-  public static function keyFromQuery(SelectInterface $query) {
-    $query->preExecute();
-    $keys = array((string) $query, $query->getArguments());
-    return hash('sha256', serialize($keys));
-  }
-*/
-
-}
diff --git a/lib/Drupal/Core/Cache/CacheBackendInterface.php b/lib/Drupal/Core/Cache/CacheBackendInterface.php
deleted file mode 100644
index 753e6a3..0000000
--- a/lib/Drupal/Core/Cache/CacheBackendInterface.php
+++ /dev/null
@@ -1,266 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\Core\Cache\CacheBackendInterface.
- */
-
-namespace Drupal\Core\Cache;
-
-/**
- * Defines an interface for cache implementations.
- *
- * All cache implementations have to implement this interface.
- * Drupal\Core\Cache\DatabaseBackend provides the default implementation, which
- * can be consulted as an example.
- *
- * @ingroup cache
- */
-interface CacheBackendInterface {
-
-  /**
-   * Indicates that the item should never be removed unless explicitly deleted.
-   */
-  const CACHE_PERMANENT = -1;
-
-  /**
-   * Returns data from the persistent cache.
-   *
-   * @param string $cid
-   *   The cache ID of the data to retrieve.
-   * @param bool $allow_invalid
-   *   (optional) If TRUE, a cache item may be returned even if it is expired or
-   *   has been invalidated. Such items may sometimes be preferred, if the
-   *   alternative is recalculating the value stored in the cache, especially
-   *   if another concurrent request is already recalculating the same value.
-   *   The "valid" property of the returned object indicates whether the item is
-   *   valid or not. Defaults to FALSE.
-   *
-   * @return object|false
-   *   The cache item or FALSE on failure.
-   *
-   * @see \Drupal\Core\Cache\CacheBackendInterface::getMultiple()
-   */
-  public function get($cid, $allow_invalid = FALSE);
-
-  /**
-   * Returns data from the persistent cache when given an array of cache IDs.
-   *
-   * @param array $cids
-   *   An array of cache IDs for the data to retrieve. This is passed by
-   *   reference, and will have the IDs successfully returned from cache
-   *   removed.
-   * @param bool $allow_invalid
-   *   (optional) If TRUE, cache items may be returned even if they have expired
-   *   or been invalidated. Such items may sometimes be preferred, if the
-   *   alternative is recalculating the value stored in the cache, especially
-   *   if another concurrent thread is already recalculating the same value. The
-   *   "valid" property of the returned objects indicates whether the items are
-   *   valid or not. Defaults to FALSE.
-   *
-   * @return array
-   *   An array of cache item objects indexed by cache ID.
-   *
-   * @see \Drupal\Core\Cache\CacheBackendInterface::get()
-   */
-  public function getMultiple(&$cids, $allow_invalid = FALSE);
-
-  /**
-   * Stores data in the persistent cache.
-   *
-   * Core cache implementations set the created time on cache item with
-   * microtime(TRUE) rather than REQUEST_TIME_FLOAT, because the created time
-   * of cache items should match when they are created, not when the request
-   * started. Apart from being more accurate, this increases the chance an
-   * item will legitimately be considered valid.
-   *
-   * @param string $cid
-   *   The cache ID of the data to store.
-   * @param mixed $data
-   *   The data to store in the cache.
-   *   Some storage engines only allow objects up to a maximum of 1MB in size to
-   *   be stored by default. When caching large arrays or similar, take care to
-   *   ensure $data does not exceed this size.
-   * @param int $expire
-   *   One of the following values:
-   *   - CacheBackendInterface::CACHE_PERMANENT: Indicates that the item should
-   *     not be removed unless it is deleted explicitly.
-   *   - A Unix timestamp: Indicates that the item will be considered invalid
-   *     after this time, i.e. it will not be returned by get() unless
-   *     $allow_invalid has been set to TRUE. When the item has expired, it may
-   *     be permanently deleted by the garbage collector at any time.
-   * @param array $tags
-   *   An array of tags to be stored with the cache item. These should normally
-   *   identify objects used to build the cache item, which should trigger
-   *   cache invalidation when updated. For example if a cached item represents
-   *   a node, both the node ID and the author's user ID might be passed in as
-   *   tags. For example array('node' => array(123), 'user' => array(92)).
-   *
-   * @see \Drupal\Core\Cache\CacheBackendInterface::get()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::getMultiple()
-   */
-  public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = array());
-
-  /**
-   * Store multiple items in the persistent cache.
-   *
-   * @param array $items
-   *   An array of cache items, keyed by cid. In the form:
-   *   @code
-   *   $items = array(
-   *     $cid => array(
-   *       // Required, will be automatically serialized if not a string.
-   *       'data' => $data,
-   *       // Optional, defaults to CacheBackendInterface::CACHE_PERMANENT.
-   *       'expire' => CacheBackendInterface::CACHE_PERMANENT,
-   *       // (optional) The cache tags for this item, see CacheBackendInterface::set().
-   *       'tags' => array(),
-   *     ),
-   *   );
-   *   @endcode
-   */
-  public function setMultiple(array $items);
-
-  /**
-   * Deletes an item from the cache.
-   *
-   * If the cache item is being deleted because it is no longer "fresh", you may
-   * consider using invalidate() instead. This allows callers to retrieve the
-   * invalid item by calling get() with $allow_invalid set to TRUE. In some cases
-   * an invalid item may be acceptable rather than having to rebuild the cache.
-   *
-   * @param string $cid
-   *   The cache ID to delete.
-   *
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidate()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteMultiple()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteTags()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteAll()
-   */
-  public function delete($cid);
-
-  /**
-   * Deletes multiple items from the cache.
-   *
-   * If the cache items are being deleted because they are no longer "fresh",
-   * you may consider using invalidateMultiple() instead. This allows callers to
-   * retrieve the invalid items by calling get() with $allow_invalid set to TRUE.
-   * In some cases an invalid item may be acceptable rather than having to
-   * rebuild the cache.
-   *
-   * @param array $cids
-   *   An array of cache IDs to delete.
-   *
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateMultiple()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::delete()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteTags()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteAll()
-   */
-  public function deleteMultiple(array $cids);
-
-  /**
-   * Deletes items with any of the specified tags.
-   *
-   * If the cache items are being deleted because they are no longer "fresh",
-   * you may consider using invalidateTags() instead. This allows callers to
-   * retrieve the invalid items by calling get() with $allow_invalid set to TRUE.
-   * In some cases an invalid item may be acceptable rather than having to
-   * rebuild the cache.
-   *
-   * @param array $tags
-   *   Associative array of tags, in the same format that is passed to
-   *   CacheBackendInterface::set().
-   *
-   * @see \Drupal\Core\Cache\CacheBackendInterface::set()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateTags()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::delete()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteMultiple()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteAll()
-   */
-  public function deleteTags(array $tags);
-
-  /**
-   * Deletes all cache items in a bin.
-   *
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateAll()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::delete()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteMultiple()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteTags()
-   */
-  public function deleteAll();
-
-  /**
-   * Marks a cache item as invalid.
-   *
-   * Invalid items may be returned in later calls to get(), if the $allow_invalid
-   * argument is TRUE.
-   *
-   * @param string $cid
-   *   The cache ID to invalidate.
-   *
-   * @see \Drupal\Core\Cache\CacheBackendInterface::delete()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateMultiple()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateTags()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateAll()
-   */
-  public function invalidate($cid);
-
-  /**
-   * Marks cache items as invalid.
-   *
-   * Invalid items may be returned in later calls to get(), if the $allow_invalid
-   * argument is TRUE.
-   *
-   * @param string $cids
-   *   An array of cache IDs to invalidate.
-   *
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteMultiple()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidate()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateTags()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateAll()
-   */
-  public function invalidateMultiple(array $cids);
-
-  /**
-   * Marks cache items with any of the specified tags as invalid.
-   *
-   * @param array $tags
-   *   Associative array of tags, in the same format that is passed to
-   *   CacheBackendInterface::set().
-   *
-   * @see \Drupal\Core\Cache\CacheBackendInterface::set()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteTags()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidate()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateMultiple()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateAll()
-   */
-  public function invalidateTags(array $tags);
-
-  /**
-   * Marks all cache items as invalid.
-   *
-   * Invalid items may be returned in later calls to get(), if the $allow_invalid
-   * argument is TRUE.
-   *
-   * @param string $cids
-   *   An array of cache IDs to invalidate.
-   *
-   * @see \Drupal\Core\Cache\CacheBackendInterface::deleteAll()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidate()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateMultiple()
-   * @see \Drupal\Core\Cache\CacheBackendInterface::invalidateTags()
-   */
-  public function invalidateAll();
-
-  /**
-   * Performs garbage collection on a cache bin.
-   *
-   * The backend may choose to delete expired or invalidated items.
-   */
-  public function garbageCollection();
-
-  /**
-   * Remove a cache bin.
-   */
-  public function removeBin();
-}
diff --git a/lib/Drupal/Core/Cache/CacheContextInterface.php b/lib/Drupal/Core/Cache/CacheContextInterface.php
deleted file mode 100644
index fd9783a..0000000
--- a/lib/Drupal/Core/Cache/CacheContextInterface.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Cache\CacheContextInterface.
- */
-
-namespace Drupal\Core\Cache;
-
-/**
- * Provides an interface for defining a cache context service.
- */
-interface CacheContextInterface {
-
-  /**
-   * Returns the label of the cache context.
-   *
-   * @return string
-   *   The label of the cache context.
-   */
-  public static function getLabel();
-
-  /**
-   * Returns the string representation of the cache context.
-   *
-   * A cache context service's name is used as a token (placeholder) cache key,
-   * and is then replaced with the string returned by this method.
-   *
-   * @return string
-   *   The string representation of the cache context.
-   */
-  public function getContext();
-
-}
diff --git a/lib/Drupal/Core/Cache/CacheContexts.php b/lib/Drupal/Core/Cache/CacheContexts.php
deleted file mode 100644
index 7f7badc..0000000
--- a/lib/Drupal/Core/Cache/CacheContexts.php
+++ /dev/null
@@ -1,127 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Cache\CacheContexts.
- */
-
-namespace Drupal\Core\Cache;
-
-use Drupal\Core\Database\Query\SelectInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-
-/**
- * Defines the CacheContexts service.
- *
- * Converts string placeholders into their final string values, to be used as a
- * cache key.
- */
-class CacheContexts {
-
-  /**
-   * The service container.
-   *
-   * @var \Symfony\Component\DependencyInjection\ContainerInterface
-   */
-  protected $container;
-
-  /**
-   * Available cache contexts and corresponding labels.
-   *
-   * @var array
-   */
-  protected $contexts;
-
-  /**
-   * Constructs a CacheContexts object.
-   *
-   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
-   *   The current service container.
-   * @param array $contexts
-   *   An array of key-value pairs, where the keys are service names (which also
-   *   serve as the corresponding cache context token) and the values are the
-   *   cache context labels.
-   */
-  public function __construct(ContainerInterface $container, array $contexts) {
-    $this->container = $container;
-    $this->contexts = $contexts;
-  }
-
-  /**
-   * Provides an array of available cache contexts.
-   *
-   * @return array
-   *   An array of available cache contexts.
-   */
-  public function getAll() {
-    return $this->contexts;
-  }
-
-  /**
-   * Provides an array of available cache context labels.
-   *
-   * To be used in cache configuration forms.
-   *
-   * @return array
-   *   An array of available cache contexts and corresponding labels.
-   */
-  public function getLabels() {
-    $with_labels = array();
-    foreach ($this->contexts as $context) {
-      $with_labels[$context] = $this->getService($context)->getLabel();
-    }
-    return $with_labels;
-  }
-
-  /**
-   * Converts cache context tokens to string representations of the context.
-   *
-   * Cache keys may either be static (just strings) or tokens (placeholders
-   * that are converted to static keys by the @cache_contexts service, depending
-   * depending on the request). This is the default cache contexts service.
-   *
-   * @param array $keys
-   *   An array of cache keys that may or may not contain cache context tokens.
-   *
-   * @return array
-   *   A copy of the input, with cache context tokens converted.
-   */
-  public function convertTokensToKeys(array $keys) {
-    $context_keys = array_intersect($keys, $this->getAll());
-    $new_keys = $keys;
-
-    // Iterate over the indices instead of the values so that the order of the
-    // cache keys are preserved.
-    foreach (array_keys($context_keys) as $index) {
-      $new_keys[$index] = $this->getContext($keys[$index]);
-    }
-    return $new_keys;
-  }
-
-  /**
-   * Provides the string representation of a cache context.
-   *
-   * @param string $context
-   *   A cache context token of an available cache context service.
-   *
-   * @return string
-   *   The string representation of a cache context.
-   */
-  protected function getContext($context) {
-    return $this->getService($context)->getContext();
-  }
-
-  /**
-   * Retrieves a service from the container.
-   *
-   * @param string $service
-   *   The ID of the service to retrieve.
-   *
-   * @return mixed
-   *   The specified service.
-   */
-  protected function getService($service) {
-    return $this->container->get($service);
-  }
-
-}
diff --git a/lib/Drupal/Core/Cache/CacheableInterface.php b/lib/Drupal/Core/Cache/CacheableInterface.php
deleted file mode 100644
index 4938801..0000000
--- a/lib/Drupal/Core/Cache/CacheableInterface.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\Core\CacheableInterface
- */
-
-namespace Drupal\Core\Cache;
-
-/**
- * Defines an interface for objects which are potentially cacheable.
- *
- * @ingroup cache
- */
-interface CacheableInterface {
-
-  /**
-   * The cache keys associated with this potentially cacheable object.
-   *
-   * Cache keys may either be static (just strings) or tokens (placeholders
-   * that are converted to static keys by the @cache_contexts service, depending
-   * depending on the request).
-   *
-   * @return array
-   *   An array of strings or cache context tokens, used to generate a cache ID.
-   *
-   * @see \Drupal\Core\Cache\CacheContexts::convertTokensToKeys()
-   */
-  public function getCacheKeys();
-
-  /**
-   * The cache tags associated with this potentially cacheable object.
-   *
-   * @return array
-   *  An array of cache tags.
-   */
-  public function getCacheTags();
-
-  /**
-   * The maximum age for which this object may be cached.
-   *
-   * @return int
-   *   The maximum time in seconds that this object may be cached.
-   */
-  public function getCacheMaxAge();
-
-  /**
-   * Indicates whether this object is cacheable.
-   *
-   * @return bool
-   *   Returns TRUE if the object is cacheable, FALSE otherwise.
-   */
-  public function isCacheable();
-
-}
diff --git a/lib/Drupal/Core/Render/Element.php b/lib/Drupal/Core/Render/Element.php
deleted file mode 100644
index eed5c30..0000000
--- a/lib/Drupal/Core/Render/Element.php
+++ /dev/null
@@ -1,169 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Render\Element.
- */
-
-namespace Drupal\Core\Render;
-
-use Drupal\Component\Utility\String;
-
-/**
- * Provides helper methods for Drupal render elements.
- *
- * @see \Drupal\Core\Render\Element\ElementInterface
- *
- * @ingroup theme_render
- */
-class Element {
-
-  /**
-   * Checks if the key is a property.
-   *
-   * @param string $key
-   *   The key to check.
-   *
-   * @return bool
-   *   TRUE of the key is a property, FALSE otherwise.
-   */
-  public static function property($key) {
-    return $key[0] == '#';
-  }
-
-  /**
-   * Gets properties of a structured array element (keys beginning with '#').
-   *
-   * @param array $element
-   *   An element array to return properties for.
-   *
-   * @return array
-   *   An array of property keys for the element.
-   */
-  public static function properties(array $element) {
-    return array_filter(array_keys($element), 'static::property');
-  }
-
-  /**
-   * Checks if the key is a child.
-   *
-   * @param string $key
-   *   The key to check.
-   *
-   * @return bool
-   *   TRUE if the element is a child, FALSE otherwise.
-   */
-  public static function child($key) {
-    return !isset($key[0]) || $key[0] != '#';
-  }
-
-  /**
-   * Identifies the children of an element array, optionally sorted by weight.
-   *
-   * The children of a element array are those key/value pairs whose key does
-   * not start with a '#'. See drupal_render() for details.
-   *
-   * @param array $elements
-   *   The element array whose children are to be identified. Passed by
-   *   reference.
-   * @param bool $sort
-   *   Boolean to indicate whether the children should be sorted by weight.
-   *
-   * @return array
-   *   The array keys of the element's children.
-   */
-  public static function children(array &$elements, $sort = FALSE) {
-    // Do not attempt to sort elements which have already been sorted.
-    $sort = isset($elements['#sorted']) ? !$elements['#sorted'] : $sort;
-
-    // Filter out properties from the element, leaving only children.
-    $children = array();
-    $sortable = FALSE;
-    foreach ($elements as $key => $value) {
-      if ($key === '' || $key[0] !== '#') {
-        if (is_array($value)) {
-          $children[$key] = $value;
-          if (isset($value['#weight'])) {
-            $sortable = TRUE;
-          }
-        }
-        // Only trigger an error if the value is not null.
-        // @see http://drupal.org/node/1283892
-        elseif (isset($value)) {
-          trigger_error(String::format('"@key" is an invalid render array key', array('@key' => $key)), E_USER_ERROR);
-        }
-      }
-    }
-    // Sort the children if necessary.
-    if ($sort && $sortable) {
-      uasort($children, 'Drupal\Component\Utility\SortArray::sortByWeightProperty');
-      // Put the sorted children back into $elements in the correct order, to
-      // preserve sorting if the same element is passed through
-      // \Drupal\Core\Render\Element::children() twice.
-      foreach ($children as $key => $child) {
-        unset($elements[$key]);
-        $elements[$key] = $child;
-      }
-      $elements['#sorted'] = TRUE;
-    }
-
-    return array_keys($children);
-  }
-
-  /**
-   * Returns the visible children of an element.
-   *
-   * @param array $elements
-   *   The parent element.
-   *
-   * @return array
-   *   The array keys of the element's visible children.
-   */
-  public static function getVisibleChildren(array $elements) {
-    $visible_children = array();
-
-    foreach (static::children($elements) as $key) {
-      $child = $elements[$key];
-
-      // Skip un-accessible children.
-      if (isset($child['#access']) && !$child['#access']) {
-        continue;
-      }
-
-      // Skip value and hidden elements, since they are not rendered.
-      if (isset($child['#type']) && in_array($child['#type'], array('value', 'hidden'))) {
-        continue;
-      }
-
-      $visible_children[$key] = $child;
-    }
-
-    return array_keys($visible_children);
-  }
-
-  /**
-   * Sets HTML attributes based on element properties.
-   *
-   * @param array $element
-   *   The renderable element to process. Passed by reference.
-   * @param array $map
-   *   An associative array whose keys are element property names and whose
-   *   values are the HTML attribute names to set on the corresponding
-   *   property; e.g., array('#propertyname' => 'attributename'). If both names
-   *   are identical except for the leading '#', then an attribute name value is
-   *   sufficient and no property name needs to be specified.
-   */
-  public static function setAttributes(array &$element, array $map) {
-    foreach ($map as $property => $attribute) {
-      // If the key is numeric, the attribute name needs to be taken over.
-      if (is_int($property)) {
-        $property = '#' . $attribute;
-      }
-      // Do not overwrite already existing attributes.
-      if (isset($element[$property]) && !isset($element['#attributes'][$attribute])) {
-        $element['#attributes'][$attribute] = $element[$property];
-      }
-    }
-  }
-
-}
diff --git a/lib/Drupal/render_cache/Tests/RenderCacheTest.php b/lib/Drupal/render_cache/Tests/RenderCacheTest.php
deleted file mode 100644
index 5ddf0c8..0000000
--- a/lib/Drupal/render_cache/Tests/RenderCacheTest.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\Tests\RenderCacheTest.
- */
-namespace Drupal\render_cache\Tests;
-
-/**
- * Tests the RenderCache implementation of the render_cache module.
- */
-class RenderCacheTest extends \DrupalWebTestCase {
-  /**
-   * The profile to install as a basis for testing.
-   *
-   * @var string
-   */
-  protected $profile = 'testing';
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'name' => 'RenderCache',
-      'description' => 'Tests the generic RenderCache functionality.',
-      'group' => 'render_cache',
-    );
-  }
-
-  protected function setUp() {
-    parent::setUp(array('render_cache', 'render_cache_block'));
-
-    \ServiceContainer::init();
-    $this->container = \Drupal::getContainer();
-  }
-
-  /**
-   * The basic functionality of the RenderCache class.
-   */
-  public function testRenderCache() {
-    $recursive = \RenderCache::isRecursive();
-    $this->assertFalse($recursive, "Render Stack is not recursive at the start.");
-  }
-}
-
diff --git a/lib/RenderCache.php b/lib/RenderCache.php
deleted file mode 100644
index 623db27..0000000
--- a/lib/RenderCache.php
+++ /dev/null
@@ -1,232 +0,0 @@
-<?php
-/**
- * @file
- * Contains RenderCache
- */
-
-/**
- * Static Service Container wrapper wrapping Drupal class.
- */
-class RenderCache extends Drupal {
-
-  /**
-   * Indicates that the item should not be rendered before it is cached.
-   *
-   * This is useful if the unrendered output is changed dynamically, before
-   * it is cached.
-   *
-   * This is also the slowest option and should be regarded as a 'last-resort'
-   * option.
-   */
-  const RENDER_CACHE_STRATEGY_NO_RENDER = 0;
-
-  /**
-   * Indicates that the item should be rendered before it is cached.
-   *
-   * If there is code that needs to change some properties,
-   * the 'render_cache_preserve_properties' can be used.
-   *
-   * This is used for example to preserve page_footer / page_top properties
-   * for #theme => html.
-   */
-  const RENDER_CACHE_STRATEGY_DIRECT_RENDER = 1;
-
-  /**
-   * Indicates that the item should not be rendered and it should be cached via
-   * drupal_render() and drupal_render_cache_set().
-   *
-   * This is useful for e.g display suite when you want to change the markup
-   * after entity_view(), but before calling drupal_render().
-   *
-   * This is most useful in combination with 'render_cache_preserve_properties',
-   * because the entries retrieved from cache will only have #markup
-   * and #attached keys by default.
-   */
-  const RENDER_CACHE_STRATEGY_LATE_RENDER = 2;
-
-  // Drupal 8's constants differ from those in Drupal 7.
-  // So we explicitly define them again as class constants.
-  // Note: Drupal 8 has CACHE_PERMANENT == -1.
-
-  /**
-   * Indicates that the item should never be removed unless explicitly selected.
-   *
-   * The item may be removed using cache_clear_all() with a cache ID.
-   */
-  const CACHE_PERMANENT = 0;
-
-  /**
-   * Indicates that the item should be removed at the next general cache wipe.
-   */
-  const CACHE_TEMPORARY = -1;
-
-  /**
-   * The currently active container object.
-   *
-   * @var \Drupal\render_cache\DependencyInjection\ContainerInterface
-   */
-  protected static $container;
-
-  /**
-   * The currently active render stack - for improved performance.
-   *
-   * @var \Drupal\render_cache\Cache\RenderStack
-   */
-  protected static $renderStack;
-
-  /**
-   * Container Ready event listener.
-   *
-   * @param $container
-   *   The service container.
-   */
-  public static function containerReady($container) {
-    static::$container = $container;
-
-    // Last get the render stack for improved performance.
-    if (static::$container) {
-      static::$renderStack = static::$container->get('render_stack');
-
-      // Check if we support dynamic asset loading via drupal_add_js/css.
-      if (variable_get('render_cache_supports_dynamic_assets', FALSE)) {
-        static::$renderStack->supportsDynamicAssets(TRUE);
-      }
-    }
-  }
-
-  /**
-   * Returns a render cache controller plugin.
-   *
-   * @param string $type
-   *   The type of the controller plugin, e.g. block, entity, ...
-   *
-   * @return \Drupal\render_cache\RenderCache\Controller\ControllerInterface|NULL
-   *   The instantiated controller with the given type or NULL.
-   */
-  public static function getController($type) {
-    return static::$container->get('render_cache.controller')->createInstance($type);
-  }
-
-  /**
-   * Returns a render cache render strategy plugin.
-   *
-   * @param string $type
-   *   The type of the render strategy plugin, e.g. big_pipe, esi_validate, ...
-   *
-   * @return \Drupal\render_cache\RenderCache\RenderStrategy\RenderStrategyInterface|NULL
-   *   The instantiated render strategy with the given type or NULL.
-   */
-  public static function getRenderStrategy($type) {
-    return static::$container->get('render_cache.render_strategy')->createInstance($type);
-  }
-
-  /**
-   * Returns a render cache validation strategy plugin.
-   *
-   * @param string $type
-   *   The type of the validation strategy plugin, e.g. cache tags, ttl, ...
-   *
-   * @return \Drupal\render_cache\RenderCache\ValidationStrategy\ValidationStrategyInterface|NULL
-   *   The instantiated validation strategy with the given type or NULL.
-   */
-  public static function getValidationStrategy($type) {
-    return static::$container->get('render_cache.validation_strategy')->createInstance($type);
-  }
-
-  /**
-   * Overrides drupal_render().
-   *
-   * If we really need to render early, at least collect the cache tags, etc.
-   *
-   * @param array $render
-   *
-   * @return string
-   */
-  public static function drupalRender(&$render) {
-    return static::$renderStack->drupalRender($render);
-  }
-
-  /**
-   * Returns if we are within a recursive rendering context.
-   *
-   * This is useful to determine if its safe to output a placeholder, so that
-   * #post_render_cache will work.
-   *
-   * @return bool
-   *   TRUE if we are within a recursive context, FALSE otherwise.
-   */
-  public static function isRecursive() {
-    return static::$renderStack->isRecursive();
-  }
-
-  /**
-   * Overrides drupal_add_js().
-   *
-   * @see drupal_add_js()
-   */
-  public static function drupal_add_js($data = NULL, $options = NULL) {
-    if (!static::$renderStack) {
-      return static::callOriginalFunction('drupal_add_js', func_get_args());
-    }
-    return static::$renderStack->drupal_add_assets('js', $data, $options);
-  }
-
-  /**
-   * Overrides drupal_add_css().
-   *
-   * @see drupal_add_css()
-   */
-  public static function drupal_add_css($data = NULL, $options = NULL) {
-    if (!static::$renderStack) {
-      return static::callOriginalFunction('drupal_add_css', func_get_args());
-    }
-    return static::$renderStack->drupal_add_assets('css', $data, $options);
-  }
-
-  /**
-   * Overrides drupal_add_library().
-   *
-   * @see drupal_add_library()
-   */
-  public static function drupal_add_library($module, $name, $every_page = NULL) {
-    if (!static::$renderStack) {
-      return static::callOriginalFunction('drupal_add_library', func_get_args());
-    }
-    return static::$renderStack->drupal_add_library($module, $name, $every_page);
-  }
-
-  /**
-   * Overrides drupal_process_attached().
-   *
-   * @see drupal_process_attached()
-   */
-  public static function drupal_process_attached($elements, $group = JS_DEFAULT, $dependency_check = FALSE, $every_page = NULL) {
-    if (!static::$renderStack) {
-      return static::callOriginalFunction('drupal_process_attached', func_get_args());
-    }
-    return static::$renderStack->drupal_process_attached($elements, $group, $dependency_check, $every_page);
-  }
-
-  /**
-   * Calls the original function in case the container is not yet booted.
-   *
-   * @param string $function
-   *   The function name.
-   * @param array $args
-   *   The function args.
-   * @return NULL|mixed
-   *   Returns what the original function returns.
-   */
-  public static function callOriginalFunction($function, $args) {
-    global $conf;
-
-    $name = $function . "_function";
-
-    $old = $conf[$name];
-    unset($conf[$name]);
-    $return = call_user_func_array($function, $args);
-    $conf[$name] = $old;
-
-    return $return;
-  }
-}
diff --git a/modules/controller/render_cache_block/render_cache_block.info b/modules/controller/render_cache_block/render_cache_block.info
deleted file mode 100644
index ba77429..0000000
--- a/modules/controller/render_cache_block/render_cache_block.info
+++ /dev/null
@@ -1,8 +0,0 @@
-name = Render Cache - Blocks
-description = Implements render caching for blocks
-package = Performance and scalability
-core = 7.x
-
-dependencies[] = render_cache
-
-registry_autoload[] = PSR-4
diff --git a/modules/controller/render_cache_block/render_cache_block.module b/modules/controller/render_cache_block/render_cache_block.module
deleted file mode 100644
index eae6f16..0000000
--- a/modules/controller/render_cache_block/render_cache_block.module
+++ /dev/null
@@ -1,171 +0,0 @@
-<?php
-
-/**
- * @file
- * Hook implementations and frequently used functions for render cache page module.
- */
-
-// -----------------------------------------------------------------------
-// Core Hooks
-
-/**
- * Implements hook_module_implements_alter().
- *
- * Overrides core's block_page_build() and replaces with our own render cached version.
- *
- * @param array $implementations
- *   Format: $[$module] = string|false
- * @param string $hook
- */
-function render_cache_block_module_implements_alter(&$implementations, $hook) {
-  if ($hook === 'page_build') {
-    unset($implementations['block']);
-  }
-  if ($hook === 'block_view_alter') {
-    // Move our hook implementation to the bottom.
-    $group = $implementations['render_cache_block'];
-    unset($implementations['render_cache_block']);
-    $implementations['render_cache_block'] = $group;
-  }
-}
-
-/**
- * Implements hook_page_build() and overrides block_page_build().
- *
- * @param array $page
- */
-function render_cache_block_page_build(&$page) {
-  global $theme;
-
-  // The theme system might not yet be initialized. We need $theme.
-  drupal_theme_initialize();
-
-  // Early return with original function if demo is requested.
-  $item = menu_get_item();
-  if ($item['path'] == 'admin/structure/block/demo/' . $theme) {
-    block_page_build($page);
-    return;
-  }
-
-  // Fetch a list of regions for the current theme.
-  $all_regions = system_region_list($theme);
-
-  // Load all region content assigned via blocks.
-  foreach (array_keys($all_regions) as $region) {
-    // Assign blocks to region.
-    if ($blocks = render_cache_block_get_blocks_by_region($region)) {
-      $page[$region] = $blocks;
-    }
-  }
-
-  // Once we've finished attaching all blocks to the page, clear the static
-  // cache to allow modules to alter the block list differently in different
-  // contexts. For example, any code that triggers hook_page_build() more
-  // than once in the same page request may need to alter the block list
-  // differently each time, so that only certain parts of the page are
-  // actually built. We do not clear the cache any earlier than this, though,
-  // because it is used each time block_get_blocks_by_region() gets called
-  // above.
-  drupal_static_reset('block_list');
-}
-
-/**
- * Implements hook_block_view_alter().
- *
- * @param array $data
- * @param object $block
- */
-function render_cache_block_block_view_alter(&$data, $block) {
-  if (!empty($block->render_cache_controller) && !empty($data['content'])) {
-    // Normalize to the drupal_render() structure so we can add something.
-    if (is_string($data['content'])) {
-      $data['content'] = array(
-        '#markup' => $data['content'],
-      );
-    }
-    $block->render_cache_controller->recursionStep($data['content']);
-  }
-}
-
-// -----------------------------------------------------------------------
-// Contrib Hooks
-
-/**
- * Implements hook_ctools_plugin_directory().
- *
- * @param string $owner
- * @param string $plugin_type
- *
- * @return string|null
- */
-function render_cache_block_ctools_plugin_directory($owner, $plugin_type) {
-  if ($owner == 'render_cache') {
-    return 'src/RenderCache/' . $plugin_type;
-  }
-
-  return NULL;
-}
-
-// -----------------------------------------------------------------------
-// Public API
-
-/**
- * Overrides block_get_blocks_by_region().
- *
- * @param string $region
- *
- * @return array
- *
- * @see block_get_blocks_by_region()
- */
-function render_cache_block_get_blocks_by_region($region) {
-  // Save the region to the $context.
-  $context = array(
-    'region' => $region,
-  );
-
-  // Load the blocks for this region.
-  $blocks = render_cache_block_block_list($region);
-
-  // Delegate to render cache controller.
-  $rcc = render_cache_get_controller('block');
-  $rcc->setContext($context);
-  $build = $rcc->view($blocks);
-
-  return $build;
-}
-
-/**
- * Load the list of blocks for a region, but do not render them.
- *
- * @see block_list()
- *
- * @param $region
- *   The name of the region.
- *
- * @return
- *   An array of block objects, indexed with the module name and block delta
- *   concatenated with an underscore, thus: MODULE_DELTA.
- */
-function render_cache_block_block_list($region) {
-  $blocks = &drupal_static(__FUNCTION__);
-
-  if (!isset($blocks)) {
-    $blocks = _block_load_blocks();
-  }
-
-  // Create an empty array if there are no entries.
-  if (!isset($blocks[$region])) {
-    $blocks[$region] = array();
-  }
-  else {
-    // Convert the blocks array into the right format.
-    $region_blocks = array();
-    foreach ($blocks[$region] as $key => $block) {
-      $region_blocks["{$block->module}_{$block->delta}"] = $block;
-    }
-    $blocks[$region] = $region_blocks;
-  }
-
-  return $blocks[$region];
-}
diff --git a/modules/controller/render_cache_block/src/RenderCache/Controller/BlockController.php b/modules/controller/render_cache_block/src/RenderCache/Controller/BlockController.php
deleted file mode 100644
index 353744e..0000000
--- a/modules/controller/render_cache_block/src/RenderCache/Controller/BlockController.php
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache_block\RenderCache\Controller\BlockController
- */
-
-namespace Drupal\render_cache_block\RenderCache\Controller;
-
-use Drupal\render_cache\RenderCache\Controller\BaseRecursionController;
-
-/**
- * BlockController - Provides render caching for block objects.
- *
- * @ingroup rendercache
- */
-class BlockController extends BaseRecursionController {
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function isCacheable(array $default_cache_info, array $context) {
-    // Disabled caching for now.
-    return variable_get('render_cache_' . $this->getType() . '_' . $context['region'] . '_enabled', TRUE)
-        && parent::isCacheable($default_cache_info, $context);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheContext($object, array $context) {
-    // Helper variables.
-    $block = $object;
-
-    $context = parent::getCacheContext($object, $context);
-
-    $context = $context + array(
-      'bid' => $block->bid,
-      'delta' => $block->delta,
-      'module' => $block->module,
-    );
-
-    return $context;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getDefaultCacheInfo($context) {
-    $default_cache_info = parent::getDefaultCacheInfo($context);
-
-    // The block cache renders to markup by default.
-    $default_cache_info['render_cache_render_to_markup'] = TRUE;
-    return $default_cache_info;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheInfo($object, array $context) {
-    // Helper variables.
-    $block = $object;
-
-    $cache_info = parent::getCacheInfo($object, $context);
-
-    // Overwrite the default granularity, this is a pretty sane default.
-    $cache_info['granularity'] = isset($block->cache) ? $block->cache : DRUPAL_NO_CACHE;
-
-    return $cache_info;
-  }
-
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheKeys($object, array $context) {
-    // Helper variables.
-    // @todo Unused variable $block
-    $block = $object;
-
-    return array_merge(parent::getCacheKeys($object, $context), array(
-      $context['region'],
-      $context['module'],
-      $context['delta'],
-    ));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheHash($object, array $context) {
-    $hash['module'] = $context['module'];
-    $hash['delta'] = $context['delta'];
-
-    // Context module support.
-    if (!empty($context['context']->name)) {
-      $hash['context'] = $context['context']->name;
-    }
-
-    return $hash;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheTags($object, array $context) {
-    $tags = parent::getCacheTags($object, $context);
-    $tags[] = 'block:' . $context['id'];
-
-    return $tags;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function render(array $objects) {
-    // Helper variables.
-    $blocks = $objects;
-
-    // Ensure block module is loaded.
-    module_load_include('module', 'block', 'block');
-
-    // Turn off core block caching.
-    foreach ($blocks as $block) {
-      $block->cache = DRUPAL_NO_CACHE;
-    }
-
-    // This works because _block_render_blocks uses the same format for the
-    // $id of the block in the array.
-    $list = _block_render_blocks($blocks);
-
-    $build = array();
-    if ($list) {
-      $build = _block_get_renderable_array($list);
-    }
-
-    return $build;
-  }
-}
diff --git a/modules/controller/render_cache_block/src/RenderCache/Controller/block.inc b/modules/controller/render_cache_block/src/RenderCache/Controller/block.inc
deleted file mode 100644
index 980da98..0000000
--- a/modules/controller/render_cache_block/src/RenderCache/Controller/block.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-
-$plugin = array(
-  'class' => "\\Drupal\\render_cache_block\\RenderCache\\Controller\\BlockController",
-  'arguments' => array('@render_stack', '@render_cache.cache'),
-);
diff --git a/modules/controller/render_cache_entity/render_cache_entity.info b/modules/controller/render_cache_entity/render_cache_entity.info
deleted file mode 100644
index 5983c74..0000000
--- a/modules/controller/render_cache_entity/render_cache_entity.info
+++ /dev/null
@@ -1,9 +0,0 @@
-name = Render Cache - Entity
-description = Overrides entity_view() to provide generic render caching for entities.
-package = Performance and scalability
-core = 7.x
-
-dependencies[] = render_cache
-dependencies[] = entity
-
-registry_autoload[] = PSR-4
diff --git a/modules/controller/render_cache_entity/render_cache_entity.module b/modules/controller/render_cache_entity/render_cache_entity.module
deleted file mode 100644
index 3229305..0000000
--- a/modules/controller/render_cache_entity/render_cache_entity.module
+++ /dev/null
@@ -1,202 +0,0 @@
-<?php
-
-/**
- * @file
- * Hook implementations and frequently used functions for render cache entity module.
- */
-
-// -----------------------------------------------------------------------
-// Core Hooks
-
-/**
- * Implements hook_entity_info_alter().
- *
- * We hijack entity rendering, as performed through the Entity API module, to
- * provide full entity caching.
- *
- * @param array $entity_info
- */
-function render_cache_entity_entity_info_alter(&$entity_info) {
-  foreach ($entity_info as $type => $info) {
-    // If this type is not render cacheable, continue.
-    if (isset($info['render cache']) && $info['render cache'] == FALSE) {
-      continue;
-    }
-    // Store that this entity type is render cached.
-    $entity_info[$type]['render cache'] = TRUE;
-
-    if (isset($info['view callback'])) {
-      // Since we are overwriting the view callback we record the original
-      // callback so that we know how to render.
-      $entity_info[$type]['render cache storage']['callback'] = $info['view callback'];
-      $entity_info[$type]['view callback'] = 'render_cache_entity_view_callback';
-    }
-    elseif (isset($info['controller class']) &&
-        in_array('EntityAPIControllerInterface', class_implements($info['controller class']))) {
-      // We do not set the render cache callback, when it is missing we will
-      // render using the controller class.
-      $entity_info[$type]['view callback'] = 'render_cache_entity_view_callback';
-    }
-  }
-}
-
-/**
- * Implements hook_module_implements_alter().
- *
- * Moves our hook_entity_info_alter() implementation to occur last so that we
- * can consistently hijack the render function of the entity type.
- *
- * This also adjusts the weights for entity_view() and entity_view_alter().
- *
- * @param mixed[] $implementations
- *   Format: $[$module] = string|false
- * @param string $hook
- */
-function render_cache_entity_module_implements_alter(&$implementations, $hook) {
-  if (in_array($hook, array('entity_info_alter', 'entity_view', 'entity_view_alter'))) {
-    // Move our hook implementations to the bottom.
-    $group = $implementations['render_cache_entity'];
-    unset($implementations['render_cache_entity']);
-    $implementations['render_cache_entity'] = $group;
-  }
-}
-
-// -----------------------------------------------------------------------
-// Contrib Hooks
-
-/**
- * Implements hook_ctools_plugin_directory().
- *
- * @param string $owner
- * @param string $plugin_type
- *
- * @return null|string
- */
-function render_cache_entity_ctools_plugin_directory($owner, $plugin_type) {
-  if ($owner == 'render_cache') {
-    return 'src/RenderCache/' . $plugin_type;
-  }
-
-  return NULL;
-}
-
-/**
- * Implements hook_entity_view().
- *
- * @param object $entity
- * @param string $type
- * @param string $view_mode
- * @param string $langcode
- */
-function render_cache_entity_entity_view($entity, $type, $view_mode, $langcode) {
-  if (!empty($entity->render_cache_controller) && !empty($entity->content)) {
-    // Store the entity we are processing in a special variable
-    // as hook_entity_view_alter() does not give us the entity.
-    $entity->content['#render_cache_entity'] = $entity;
-  }
-}
-
-/**
- * Implements hook_entity_view_alter().
- *
- * @param array $build
- * @param string $type
- */
-function render_cache_entity_entity_view_alter(&$build, $type) {
-  // Ensure recursion works properly.
-  if (!empty($build['#render_cache_entity'])) {
-    $entity = $build['#render_cache_entity'];
-    unset($build['#render_cache_entity']);
-    $entity->render_cache_controller->recursionStep($build);
-  }
-}
-
-
-// -----------------------------------------------------------------------
-// Public API
-
-/**
- * Override entity API rendering callback to add a caching layer.
- *
- * @param object[] $entities
- * @param string $view_mode
- * @param string $langcode
- * @param string $entity_type
- *
- * @return array
- */
-function render_cache_entity_view_callback($entities, $view_mode, $langcode, $entity_type) {
-  // Remove any passed values that are not an object, this can happen with out
-  // of date Apache Solr search when entities are deleted and probably other
-  // situations.
-  foreach($entities as $key => $entity) {
-    if (!is_object($entity)) {
-      unset($entities[$key]);
-    }
-  }
-
-  // @todo Unused variable $entity_info
-  $entity_info = entity_get_info($entity_type);
-
-  // Prepare context.
-  $context = array(
-    'entity_type' => $entity_type,
-    'view_mode' => $view_mode,
-    'langcode' => $langcode,
-  );
-
-  // Delegate to render cache controller.
-  $rcc = render_cache_get_controller('entity');
-  $rcc->setContext($context);
-  $build = $rcc->view($entities);
-
-  // Return $build, wrap with entity type key in array to match
-  // entity_view()'s functionality.
-  return array(
-    $entity_type => $build,
-  );
-}
-
-/**
- * Helper function to view a single entity.
- *
- * This can be used to replace node_view(), comment_view(), easier.
- *
- * @param string $entity_type
- *   The type of the entity.
- * @param object $entity
- *   The entity to render.
- * @param string $view_mode
- *   A view mode as used by this entity type, e.g. 'full', 'teaser'...
- *
- * @return array
- */
-function render_cache_entity_view_single($entity_type, $entity, $view_mode) {
-  list($entity_id) = entity_extract_ids($entity_type, $entity);
-  $build = entity_view($entity_type, array($entity_id => $entity), $view_mode);
-
-  // The output needs to be compatible to what the single function would have
-  // returned.
-  if (isset($build[$entity_type][$entity_id])) {
-    return $build[$entity_type][$entity_id];
-  }
-  return array();
-}
-
-/**
- * Implements hook_render_cache_entity_hash_alter().
- *
- * @param array $hash
- * @param object $entity
- * @param array $cache_info
- * @param array $context
- */
-function node_render_cache_entity_hash_alter(&$hash, $entity, $cache_info, $context) {
-  // We generally cache nodes based on comment count.
-  if ($context['entity_type'] == 'node' && isset($entity->comment_count)) {
-    // @todo This is very unreliable if comments can be edited, it would be better
-    //       to directly save a list of entity_modified values but entity_modified
-    //       needs to support multiple get and caching for that first.
-    $hash['node_comment_count'] = $entity->comment_count;
-  }
-}
diff --git a/modules/controller/render_cache_entity/src/RenderCache/Controller/EntityController.php b/modules/controller/render_cache_entity/src/RenderCache/Controller/EntityController.php
deleted file mode 100644
index bf9d2a2..0000000
--- a/modules/controller/render_cache_entity/src/RenderCache/Controller/EntityController.php
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache_entity\RenderCache\Controller\EntityController
- */
-
-namespace Drupal\render_cache_entity\RenderCache\Controller;
-
-use Drupal\render_cache\RenderCache\Controller\BaseRecursionController;
-
-/**
- * EntityController - Provides render caching for entity objects.
- *
- * @ingroup rendercache
- */
-class EntityController extends BaseRecursionController {
-  /**
-   * {@inheritdoc}
-   */
-  protected function isCacheable(array $default_cache_info, array $context) {
-    return variable_get('render_cache_' . $this->getType() . '_' . $context['entity_type'] . '_enabled', TRUE)
-        && parent::isCacheable($default_cache_info, $context);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheContext($object, array $context) {
-    // Helper variables.
-    $entity = $object;
-    $entity_type = $context['entity_type'];
-
-    $context = parent::getCacheContext($object, $context);
-
-    // Setup entity context.
-    list($entity_id, $entity_revision_id, $bundle) = entity_extract_ids($entity_type, $entity);
-    $context = $context + array(
-      'entity_id' => $entity_id,
-      'entity_revision_id' => $entity_revision_id,
-      'bundle' => !empty($bundle) ? $bundle : $entity_type,
-    );
-
-    return $context;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheKeys($object, array $context) {
-    return array_merge(parent::getCacheKeys($object, $context), array(
-      $context['entity_type'],
-      $context['view_mode'],
-    ));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheHash($object, array $context) {
-    // Helper variables.
-    $entity = $object;
-
-    // Calculate hash to expire cached items automatically.
-    $hash = parent::getCacheHash($object, $context);
-
-    $hash['entity_id'] = $context['entity_id'];
-    $hash['entity_revision_id'] = $context['entity_revision_id'];
-    $hash['bundle'] = $context['bundle'];
-    $hash['langcode'] = $context['langcode'];
-
-    // @todo Move to cache tags.
-    $hash['modified'] = entity_modified_last($context['entity_type'], $entity);
-
-    return $hash;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheTags($object, array $context) {
-    // Helper variables.
-    $entity_type = $context['entity_type'];
-    $entity_id = $context['entity_id'];
-
-    $tags = parent::getCacheTags($object, $context);
-    $tags[] = $entity_type . ':' . $entity_id;
-    $tags[] = $entity_type . '_view';
-
-    return $tags;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function render(array $objects) {
-    // Helper variables.
-    $entities = $objects;
-    $view_mode = $this->context['view_mode'];
-    $langcode = $this->context['langcode'];
-    $entity_type = $this->context['entity_type'];
-    $entity_info = entity_get_info($entity_type);
-
-    // If this is a entity view callback.
-    if (isset($entity_info['render cache storage']['callback'])) {
-      $build = $entity_info['render cache storage']['callback']($entities, $view_mode, $langcode, $entity_type);
-    }
-    // Otherwise this is a controller class callback.
-    else {
-      $page = $this->getPageArgument();
-      $build = entity_get_controller($entity_type)->view($entities, $view_mode, $langcode, $page);
-    }
-    $build = reset($build);
-
-    return $build;
-  }
-
-  /**
-   * Helper function to retrieve missing $page argument from backtrace.
-   *
-   * @return bool $page
-   *   The page argument from entity_view() if found - NULL otherwise.
-   */
-  protected function getPageArgument() {
-    $page = NULL;
-
-    // We need the $page variable from entity_view() that it does not pass us.
-    if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
-      // Get only the stack frames we need (PHP 5.4 only).
-      $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2);
-    }
-    elseif (version_compare(PHP_VERSION, '5.3.6', '>=')) {
-      $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT);
-    }
-    else {
-      // @see http://php.net/manual/en/function.debug-backtrace.php#refsect1-function.debug-backtrace-parameters
-      $backtrace = debug_backtrace(TRUE);
-    }
-
-    // As a safety, do not grab an unexpected arg for $page, check that this
-    // was called from entity_view().
-    if (isset($backtrace[2]['function']) && $backtrace[2]['function'] === 'entity_view' && isset($backtrace[2]['args'][4])) {
-      $page = $backtrace[2]['args'][4];
-    }
-
-    return $page;
-  }
-}
diff --git a/modules/controller/render_cache_entity/src/RenderCache/Controller/entity.inc b/modules/controller/render_cache_entity/src/RenderCache/Controller/entity.inc
deleted file mode 100644
index ea80d89..0000000
--- a/modules/controller/render_cache_entity/src/RenderCache/Controller/entity.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-
-$plugin = array(
-  'class' => "\\Drupal\\render_cache_entity\\RenderCache\\Controller\\EntityController",
-  'arguments' => array('@render_stack', '@render_cache.cache'),
-);
diff --git a/modules/controller/render_cache_page/render_cache_page.api.php b/modules/controller/render_cache_page/render_cache_page.api.php
deleted file mode 100644
index 4ad4d9e..0000000
--- a/modules/controller/render_cache_page/render_cache_page.api.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/**
- * @param array $build
- *
- * @see render_cache_page_drupal_render_page()
- */
-function hook_render_cache_page_pre_render_alter(&$build) {
-
-  // @todo Add example implementation.
-}
-
-/**
- * @param string $output
- * @param array $build
- *
- * @see render_cache_page_drupal_render_page()
- */
-function hook_render_cache_page_post_render_alter(&$output, &$build) {
-  // @todo Add example implementation.
-}
-
-/**
- * Allows changing the markup before it is send to the browser.
- *
- * @param string $output
- * @param array $build
- *
- * @see render_cache_page_drupal_render_page()
- */
-function hook_render_cache_page_pre_send_alter(&$output, &$build) {
-  // @todo Add example implementation.
-}
-
-/**
- * Allows sending more data after the main page content has been send to the browser.
- *
- * @param string $output
- * @param array $build
- *
- * @see render_cache_page_drupal_render_page()
- */
-function hook_render_cache_page_post_send_alter(&$output, &$build) {
-  // @todo Add example implementation.
-}
diff --git a/modules/controller/render_cache_page/render_cache_page.info b/modules/controller/render_cache_page/render_cache_page.info
deleted file mode 100644
index 976810d..0000000
--- a/modules/controller/render_cache_page/render_cache_page.info
+++ /dev/null
@@ -1,8 +0,0 @@
-name = Render Cache - Page
-description = Implements render caching for the whole page.
-package = Performance and scalability
-core = 7.x
-
-dependencies[] = render_cache
-
-registry_autoload[] = PSR-4
diff --git a/modules/controller/render_cache_page/render_cache_page.module b/modules/controller/render_cache_page/render_cache_page.module
deleted file mode 100644
index 5209987..0000000
--- a/modules/controller/render_cache_page/render_cache_page.module
+++ /dev/null
@@ -1,245 +0,0 @@
-<?php
-/**
- * @file
- * Hook implementations and frequently used functions for render cache page module.
- */
-
-use Drupal\render_cache_page\RenderCache\Controller\PageControllerInterface;
-
-// -----------------------------------------------------------------------
-// Core Hooks
-
-/**
- * Implements hook_init().
- *
- * As menu_execute_active_handler() runs before the page delivery, we fake the recursion
- * level to prevent #post_render_cache functions to be called before.
- */
-function render_cache_page_init() {
-  $rcc = render_cache_get_controller('page');
-  if (!$rcc instanceof PageControllerInterface) {
-    return;
-  }
-  // Delegate hook_init() to the render cache controller.
-  $rcc->hook_init();
-}
-
-/**
- * Implements hook_page_delivery_callback_alter().
- *
- * We hijack the page delivery callback to provide full page caching.
- *
- * This also allows to call the #post_render_cache callbacks at the
- * latest possible point.
- *
- * @param callback $callback
- */
-function render_cache_page_page_delivery_callback_alter(&$callback) {
-  if ($callback != 'drupal_deliver_html_page') {
-    return;
-  }
-  // Store the original callback.
-  $original_callback = &drupal_static(__FUNCTION__, '');
-  $original_callback = $callback;
-
-  // Use our own page deliver callback.
-  $callback = 'render_cache_page_deliver_html_page';
-}
-
-/**
- * Implements hook_module_implements_alter().
- *
- * Moves our hook_page_page_delivery_callback_alter() implementation to occur
- * last so that we can consistently hijack the delivery callback.
- *
- * @param array $implementations
- *   Format: $[$module] = string|false
- * @param string $hook
- */
-function render_cache_page_module_implements_alter(&$implementations, $hook) {
-  if ($hook === 'page_delivery_callback_alter') {
-    // Move our hook implementation to the bottom.
-    $group = $implementations['render_cache_page'];
-    unset($implementations['render_cache_page']);
-    $implementations['render_cache_page'] = $group;
-  }
-}
-
-// -----------------------------------------------------------------------
-// Contrib Hooks
-
-/**
- * Implements hook_ctools_plugin_directory().
- *
- * @param string $owner
- * @param string $plugin_type
- *
- * @return null|string
- */
-function render_cache_page_ctools_plugin_directory($owner, $plugin_type) {
-  if ($owner == 'render_cache') {
-    return 'src/RenderCache/' . $plugin_type;
-  }
-
-  return NULL;
-}
-
-// -----------------------------------------------------------------------
-// Public API
-
-/**
- * Overrides drupal_deliver_html_page().
- *
- * @param mixed $page_callback_result
- */
-function render_cache_page_deliver_html_page($page_callback_result) {
-  // Menu status constants are integers; page content is a string or array.
-  if (is_int($page_callback_result)) {
-    // Never cache 403 or 404 pages.
-    render_cache_call_is_cacheable(FALSE);
-    // Early return for status codes.
-    drupal_deliver_html_page($page_callback_result);
-    return;
-  }
-
-  // Copied code from drupal_deliver_html_page:
-
-  // Emit the correct charset HTTP header, but not if the page callback
-  // result is NULL, since that likely indicates that it printed something
-  // in which case, no further headers may be sent, and not if code running
-  // for this page request has already set the content type header.
-  if (isset($page_callback_result) && is_null(drupal_get_http_header('Content-Type'))) {
-    drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
-  }
-
-  // Send appropriate HTTP-Header for browsers and search engines.
-  global $language;
-  drupal_add_http_header('Content-Language', $language->language);
-
-  if (isset($page_callback_result)) {
-    // Print anything besides a menu constant, assuming it's not NULL or
-    // undefined.
-    // The function does the printing.
-    render_cache_page_drupal_render_page($page_callback_result);
-  }
-
-  // Perform end-of-request tasks.
-  drupal_page_footer();
-}
-
-/**
- * Called instead of drupal_render_page().
- *
- * @param array $page
- */
-function render_cache_page_drupal_render_page($page) {
-
-  // We could retrieve this also from $_REQUEST, but this is cleaner as it 
-  // matches the Drupal 8 request object closer.
-  $page_callback = &drupal_static('render_cache_page_page_delivery_callback_alter', '');
-  $context = array(
-    'page_callback' => $page_callback,
-    'request' => $_REQUEST,
-  );
- 
-  // The view() method always takes multiple objects.
-  $pages = array(
-    'page' => (object) array(
-      'content' => $page,
-    ),
-  );
-
-  // Delegate to render cache controller.
-  $rcc = render_cache_get_controller('page');
-  $rcc->setContext($context);
-  $build = $rcc->view($pages);
-
-  // Now that we have build the page succesfully and ran post_render functions,
-  // lets add the HTML back to it.
-  if (!empty($build['page']['#render_cache_page_theme_wrappers'])) {
-    $build['page']['#theme_wrappers'] = $build['page']['#render_cache_page_theme_wrappers'];
-    unset($build['page']['#render_cache_page_theme_wrappers']);
-  }
-
-  // If the #theme_wrappers is still empty, then just put back the default from
-  // element_info('page').
-  if (empty($build['page']['#theme_wrappers'])) {
-    $element_info = element_info('page');
-    $build['page']['#theme_wrappers'] = $element_info['#theme_wrappers'];
-  }
-
-  // Process the assets.
-  drupal_process_attached($build['page']);
-
-  // And restore properties.
-  $build['page'] += $build['page']['#render_cache_original'];
-  unset($build['page']['#render_cache_original']);
-  unset($build['page']['#attached']);
-  unset($build['page']['#printed']);
-  unset($build['page']['#children']);
-  // We need to unset #type and #theme to only render the #markup.
-  unset($build['page']['#type']);
-  unset($build['page']['#theme']);
-
-  // Call drupal_render() like the original function, but allow other modules
-  // to alter the output before and after rendering.
-  drupal_alter('render_cache_page_pre_render', $build);
-  $output = drupal_render($build);
-  drupal_alter('render_cache_page_post_render', $output, $build);
-
-  // Allow other modules to alter the output before and after sending, to
-  // enable them to e.g. replace placeholders via Javascript.
-  drupal_alter('render_cache_page_pre_send', $output, $build);
-  print $output;
-  drupal_alter('render_cache_page_post_send', $output, $build);
-}
-
-/**
- * Overrides drupal_render_page().
- *
- * This function is identical to drupal_render_page(), but does not drupal_render()
- * at the end to allow render caching.
- *
- * @param array $page
- *
- * @return array
- */
-function render_cache_page_drupal_render_page_helper($page) {
-  $main_content_display = &drupal_static('system_main_content_added', FALSE);
-
-  // Allow menu callbacks to return strings or arbitrary arrays to render.
-  // If the array returned is not of #type page directly, we need to fill
-  // in the page with defaults.
-  if (is_string($page) || (is_array($page) && (!isset($page['#type']) || ($page['#type'] != 'page')))) {
-    drupal_set_page_content($page);
-    $page = element_info('page');
-  }
-
-  // Modules can add elements to $page as needed in hook_page_build().
-  foreach (module_implements('page_build') as $module) {
-    $function = $module . '_page_build';
-    $function($page);
-  }
-  // Modules alter the $page as needed. Blocks are populated into regions like
-  // 'sidebar_first', 'footer', etc.
-  drupal_alter('page', $page);
-
-  // If no module has taken care of the main content, add it to the page now.
-  // This allows the site to still be usable even if no modules that
-  // control page regions (for example, the Block module) are enabled.
-  if (!$main_content_display) {
-    $page['content']['system_main'] = drupal_set_page_content();
-  }
-
-  // --- These lines were changed.
-
-  // Remove the #theme_wrappers to remove the chicken-egg-situation of page and html
-  // for #post_render_cache and script adding. Store it in another var, in
-  // case some module tries to alter it in hook_page_alter().
-  if (!empty($page['#theme_wrappers'])) {
-    $page['#render_cache_page_theme_wrappers'] = $page['#theme_wrappers'];
-  }
-  $page['#theme_wrappers'] = array();
-
-  return $page;
-}
diff --git a/modules/controller/render_cache_page/src/RenderCache/Controller/PageController.php b/modules/controller/render_cache_page/src/RenderCache/Controller/PageController.php
deleted file mode 100644
index 4ca497e..0000000
--- a/modules/controller/render_cache_page/src/RenderCache/Controller/PageController.php
+++ /dev/null
@@ -1,125 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache_page\RenderCache\Controller\PageController
- */
-
-namespace Drupal\render_cache_page\RenderCache\Controller;
-
-use Drupal\render_cache\RenderCache\Controller\BaseController;
-
-/**
- * PageController - Provides render caching for page objects.
- *
- * @ingroup rendercache
- */
-class PageController extends BaseController implements PageControllerInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function hook_init() {
-    // We need to increase the recursion level before entering here to avoid
-    // early rendering of #post_render_cache data.
-    $this->renderStack->increaseRecursion();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function view(array $objects) {
-    // We need to decrease recursion again.
-    // Because this only adds to the recursion storage, it is safe to call.
-    foreach ($objects as $id => $page) {
-      // Transform into a render array.
-      if (!is_array($page->content)) {
-        $page->content = array(
-          'main' => array(
-            '#markup' => $page->content
-          ),
-        );
-      }
-      $storage = $this->renderStack->decreaseRecursion();
-      $page->content['x_render_cache_page_recursion_storage'] = $storage;
-    }
-
-    return parent::view($objects);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getDefaultCacheInfo($context) {
-    $default_cache_info = parent::getDefaultCacheInfo($context);
-
-    // The page cache is per page and per role by default.
-    $default_cache_info['granularity'] = DRUPAL_CACHE_PER_ROLE | DRUPAL_CACHE_PER_PAGE;
-    $default_cache_info['render_cache_cache_strategy'] = \RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER;
-    $default_cache_info['render_cache_preserve_original'] = TRUE;
-    return $default_cache_info;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function isCacheable(array $default_cache_info, array $context) {
-    // Disabled caching for now.
-    return variable_get('render_cache_' . $this->getType() . '_' . $context['page_callback'] . '_enabled', FALSE)
-        && parent::isCacheable($default_cache_info, $context);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheKeys($object, array $context) {
-    return array_merge(parent::getCacheKeys($object, $context), array(
-      $context['page_callback'],
-    ));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheHash($object, array $context) {
-    // Simple 1 hour cache to begin with.
-    $hash['expiration'] = round(time() / 3600);
-
-    return $hash;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheTags($object, array $context) {
-    $tags = parent::getCacheTags($object, $context);
-    // @see drupal_pre_render_page() in Drupal 8.
-    $tags[] = 'theme_global_settings';
-
-    // Deliberately commented out as the theme might not be loaded, yet.
-    // We do this in render() instead.
-    //global $theme;
-    //$tags[] = 'theme:' . $theme;
-
-    return $tags;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function render(array $objects) {
-    foreach ($objects as $id => $page) {
-      if ($this->renderStack->supportsDynamicAssets()) {
-        $storage = $page->content['x_render_cache_page_recursion_storage'];
-        unset($page->content['x_render_cache_page_recursion_storage']);
-        $this->renderStack->addRecursionStorage($storage, TRUE);
-      }
-      $build[$id] = render_cache_page_drupal_render_page_helper($page->content);
-    }
-    // @see drupal_pre_render_page() in Drupal 8.
-    global $theme;
-    $page_id = current(array_keys($objects));
-    $build[$page_id]['#cache']['tags'][] = 'theme:' . $theme;
-
-    return $build;
-  }
-}
diff --git a/modules/controller/render_cache_page/src/RenderCache/Controller/PageControllerInterface.php b/modules/controller/render_cache_page/src/RenderCache/Controller/PageControllerInterface.php
deleted file mode 100644
index 02a28ff..0000000
--- a/modules/controller/render_cache_page/src/RenderCache/Controller/PageControllerInterface.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache_page\RenderCache\Controller\PageControllerInterface
- */
-
-namespace Drupal\render_cache_page\RenderCache\Controller;
-
-/**
- * Special interface for the render cache page controller.
- */
-interface PageControllerInterface {
-  /**
-   * Implements delegated hook_init().
-   */
-  public function hook_init();
-}
diff --git a/modules/controller/render_cache_page/src/RenderCache/Controller/page.inc b/modules/controller/render_cache_page/src/RenderCache/Controller/page.inc
deleted file mode 100644
index 7faaea0..0000000
--- a/modules/controller/render_cache_page/src/RenderCache/Controller/page.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-
-$plugin = array(
-  'class' => "\\Drupal\\render_cache_page\\RenderCache\\Controller\\PageController",
-  'arguments' => array('@render_stack', '@render_cache.cache'),
-);
diff --git a/modules/render_cache_comment/render_cache_comment.info b/modules/render_cache_comment/render_cache_comment.info
new file mode 100644
index 0000000..9ec58a0
--- /dev/null
+++ b/modules/render_cache_comment/render_cache_comment.info
@@ -0,0 +1,8 @@
+name = Render cache for comments added to a node.
+description = Hijacks the comment_node_view callback to enable entity_view caching.
+package = Performance and scalability
+core = 7.x
+
+dependencies[] = render_cache
+dependencies[] = entity
+
diff --git a/modules/render_cache_comment/render_cache_comment.module b/modules/render_cache_comment/render_cache_comment.module
new file mode 100644
index 0000000..9bf6505
--- /dev/null
+++ b/modules/render_cache_comment/render_cache_comment.module
@@ -0,0 +1,95 @@
+<?php
+/**
+ * @file
+ * Hijacks comment.module's implementation of hook_node_view() to enable entity caching.
+ */
+
+/**
+ * Implements hook_module_implements_alter().
+ *
+ * @param array $implementations
+ *   Format: $[$module] = string|false
+ * @param string $hook
+ */
+function render_cache_comment_module_implements_alter(&$implementations, $hook) {
+  if ($hook == 'node_view') {
+    unset($implementations['comment']);
+  }
+}
+
+/**
+ * Implements hook_node_view()
+ *
+ * Runs instead of comment_node_view(), but not necessarily in the same position
+ * in the order of hook_node_view() implementations.
+ *
+ * @param object $node
+ * @param string $view_mode
+ */
+function render_cache_comment_node_view($node, $view_mode) {
+  // Save original preview state.
+  $in_preview = !empty($node->in_preview);
+
+  // Call the original function, but set the preview bit, so that the comments
+  // are not rendered.
+  $node->in_preview = TRUE;
+  comment_node_view($node, $view_mode);
+
+  // Restore previous value.
+  $node->in_preview = $in_preview;
+
+  // Now do the rest of comment_node_view() that was skipped, but using our own
+  // render function.  This if-clause was copied from comment_node_view().
+  if ($node->comment && $view_mode == 'full' && node_is_page($node) && empty($node->in_preview)) {
+    $node->content['comments'] = render_cache_comment_node_page_additions($node);
+  }
+}
+
+/**
+ * Replaces comment_node_page_additions(), with added entity caching.
+ *
+ * This uses @see entity_view() instead of @see comment_view_multiple(), to
+ * enable entity_view() render caching.
+ *
+ * @param object $node
+ *
+ * @return array
+ */
+function render_cache_comment_node_page_additions($node) {
+  $additions = array();
+
+  // Only attempt to render comments if the node has visible comments.
+  // Unpublished comments are not included in $node->comment_count, so show
+  // comments unconditionally if the user is an administrator.
+  if (($node->comment_count && user_access('access comments')) || user_access('administer comments')) {
+    $mode = variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED);
+    $comments_per_page = variable_get('comment_default_per_page_' . $node->type, 50);
+    if ($cids = comment_get_thread($node, $mode, $comments_per_page)) {
+      $comments = comment_load_multiple($cids);
+      comment_prepare_thread($comments);
+
+      // CHANGED: Use entity_view() here to ensure caching is possible.
+      $build = entity_view('comment', $comments);
+
+      $build['pager']['#theme'] = 'pager';
+      $additions['comments'] = $build;
+    }
+  }
+
+  // Append comment form if needed.
+  if (user_access('post comments') && $node->comment == COMMENT_NODE_OPEN && (variable_get('comment_form_location_' . $node->type, COMMENT_FORM_BELOW) == COMMENT_FORM_BELOW)) {
+    $build = drupal_get_form("comment_node_{$node->type}_form", (object) array('nid' => $node->nid));
+    $additions['comment_form'] = $build;
+  }
+
+  if ($additions) {
+    $additions += array(
+      '#theme' => 'comment_wrapper__node_' . $node->type,
+      '#node' => $node,
+      'comments' => array(),
+      'comment_form' => array(),
+    );
+  }
+
+  return $additions;
+}
diff --git a/modules/render_cache_context/context/plugins/render_cache_hijack_context_reaction_block.inc b/modules/render_cache_context/context/plugins/render_cache_hijack_context_reaction_block.inc
new file mode 100644
index 0000000..3321de0
--- /dev/null
+++ b/modules/render_cache_context/context/plugins/render_cache_hijack_context_reaction_block.inc
@@ -0,0 +1,273 @@
+<?php
+
+class render_cache_hijack_context_reaction_block extends context_reaction_block {
+
+  /**
+   * {@inheritdoc}
+   */
+  function block_get_blocks_by_region($region) {
+    module_load_include('module', 'block', 'block');
+
+    $build = $this->block_list_build($region);
+    if ($this->is_editable_region($region)) {
+      $build = $this->editable_region($region, $build);
+    }
+    return $build;
+  }
+
+  /**
+   * Support the optional aggressive block list caching.
+   *
+   * Otherwise system_cron() clears context cache and parent::get_blocks()
+   * runs _block_rehash(), which is slow, every 30 minutes.
+   *
+   * @param string|null $region
+   * @param object|null $context
+   * @param bool $reset
+   *
+   * @return array|bool
+   */
+  function get_blocks($region = NULL, $context = NULL, $reset = FALSE) {
+    if (!variable_get('render_cache_cache_block_list', TRUE)) {
+      return parent::get_blocks($region, $context, $reset);
+    }
+
+    $hash = md5(serialize(array($region, $context)));
+    $cid = "render_cache:context_reaction_block:block_list:$hash";
+
+    if (!$reset) {
+      $cache = cache_get($cid);
+      if (!empty($cache->data)) {
+        return $cache->data;
+      }
+    }
+
+    $blocks = parent::get_blocks($region, $context, $reset);
+    cache_set($cid, $blocks);
+    return $blocks;
+  }
+
+  /**
+   * A caching version of block_list() .
+   *
+   * @param string $region
+   *   The region to get blocks from.
+   *
+   * @return array
+   *   A render array for this region. This render array will only contain
+   *   #markup elements.
+   */
+  function block_list_build($region) {
+    global $theme;
+
+    $cache_info_default = render_cache_cache_info_defaults();
+    $cache_info_default['keys'] = array(
+      'render_cache',
+    );
+
+    drupal_alter('render_cache_block_default_cache_info', $cache_info_default, $default_alter_context);
+    $markup = & drupal_static('context_reaction_block_list_build');;
+    $contexts = context_active_contexts();
+    $cid_map = array();
+    $cache_info_map = array();
+    if (!isset($markup)) {
+      $info = $this->get_blocks();
+      $markup = array();
+      $context_blocks = array();
+      foreach ($contexts as $context) {
+        $options = $this->fetch_from_context($context);
+        if (!empty($options['blocks'])) {
+          foreach ($options['blocks'] as $context_block) {
+            $bid = "{$context_block['module']}-{$context_block['delta']}";
+            if (isset($info[$bid])) {
+              $block = (object) array_merge((array) $info[$bid], $context_block);
+              $block->bid = $bid;
+              $block->context = $context->name;
+              $block->title = isset($info[$block->bid]->title) ? $info[$block->bid]->title : NULL;
+              $alter_context = array(
+                'context' => $context,
+                'bid' => $bid,
+                'module' => $context_block['module'],
+                'delta' => $context_block['delta'],
+                'granularity' => isset($info[$block->bid]->cache) ? $info[$block->bid]->cache : DRUPAL_NO_CACHE,
+              );
+              $alter_context['region'] = $block->region;
+
+              $cache_info = $cache_info_default;
+              $cache_info['keys'][] = $block->region;
+              $cache_info['keys'][] = $bid;
+
+              $cid_map[$bid] = $this->render_cache_get_cid($block, $cache_info, $alter_context);
+              $cache_info_map[$bid] = $cache_info;
+              $context_blocks[$block->region][$block->bid] = $block;
+              $block->cache = DRUPAL_NO_CACHE;
+            }
+          }
+        }
+      }
+
+      $cids = array_filter(array_values($cid_map));
+      $cached_blocks = $cids ? cache_get_multiple($cids, 'cache_render') : array();
+
+      $this->is_editable_check($context_blocks);
+      $active_regions = $this->system_region_list($theme);
+      foreach ($context_blocks as $r => $blocks) {
+        $markup[$r] = array();
+        //only render blocks in an active region
+        if (array_key_exists($r, $active_regions)) {
+          // Sort blocks.
+          uasort($blocks, array('context_reaction_block', 'block_sort'));
+          foreach ($blocks as $bid => $block) {
+            $cid = $cid_map[$bid];
+            if (isset($cached_blocks[$cid])) {
+              $build = $cached_blocks[$cid]->data;
+            }
+            else {
+              $this->build_block($block);
+              // Make blocks editable if allowed.
+              if ($this->is_editable_region($r)) {
+                $this->editable_block($block);
+              }
+              $build = $this->render_cache_block($block, $bid, $cid_map[$bid], $cache_info_map[$bid]);
+            }
+
+            // Run any post-render callbacks.
+            render_cache_process_attached_callbacks($build, $bid);
+
+            // context_reaction_block::get_blocks() uses - between module and
+            // delta but core uses underscore and theming expects that.
+            $markup[$r]["{$block->module}_{$block->delta}"] = $build;
+          }
+        }
+      }
+    }
+    return isset($markup[$region]) ? $markup[$region] : array();
+  }
+
+  /**
+   * Build the cache ID and cache information array.
+   *
+   * @param object $block
+   *   The block object
+   * @param array $cache_info
+   *   The cache information array.
+   * @param array $context
+   *   The context.
+   *
+   * @return string
+   *   The cache ID.
+   */
+  protected function render_cache_get_cid($block, &$cache_info, $context) {
+    $cache_info += render_cache_cache_info_defaults();
+
+    drupal_alter('render_cache_block_cache_info', $cache_info, $block, $context);
+    if ($cache_info['granularity'] == DRUPAL_NO_CACHE) {
+      return NULL;
+    }
+
+    $cid_parts = array();
+    $hash = array();
+
+    if (!empty($cache_info['keys']) && is_array($cache_info['keys'])) {
+      $cid_parts = $cache_info['keys'];
+    }
+
+
+    // Add drupal_render cid_parts based on granularity
+    $granularity = isset($cache_info['granularity']) ? $cache_info['granularity'] : NULL;
+    $cid_parts = array_merge($cid_parts, drupal_render_cid_parts($granularity));
+
+    $hash['module'] = $context['module'];
+    $hash['delta'] = $context['delta'];
+    $hash['context'] = $context['context']->name;
+    // @todo relevant for blocks?
+    $hash['render_method'] = !empty($cache_info['render_cache_render_to_markup']);
+    if ($hash['render_method']) {
+      $hash['render_options'] = serialize($cache_info['render_cache_render_to_markup']);
+    }
+
+    // Allow modules to modify $hash for custom invalidating.
+    drupal_alter('render_cache_block_hash', $hash, $block, $cache_info, $context);
+
+    $cid_parts[] = sha1(implode('-', $hash));
+    drupal_alter('render_cache_block_cid', $cid_parts, $block, $cache_info, $context);
+
+    return implode(':', $cid_parts);
+  }
+
+  /**
+   * This is a shortened copy of _block_render_blocks().
+   *
+   * @param stdClass $block
+   *   A block object. $block->content and $block->subject will be filled in.
+   */
+  protected function build_block($block) {
+    $array = module_invoke($block->module, 'block_view', $block->delta);
+
+    // Valid PHP function names cannot contain hyphens.
+    $delta = str_replace('-', '_', $block->delta);
+    // Allow modules to modify the block before it is viewed, via either
+    // hook_block_view_alter() or hook_block_view_MODULE_DELTA_alter().
+    drupal_alter(array('block_view', "block_view_{$block->module}_{$delta}"), $array, $block);
+    if (isset($array) && is_array($array)) {
+      foreach ($array as $k => $v) {
+        $block->$k = $v;
+      }
+    }
+    if (isset($block->content) && $block->content) {
+      // Normalize to the drupal_render() structure.
+      if (is_string($block->content)) {
+        $block->content = array('#markup' => $block->content);
+      }
+      // Override default block title if a custom display title is present.
+      if ($block->title) {
+        // Check plain here to allow module generated titles to keep any
+        // markup.
+        $block->subject = $block->title == '<none>' ? '' : check_plain($block->title);
+      }
+      if (!isset($block->subject)) {
+        $block->subject = '';
+      }
+    }
+  }
+
+  /**
+   * Render and cache a block.
+   *
+   * @param stdClass $block
+   *   A block object.
+   * @param string $bid
+   *   The block id in $module-$delta format.
+   * @param string $cid
+   *   The cache id.
+   * @param array $cache_info
+   *   The cache information array.
+   *
+   * @return string
+   *   The rendered HTML for the block.
+   */
+  protected function render_cache_block($block, $bid, $cid, $cache_info) {
+    if (is_string($block->content)) {
+      $block->content = array('#markup' => $block->content);
+    }
+    $build = $block->content;
+    unset($block->content);
+    $build += array('#attached' => array());
+    if ($bid != 'system-main' && $bid != 'system-help') {
+      $build['#contextual_links']['block'] = array('admin/structure/block/manage', array($block->module, $block->delta));
+    }
+    $build['#block'] = $block;
+    $build['#theme_wrappers'][] ='block';
+
+    if (!empty($cid)) {
+      $build['#cache'] = $cache_info;
+      $build['#cache']['cid'] = $cid;
+      return array(
+        '#markup'   => drupal_render($build),
+        '#attached' => drupal_render_collect_attached($build, TRUE),
+      );
+    }
+    return $build;
+  }
+
+}
diff --git a/modules/render_cache_context/render_cache_context.info b/modules/render_cache_context/render_cache_context.info
new file mode 100644
index 0000000..480a7d9
--- /dev/null
+++ b/modules/render_cache_context/render_cache_context.info
@@ -0,0 +1,9 @@
+name = Render cache for context blocks
+description = Hijacks the context block plugin to enable better caching control
+package = Performance and scalability
+core = 7.x
+
+dependencies[] = render_cache
+dependencies[] = context (>=7.x-3.3)
+
+files[] = context/plugins/render_cache_hijack_context_reaction_block.inc
diff --git a/modules/render_cache_context/render_cache_context.module b/modules/render_cache_context/render_cache_context.module
new file mode 100644
index 0000000..f2f136f
--- /dev/null
+++ b/modules/render_cache_context/render_cache_context.module
@@ -0,0 +1,29 @@
+<?php
+
+/**
+ * Implements hook_context_registry_alter().
+ *
+ * @param array[] $registry
+ */
+function render_cache_context_context_registry_alter(&$registry) {
+  $registry['reactions']['block']['plugin'] = 'render_cache_hijack_context_reaction_block';
+}
+
+/**
+ * Implementation of hook_context_plugins().
+ *
+ * This is a ctools plugins hook.
+ *
+ * @return array[]
+ */
+function render_cache_context_context_plugins() {
+  $plugins['render_cache_hijack_context_reaction_block'] = array(
+    'handler' => array(
+      'path' => drupal_get_path('module', 'render_cache_context') . '/context/plugins',
+      'file' => 'render_cache_hijack_context_reaction_block.inc',
+      'class' => 'render_cache_hijack_context_reaction_block',
+      'parent' => 'context_reaction_block',
+    ),
+  );
+  return $plugins;
+}
diff --git a/modules/render_cache_ds/render_cache_ds.info b/modules/render_cache_ds/render_cache_ds.info
new file mode 100644
index 0000000..0cc419e
--- /dev/null
+++ b/modules/render_cache_ds/render_cache_ds.info
@@ -0,0 +1,11 @@
+name = Render cache for display suite views integration
+description = Hijacks the display suite row plugin of views to enable entity_view caching.
+package = Performance and scalability
+core = 7.x
+
+dependencies[] = render_cache
+dependencies[] = views
+dependencies[] = ds
+dependencies[] = entity
+
+files[] = views/plugins/render_cache_hijack_views_plugin_ds_entity_view.inc
diff --git a/modules/render_cache_ds/render_cache_ds.module b/modules/render_cache_ds/render_cache_ds.module
new file mode 100644
index 0000000..525d263
--- /dev/null
+++ b/modules/render_cache_ds/render_cache_ds.module
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * @file
+ * Hook implementations and frequently used functions for render cache ds module.
+ */
+
+/**
+ * Implements hook_views_api().
+ */
+function render_cache_ds_views_api() {
+  return array(
+    'api' => 3,
+    'path' => drupal_get_path('module', 'render_cache_ds') . '/views',
+  );
+}
+
diff --git a/modules/render_cache_ds/views/plugins/render_cache_hijack_views_plugin_ds_entity_view.inc b/modules/render_cache_ds/views/plugins/render_cache_hijack_views_plugin_ds_entity_view.inc
new file mode 100644
index 0000000..ec8d670
--- /dev/null
+++ b/modules/render_cache_ds/views/plugins/render_cache_hijack_views_plugin_ds_entity_view.inc
@@ -0,0 +1,157 @@
+<?php
+
+/**
+ * @file
+ * Contains the display suite row style plugin hijack for caching.
+ */
+
+/**
+ * Plugin which defines the view mode on the resulting entity object.
+ *
+ * Enabled for caching via entity_view().
+ */
+class render_cache_hijack_views_plugin_ds_entity_view extends views_plugin_ds_entity_view {
+
+  /**
+   * Overrides views_plugin_ds_entity_view::ds_views_row_render_entity().
+   *
+   * @todo Ask DS to provide a method to return the render function
+   *       and override it here.
+   *
+   * @param string $view_mode
+   *   The view mode which is set in the Views' options.
+   * @param object $row
+   *   The current active row object being rendered.
+   * @param bool $load_comments
+   *
+   * @return string
+   *   An entity view rendered as HTML
+   */
+  function ds_views_row_render_entity($view_mode, $row, $load_comments) {
+    // Save the original base table.
+    $original_base_table = $this->base_table;
+    // Override the base table as that will change the render function being called.
+    $this->base_table = 'render_cache_' . $this->base_table;
+
+    // This context is created by the parent function _after_ rendering.
+    // We need to provide the context for caching purposes within the entity.
+    $context = array(
+      'row' => $row,
+      'view' => &$this->view,
+      'view_mode' => $view_mode,
+      'load_comments' => $load_comments,
+    );
+    $this->entities[$row->{$this->field_alias}]->render_cache_ds_context = $context;
+
+    // Call the original function
+    $output = parent::ds_views_row_render_entity($view_mode, $row, $load_comments);
+    // And restore the base table again,
+    $this->base_table = $original_base_table;
+    return $output;
+  }
+}
+
+/**
+ * Render the node through the entity plugin.
+ *
+ * @param object $entity
+ * @param string $view_mode
+ * @param bool $load_comments
+ *
+ * @return array
+ *   A Drupal render array.
+ *
+ * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
+ */
+function ds_views_row_render_render_cache_node($entity, $view_mode, $load_comments) {
+  $node_display = render_cache_entity_view_single('node', $entity, $view_mode);
+  if ($load_comments && module_exists('comment')) {
+    $node_display['comments'] = comment_node_page_additions($entity);
+  }
+  return $node_display;
+}
+
+/**
+ * Render the comment through the entity plugin.
+ *
+ * @param object $entity
+ * @param string $view_mode
+ * @param bool $load_comments
+ *
+ * @return array
+ *   A Drupal render array.
+ *
+ * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
+ */
+function ds_views_row_render_render_cache_comment($entity, $view_mode, $load_comments) {
+  $element = render_cache_entity_view_single('comment', $entity, $view_mode);
+  return $element;
+}
+
+/**
+ * Render the user through the entity plugin.
+ *
+ * @param object $entity
+ * @param string $view_mode
+ * @param bool $load_comments
+ *
+ * @return array
+ *   A Drupal render array.
+ *
+ * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
+ */
+function ds_views_row_render_render_cache_users($entity, $view_mode, $load_comments) {
+  $element = render_cache_entity_view_single('user', $entity, $view_mode);
+  return $element;
+}
+
+/**
+ * Render the taxonomy term through the entity plugin.
+ *
+ * @param object $entity
+ * @param string $view_mode
+ * @param bool $load_comments
+ *
+ * @return array
+ *   A Drupal render array.
+ *
+ * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
+ */
+function ds_views_row_render_render_cache_taxonomy_term_data($entity, $view_mode, $load_comments) {
+  $element = render_cache_entity_view_single('taxonomy_term', $entity, $view_mode);
+  return $element;
+}
+
+/**
+ * Render the file through the entity plugin.
+ *
+ * @param object $entity
+ * @param string $view_mode
+ * @param bool $load_comments
+ *
+ * @return array
+ *   A Drupal render array.
+ *
+ * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
+ */
+function ds_views_row_render_render_cache_file_managed($entity, $view_mode, $load_comments) {
+  $element = render_cache_entity_view_single('file', $entity, $view_mode);
+  return $element;
+}
+
+/**
+ * Render the micro through the entity plugin.
+ *
+ * @param object $entity
+ * @param string $view_mode
+ * @param bool $load_comments
+ *
+ * @return array
+ *   A Drupal render array.
+ *
+ * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
+ */
+function ds_views_row_render_render_cache_micro($entity, $view_mode, $load_comments) {
+  $element = render_cache_entity_view_single('micro', $entity, $view_mode);
+  return $element;
+}
diff --git a/modules/render_cache_ds/views/render_cache_ds.views.inc b/modules/render_cache_ds/views/render_cache_ds.views.inc
new file mode 100644
index 0000000..6c56b80
--- /dev/null
+++ b/modules/render_cache_ds/views/render_cache_ds.views.inc
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * Implements hook_views_plugins_alter().
+ *
+ * @param array[] $plugins
+ */
+function render_cache_ds_views_plugins_alter(&$plugins) { 
+  $plugins['row']['ds']['handler'] = 'render_cache_hijack_views_plugin_ds_entity_view';
+}
diff --git a/modules/render_cache_node/render_cache_node.info b/modules/render_cache_node/render_cache_node.info
new file mode 100644
index 0000000..b58d9af
--- /dev/null
+++ b/modules/render_cache_node/render_cache_node.info
@@ -0,0 +1,7 @@
+name = Render cache for node_show
+description = Hijacks the node_show callback to enable entity_view caching.
+package = Performance and scalability
+core = 7.x
+
+dependencies[] = render_cache
+dependencies[] = entity
diff --git a/modules/render_cache_node/render_cache_node.module b/modules/render_cache_node/render_cache_node.module
new file mode 100644
index 0000000..d995c72
--- /dev/null
+++ b/modules/render_cache_node/render_cache_node.module
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * @file
+ * Hijacks node_show router path to enable entity_view caching.
+ */
+
+/**
+ * Implements hook_menu_alter().
+ *
+ * @param array[] $items
+ */
+function render_cache_node_menu_alter(&$items) {
+  // Use a custom callback for node/% to use entity_view caching().
+  $items['node/%node']['page callback'] = 'render_cache_node_node_show';
+}
+
+/**
+ * Overrides node_show().
+ *
+ * This uses entity_view() instead of node_view_multiple to enable
+ * entity_view() render caching.
+ *
+ * @param object $node
+ * @param bool $message
+ *   A flag which sets a page title relevant to the revision being viewed.
+ *
+ * @return array
+ *   A Drupal render array.
+ *
+ * @see node_show()
+ */
+function render_cache_node_node_show($node, $message = FALSE) {
+  // If there is a menu link to this node, the link becomes the last part
+  // of the active trail, and the link name becomes the page title.
+  // Thus, we must explicitly set the page title to be the node title.
+  drupal_set_title($node->title);
+  $uri = entity_uri('node', $node);
+  // Set the node path as the canonical URL to prevent duplicate content.
+  drupal_add_html_head_link(array('rel' => 'canonical', 'href' => url($uri['path'], $uri['options'])), TRUE);
+  // Set the non-aliased path as a default shortlink.
+  drupal_add_html_head_link(array('rel' => 'shortlink', 'href' => url($uri['path'], array_merge($uri['options'], array('alias' => TRUE)))), TRUE);
+
+  // Do not cache if there is a message.
+  if ($message) {
+    return node_view($node, $message);
+  }
+
+  // Use entity_view to display this node potentially cached.
+  // entity_view() is almost compatible to node_view_multiple().
+  // just the key is different ('node' vs 'nodes').
+  $nodes = entity_view('node', array($node->nid => $node), 'full');
+
+  // Update the history table, stating that this user viewed this node.
+  node_tag_new($node);
+
+  // Re-key the array key here to be compatible to normal node_show().
+  if (isset($nodes['node'])) {
+    return array(
+      'nodes' => $nodes['node'],
+    );
+  }
+  return $nodes;
+}
diff --git a/modules/render_cache_views/render_cache_views.info b/modules/render_cache_views/render_cache_views.info
new file mode 100644
index 0000000..02a0a72
--- /dev/null
+++ b/modules/render_cache_views/render_cache_views.info
@@ -0,0 +1,11 @@
+name = Render cache for views_plugin_row_node_view
+description = Hijacks the node_view row plugin of views to enable entity_view caching.
+package = Performance and scalability
+core = 7.x
+
+dependencies[] = render_cache
+dependencies[] = views
+dependencies[] = entity
+
+files[] = views/plugins/render_cache_hijack_views_handler_field_field.inc
+files[] = views/plugins/render_cache_hijack_views_plugin_row_node_view.inc
diff --git a/modules/render_cache_views/render_cache_views.module b/modules/render_cache_views/render_cache_views.module
new file mode 100644
index 0000000..4df3cdc
--- /dev/null
+++ b/modules/render_cache_views/render_cache_views.module
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * @file
+ * Hook implementations and frequently used functions for render cache views module.
+ */
+
+/**
+ * Implements hook_views_api().
+ */
+function render_cache_views_views_api() {
+  return array(
+    'api' => 3,
+    'path' => drupal_get_path('module', 'render_cache_views') . '/views',
+  );
+}
+
diff --git a/modules/render_cache_views/views/plugins/render_cache_hijack_views_handler_field_field.inc b/modules/render_cache_views/views/plugins/render_cache_hijack_views_handler_field_field.inc
new file mode 100644
index 0000000..3e3ebcf
--- /dev/null
+++ b/modules/render_cache_views/views/plugins/render_cache_hijack_views_handler_field_field.inc
@@ -0,0 +1,61 @@
+<?php
+
+class render_cache_hijack_views_handler_field_field extends views_handler_field_field {
+
+  /**
+   * Override views_handler_field_field::render() to add caching.
+   */
+  function set_items($values, $row_id) {
+    // In some cases the instance on the entity might be easy, see
+    // https://drupal.org/node/1161708 and https://drupal.org/node/1461536 for
+    // more information.
+    if (empty($values->_field_data[$this->field_alias]) || empty($values->_field_data[$this->field_alias]['entity']) || !isset($values->_field_data[$this->field_alias]['entity']->{$this->definition['field_name']})) {
+      return array();
+    }
+
+    $display = array(
+      'type' => $this->options['type'],
+      'settings' => $this->options['settings'],
+      'label' => 'hidden',
+      // Pass the View object in the display so that fields can act on it.
+      'views_view' => $this->view,
+      'views_field' => $this,
+      'views_row_id' => $row_id,
+    );
+
+
+    $entity_type = $values->_field_data[$this->field_alias]['entity_type'];
+    $entity = $this->get_value($values, 'entity');
+    if (!$entity) {
+      return array();
+    }
+
+    $langcode = $this->field_language($entity_type, $entity);
+    $render_array = render_cache_view_field($entity_type, $entity, $this->definition['field_name'], $display, $langcode);
+
+    $items = array();
+    if ($this->options['field_api_classes']) {
+      // Make a copy.
+      $array = $render_array;
+      return array(array('rendered' => drupal_render($render_array)));
+    }
+
+    foreach (element_children($render_array) as $count) {
+      $items[$count]['rendered'] = $render_array[$count];
+      // field_view_field() adds an #access property to the render array that
+      // determines whether or not the current user is allowed to view the
+      // field in the context of the current entity. We need to respect this
+      // parameter when we pull out the children of the field array for
+      // rendering.
+      if (isset($render_array['#access'])) {
+        $items[$count]['rendered']['#access'] = $render_array['#access'];
+      }
+      // Only add the raw field items (for use in tokens) if the current user
+      // has access to view the field content.
+      if ((!isset($items[$count]['rendered']['#access']) || $items[$count]['rendered']['#access']) && !empty($render_array['#items'][$count])) {
+        $items[$count]['raw'] = $render_array['#items'][$count];
+      }
+    }
+    return $items;
+  }
+}
diff --git a/modules/render_cache_views/views/plugins/render_cache_hijack_views_plugin_row_node_view.inc b/modules/render_cache_views/views/plugins/render_cache_hijack_views_plugin_row_node_view.inc
new file mode 100644
index 0000000..cfb049f
--- /dev/null
+++ b/modules/render_cache_views/views/plugins/render_cache_hijack_views_plugin_row_node_view.inc
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ * @file
+ * Contains the node view row style plugin hijack for caching.
+ */
+
+/**
+ * Plugin which performs a node_view on the resulting object.
+ *
+ * Attempts to cache rendered nodes per view mode and language.
+ *
+ * @ingroup views_row_plugins
+ */
+class render_cache_hijack_views_plugin_row_node_view extends views_plugin_row_node_view {
+
+  /**
+   * Overrides parent::render() to add caching.
+   *
+   * @param stdClass $row
+   *   A single row of the query result, so an element of $view->result.
+   *
+   * @return string|null
+   *   The rendered output of a single row, used by the style plugin.
+   *
+   * @see views_plugin_row_node_view::render()
+   */
+  function render($row) {
+    if (isset($this->nodes[$row->{$this->field_alias}])) {
+      $node = $this->nodes[$row->{$this->field_alias}];
+      $node->view = $this->view;
+
+      // Use render_cache_entity_view_single to display this node potentially cached.
+      $build = render_cache_entity_view_single('node', $node, $this->options['view_mode']);
+
+      return drupal_render($build);
+    }
+
+    return NULL;
+  }
+}
diff --git a/modules/render_cache_views/views/render_cache_views.views.inc b/modules/render_cache_views/views/render_cache_views.views.inc
new file mode 100644
index 0000000..60cee46
--- /dev/null
+++ b/modules/render_cache_views/views/render_cache_views.views.inc
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * Implements hook_views_plugins_alter().
+ *
+ * @param array[] $plugins
+ */
+function render_cache_views_views_plugins_alter(&$plugins) {
+  $plugins['row']['node']['handler'] = 'render_cache_hijack_views_plugin_row_node_view';
+}
+
+/**
+ * Implements hook_field_views_data_alter().
+ */
+function render_cache_field_views_data_alter(&$result, $field, $module) {
+  foreach ($result as $table => $columns) {
+    foreach ($columns as $key => $column) {
+      if (!empty($column['field']['handler']) && $column['field']['handler'] == 'views_handler_field_field') {
+        $result[$table][$key]['field']['handler'] = 'render_cache_hijack_views_handler_field_field';
+      }
+    }
+  }
+}
diff --git a/modules/renderer/render_cache_big_pipe/README.txt b/modules/renderer/render_cache_big_pipe/README.txt
deleted file mode 100644
index a0fe4af..0000000
--- a/modules/renderer/render_cache_big_pipe/README.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-- Enable the module
-- Ensure to add the following to your e.g. hook_render_cache_block_cache_info_alter():
-
-/**
- * Implements hook_render_cache_block_cache_info_alter().
- */
-function rc_site_render_cache_block_cache_info_alter(&$cache_info, $object, $context) {
-  if ($context['module'] == 'rc_site') {
-    // Need at least custom granularity for now.
-    $cache_info['granularity'] = DRUPAL_CACHE_CUSTOM; 
-    $cache_info['render_strategy'][] = 'big_pipe';
-  }
-}
-
-- If you want to split the html.tpl.php at a different point add a comment to show where to SPLIT:
-
-<!-- X-RENDER-CACHE-BIG-PIPE-SPLIT -->
diff --git a/modules/renderer/render_cache_big_pipe/render_cache_big_pipe.info b/modules/renderer/render_cache_big_pipe/render_cache_big_pipe.info
deleted file mode 100644
index 82ae755..0000000
--- a/modules/renderer/render_cache_big_pipe/render_cache_big_pipe.info
+++ /dev/null
@@ -1,8 +0,0 @@
-name = Render Cache - Big Pipe 
-description = Implements big_pipe processing for placeholders
-package = Performance and scalability
-core = 7.x
-
-dependencies[] = render_cache_page
-
-registry_autoload[] = PSR-4
diff --git a/modules/renderer/render_cache_big_pipe/render_cache_big_pipe.module b/modules/renderer/render_cache_big_pipe/render_cache_big_pipe.module
deleted file mode 100644
index 9be1aee..0000000
--- a/modules/renderer/render_cache_big_pipe/render_cache_big_pipe.module
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-/**
- * @file
- * Hook implementations and frequently used functions for render cache big pipe module.
- */
-
-use Drupal\render_cache_big_pipe\RenderCache\RenderStrategy\BigPipeRenderStrategy;
-
-// -----------------------------------------------------------------------
-// Contrib Hooks
-
-/**
- * Implements hook_ctools_plugin_directory().
- *
- * @param string $owner
- * @param string $plugin_type
- *
- * @return null|string
- */
-function render_cache_big_pipe_ctools_plugin_directory($owner, $plugin_type) {
-  if ($owner == 'render_cache') {
-    return 'src/RenderCache/' . $plugin_type;
-  }
-
-  return NULL;
-}
-
-/**
- * Implements hook_render_cache_page_pre_send_alter().
- *
- * @param array $build
- */
-function render_cache_big_pipe_render_cache_page_pre_send_alter(&$markup, &$build) {
-  if (!class_exists("\\Drupal\\render_cache_big_pipe\\RenderCache\\RenderStrategy\\BigPipeRenderStrategy")) {
-    return;
-  }
-  $placeholders = BigPipeRenderStrategy::getPlaceholders();
-
-  if (empty($placeholders)) {
-    return;
-  }
-  $split = '<!-- X-RENDER-CACHE-BIG-PIPE-SPLIT -->';
-  if (strpos($markup, $split) === FALSE) {
-    $split = '</body>';
-  }
-
-  $page_parts = explode($split, $markup);
-
-  if (count($page_parts) !== 2) {
-    // Something went wrong, we can't big pipe this page.
-    return;
-  }
-
-  // Store for later usage.
-  $build['#render_cache_big_pipe_placeholders'] = $placeholders;
-  $build['#render_cache_bottom'] = $split . $page_parts[1];
-
-  // And replace markup with just the upper part.
-  $markup = $page_parts[0];
-}
-
-/**
- * Implements hook_render_cache_page_post_send_alter().
- *
- * @param string $markup
- * @param array $build
- *
- * @throws \Exception
- */
-function render_cache_big_pipe_render_cache_page_post_send_alter(&$markup, $build) {
-  if (empty($build['#render_cache_big_pipe_placeholders'])) {
-    return;
-  }
-
-  // Immediately output things so far.
-  ob_implicit_flush(TRUE);
-  ob_end_flush();
-
-  $rcs = render_cache_get_renderer('big_pipe');
-  if (!$rcs instanceof BigPipeRenderStrategy) {
-    throw new \Exception("Invalid big pipe renderer.");
-  }
-
-  // @todo Add helper function.
-  $behaviors = <<<EOF
-<script type="text/javascript">
-// We know we are at the end of the request parsing, so start processing behaviors.
-Drupal.attachBehaviors();
-</script>
-EOF;
-  // @todo It seems that $behaviors is printed twice..
-  print $behaviors;
-
-  // Replace the placeholders.
-  foreach ($build['#render_cache_big_pipe_placeholders'] as $placeholder => $ph_object) {
-    // Check if the placeholder is present at all.
-    if (strpos($markup, $placeholder) === FALSE) {
-      continue;
-    }
-
-    print $rcs->renderPlaceholder($placeholder, $ph_object);
-  }
-  // Now that we have processed all the placeholders, attach the behaviors
-  // on the page again.
-  print $behaviors;
-
-  // Now render the scripts and closing body tag.
-  print $build['#render_cache_bottom'];
-
-  // Now start output buffering again, so that drupal_page_footer() won't fail.
-  ob_start();
-}
-
-// -----------------------------------------------------------------------
-// Public API
diff --git a/modules/renderer/render_cache_big_pipe/src/RenderCache/RenderStrategy/BigPipeRenderStrategy.php b/modules/renderer/render_cache_big_pipe/src/RenderCache/RenderStrategy/BigPipeRenderStrategy.php
deleted file mode 100644
index 106d67b..0000000
--- a/modules/renderer/render_cache_big_pipe/src/RenderCache/RenderStrategy/BigPipeRenderStrategy.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache_big_pipe\RenderCache\RenderStrategy\BigPipeRenderStrategy
- */
-
-namespace Drupal\render_cache_big_pipe\RenderCache\RenderStrategy;
-
-use Drupal\render_cache\RenderCache\RenderStrategy\BaseRenderStrategy;
-
-/**
- * Big Pipe RenderStrategy - Provides big pipe processing for placeholders.
- *
- * @ingroup rendercache
- */
-class BigPipeRenderStrategy extends BaseRenderStrategy {
-
-  protected static $placeholders = array();
-
-  public static function getPlaceholders() {
-    return static::$placeholders;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function render(array $args) {
-    $placeholders = array();
-    foreach ($args as $placeholder => $ph_object) {
-      // @todo Replace with a nice loading theme.
-      $placeholders[$placeholder] = array();
-      $id = drupal_html_id('render-cache-big-pipe-' . $ph_object['type'] . '-' . $ph_object['id']);
-      $placeholders[$placeholder]['#markup'] = '<div id="' . $id . '"></div>';
-
-      // Store the data for later usage.
-      static::$placeholders[$id] = $ph_object;
-    }
-
-    return $placeholders;
-  }
-
-  public function renderPlaceholder($placeholder, $ph_object) {
-    $rcc = render_cache_get_controller($ph_object['type']);
-    $rcc->setContext($ph_object['context']);
-    $objects = array(
-      $ph_object['id'] => $ph_object['object'],
-    );
-    $build = $rcc->viewPlaceholders($objects);
-    $output = drupal_render($build);
-
-    $html = drupal_json_encode($output);
-
-    // @todo Add helper function.
-    $markup = <<<EOF
-<script type="text/javascript">
-var element = document.getElementById("$placeholder");
-var newElement = document.createElement("span");
-newElement.innerHTML = $html;
-var newChild = newElement.firstChild;
-element.parentNode.replaceChild(newChild, element);
-</script>
-EOF;
-
-    return $markup;
-  }
-}
diff --git a/modules/renderer/render_cache_big_pipe/src/RenderCache/RenderStrategy/big_pipe.inc b/modules/renderer/render_cache_big_pipe/src/RenderCache/RenderStrategy/big_pipe.inc
deleted file mode 100644
index 4805c21..0000000
--- a/modules/renderer/render_cache_big_pipe/src/RenderCache/RenderStrategy/big_pipe.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-
-$plugin = array(
-  'class' => "\\Drupal\\render_cache_big_pipe\\RenderCache\\RenderStrategy\\BigPipeRenderStrategy",
-  'priority' => -1000,
-);
diff --git a/modules/renderer/render_cache_esi_validate/render_cache_esi_validate.info b/modules/renderer/render_cache_esi_validate/render_cache_esi_validate.info
deleted file mode 100644
index d8e7e96..0000000
--- a/modules/renderer/render_cache_esi_validate/render_cache_esi_validate.info
+++ /dev/null
@@ -1,8 +0,0 @@
-name = Render Cache - ESI Validate Strategy - ENABLE ONLY BEHIND VARNISH
-description = Implements esi_validate processing for placeholders - ENABLE ONLY BEHIND VARNISH.
-package = Performance and scalability
-core = 7.x
-
-dependencies[] = render_cache_page
-
-registry_autoload[] = PSR-4
diff --git a/modules/renderer/render_cache_esi_validate/render_cache_esi_validate.module b/modules/renderer/render_cache_esi_validate/render_cache_esi_validate.module
deleted file mode 100644
index 1c1b493..0000000
--- a/modules/renderer/render_cache_esi_validate/render_cache_esi_validate.module
+++ /dev/null
@@ -1,327 +0,0 @@
-<?php
-
-/**
- * @file
- * Hook implementations and frequently used functions for render cache esi module.
- */
-
-// -----------------------------------------------------------------------
-// Core Hooks
-
-/**
- * Implements hook_menu().
- */
-function render_cache_esi_validate_menu() {
-  $items = array();
-
-  $items['render-cache/esi-validate-session'] = array(
-    'page callback' => 'render_cache_esi_validate_session_render',
-    'access callback' => TRUE,
-    'delivery callback' => 'render_cache_esi_validate_session_deliver',
-    'type' => MENU_CALLBACK,
-  );
-  $items['render-cache/esi-validate-page'] = array(
-    'page callback' => 'render_cache_esi_validate_page_render',
-    'access callback' => 'render_cache_esi_validate_page_access',
-    'delivery callback' => 'render_cache_esi_validate_session_deliver',
-    'type' => MENU_CALLBACK,
-  );
-  $items['render-cache/esi-validate-render'] = array(
-    'page callback' => 'render_cache_esi_validate_render',
-    'access callback' => 'render_cache_esi_validate_access',
-    'delivery callback' => 'render_cache_esi_validate_deliver',
-    'type' => MENU_CALLBACK,
-  );
-
-  return $items;
-}
-
-// -----------------------------------------------------------------------
-// Contrib Hooks
-
-/**
- * Implements hook_ctools_plugin_directory().
- *
- * @param string $owner
- * @param string $plugin_type
- *
- * @return null|string
- */
-function render_cache_esi_validate_ctools_plugin_directory($owner, $plugin_type) {
-  if ($owner == 'render_cache') {
-    return 'src/RenderCache/' . $plugin_type;
-  }
-
-  return NULL;
-}
-
-/**
- * Implements hook_render_cache_page_cid_alter().
- *
- * @param string[] $cid_parts
- * @param array $cache_info
- * @param object $object
- * @param array $context
- */
-function render_cache_esi_validate_render_cache_page_cid_alter(&$cid_parts, $cache_info, $object, $context) {
-  // Unset the hash, not possible with ESI.
-  array_pop($cid_parts);
-}
-
-// -----------------------------------------------------------------------
-// Public API
-
-/**
- * @return bool
- */
-function render_cache_esi_validate_access() {
-  if (empty($_REQUEST['cid'])
-    || empty($_REQUEST['bin'])
-    || empty($_SERVER['HTTP_X_DRUPAL_UID'])
-    || empty($_SERVER['HTTP_X_DRUPAL_ROLES'])
-    || empty($_SERVER['HTTP_X_DRUPAL_THEME'])
-    || !user_is_logged_in()
-    || empty($_SERVER['HTTP_X_DRUPAL_ESI_VALIDATE'])
-    ) {
-    return FALSE;
-  }
-
-  $uid = $_SERVER['HTTP_X_DRUPAL_UID'];
-  if ($GLOBALS['user']->uid != $uid) {
-    return FALSE;
-  }
-
-  return TRUE;
-}
-
-/**
- * @return string
- */
-function render_cache_esi_validate_miss() {
-  // A cache miss is a pretty bad situation, though it should never happen
-  // as we just validated the cache.
-  // Because varnish does not let us restart the parent request, we need to return
-  // a script to reload the page with a special header.
-  $script =<<<EOF
-<script type="text/javascript">
-  document.location.href=document.location.href + '&no-esi=1';
-</script>
-
-EOF;
-
-  return $script;
-}
-
-/**
- * @return string
- */
-function render_cache_esi_validate_render() {
-  $cid = $_REQUEST['cid'];
-  $bin = $_REQUEST['bin'];
-
-  // @todo Allow to check parent cache entry instead,
-  //       which allows graceful fallback and use placeholder
-  //       here as callback key?
-
-  // Replace dynamic cache IDs.
-  // @todo Use helper function.
-  $cid = str_replace('%user', $GLOBALS['user']->uid, $cid);
-  $cache = cache_get($cid, $bin);
-
-  if (empty($cache->data)) {
-    return render_cache_esi_validate_miss();
-  }
-  // @todo Calculate cache header info from 'ttl' and 'age' in #cache.
-  $render = $cache->data;
-
-  // Cache for 10 min, if not said otherwise.
-  $ttl = 600;
-
-  drupal_add_http_header('Cache-Control', 'public, max-age: ' . $ttl);
-
-  // Send Akamai header just for future proofness.
-  drupal_add_http_header('Edge-Control', 'max-age: ' . $ttl);
-
-
-  return drupal_render($render);
-}
-
-/**
- * @param mixed $page_callback_result
- */
-function render_cache_esi_validate_deliver($page_callback_result) {
-  if (is_int($page_callback_result)) {
-    drupal_deliver_html_page($page_callback_result);
-    return;
-  }
-
-  // Copied code from drupal_deliver_html_page:
-
-  // Emit the correct charset HTTP header, but not if the page callback
-  // result is NULL, since that likely indicates that it printed something
-  // in which case, no further headers may be sent, and not if code running
-  // for this page request has already set the content type header.
-  if (isset($page_callback_result) && is_null(drupal_get_http_header('Content-Type'))) {
-    drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
-  }
-
-  // Send appropriate HTTP-Header for browsers and search engines.
-  global $language;
-  drupal_add_http_header('Content-Language', $language->language);
-
-  if (isset($page_callback_result)) {
-    // Print anything besides a menu constant, assuming it's not NULL or
-    // undefined.
-    print $page_callback_result;
-  }
-}
-
-// -----------------------------------------------------------------------
-// Session functions
-
-function render_cache_esi_validate_session_render() {
-  global $user, $theme;
-
-  if (!user_is_logged_in()) {
-    return MENU_ACCESS_DENIED;
-  }
-
-  // @todo Unused variable $roles (overwritten few lines below)
-  $roles = implode(',', $user->roles);
-
-  // No ESI for admins, etc.
-  // @todo Make configurable.
-  $roles = implode(', ', array_keys($user->roles));
-  if ($roles != '2') {
-    return MENU_ACCESS_DENIED;
-  }
-
-  // Cache the session response for 8 hours by default.
-  $ttl = variable_get('render_cache_esi_validate_session_ttl', 8 * 60 * 60);
-  drupal_add_http_header('Cache-Control', 'public, max-age: ' . $ttl);
-
-  // Send Akamai header just for future proofness.
-  drupal_add_http_header('Edge-Control', 'max-age: ' . $ttl);
-
-  // Send the roles header, varnish will store this request
-  // based on the SSESSID hash, so we have a handy SSESSID
-  // => uid,roles mapping.
-  drupal_add_http_header('X-Drupal-Uid', $user->uid);
-  drupal_add_http_header('X-Drupal-Roles', $roles);
-  drupal_add_http_header('X-Drupal-Theme', $theme);
-
-  return NULL;
-}
-
-function render_cache_esi_validate_session_deliver($page_callback_result) {
-  if ($page_callback_result == MENU_ACCESS_DENIED) {
-    drupal_add_http_header('Status', '403 Forbidden');
-  }
-  else if ($page_callback_result == MENU_NOT_FOUND) {
-    drupal_add_http_header('Status', '404 Not found');
-  }
-  else {
-    drupal_add_http_header('Status', '200 OK');
-    if (isset($page_callback_result)) {
-      // Print anything besides a menu constant, assuming it's not NULL or
-      // undefined.
-      print $page_callback_result;
-    }
-  }
-}
-
-// -----------------------------------------------------------------------
-// Page validation function.
-
-/**
- * @return bool
- */
-function render_cache_esi_validate_page_access() {
-  if (empty($_SERVER['HTTP_X_DRUPAL_ROLES'])
-    || empty($_SERVER['HTTP_X_DRUPAL_UID'])
-    || empty($_SERVER['HTTP_X_DRUPAL_THEME'])
-    || !user_is_logged_in()
-    || empty($_SERVER['HTTP_X_DRUPAL_TRY_ESI_VALIDATE'])
-    || empty($_SERVER['HTTP_X_DRUPAL_REQUEST_URL'])
-  ) {
-    return FALSE;
-  }
-
-  $uid = $_SERVER['HTTP_X_DRUPAL_UID'];
-  if ($GLOBALS['user']->uid != $uid) {
-    return FALSE;
-  }
-
-  return TRUE;
-}
-
-/**
- * Returns whether the page can be taken from the cache.
- *
- * Or whether it should be pass()'ed.
- *
- * @return int|null
- *   - MENU_NOT_FOUND when the cache could not be validated
- *     and a fresh copy needs to be used.
- *   - NULL otherwise.
- */
-function render_cache_esi_validate_page_render() {
-  global $base_root;
-
-  // This does not use more than neccessary Drupal variables
-  // to be easier portable to pre-bootstrap script.
-  $request_url = $_SERVER['HTTP_X_DRUPAL_REQUEST_URL'];
-
-  $page = $base_root . $request_url;
-  $roles = $_SERVER['HTTP_X_DRUPAL_ROLES'];
-  $theme = $_SERVER['HTTP_X_DRUPAL_THEME'];
-
-  // @todo Do not hardcode and use special ESI bucket for this
-  //       that has all placeholder cache tags as well.
-  $cid = 'render_cache:page:drupal_deliver_html_page:' . $theme . ':r.' . $roles . ':' . $page;
-
-  // @todo do not hardcode.
-  $cache = cache_get($cid, 'cache_render');
-
-  if (empty($cache->data)) {
-    return MENU_NOT_FOUND;
-  }
-
-  $page = $cache->data;
-
-  if (empty($page['#render_cache_placeholders']['esi_validate'])) {
-    // Everything is okay, if we don't have any placeholders.
-    // Page can come from cache.
-    return NULL;
-  }
-
-  // @todo Validate cache tags here.
-
-  $placeholders = $page['#render_cache_placeholders'];
-  $cids = array();
-  foreach ($placeholders as $placeholder) {
-    // If cid empty or we are not responsible, just continue.
-    if (empty($placeholder['cache_info']['cid'])
-      || !in_array('esi_validate', $placeholder['render_strategy'])) {
-      continue;
-    }
-    $cids[$placeholder['cache_info']['bin']][] = $placeholder['cache_info']['cid'];
-  }
-
-  // @todo Undefined variable $cid_bins
-  foreach ($cid_bins as $bin => $cids) {
-
-    // @todo Unused variable $objects
-    $objects = cache_get_multiple($cids, $bin);
-
-    // If we get a cache miss, $cids will be populated and we return 404.
-    if (!empty($cids)) {
-      return MENU_NOT_FOUND;
-    }
-
-    // @todo Validate cache tags here.
-  }
-
-  // This can be coming from cache, the cache is ready for retrieval.
-  return NULL;
-}
diff --git a/modules/renderer/render_cache_esi_validate/src/RenderCache/RenderStrategy/EsiValidateRenderStrategy.php b/modules/renderer/render_cache_esi_validate/src/RenderCache/RenderStrategy/EsiValidateRenderStrategy.php
deleted file mode 100644
index cff8b67..0000000
--- a/modules/renderer/render_cache_esi_validate/src/RenderCache/RenderStrategy/EsiValidateRenderStrategy.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache_esi_validate\RenderCache\RenderStrategy\EsiValidateRenderStrategy
- */
-
-namespace Drupal\render_cache_esi_validate\RenderCache\RenderStrategy;
-
-use Drupal\render_cache\RenderCache\RenderStrategy\BaseRenderStrategy;
-
-/**
- * ESI Validate RenderStrategy - Provides esi processing for placeholders.
- *
- * @ingroup rendercache
- */
-class EsiValidateRenderStrategy extends BaseRenderStrategy {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function render(array $args) {
-    $placeholders = array();
-
-    // This will only work if the caller allows ESI.
-    if (empty($_SERVER['HTTP_X_DRUPAL_ESI_VALIDATE'])) {
-      return array();
-    }
-
-    foreach ($args as $placeholder => $ph_object) {
-      // If there is no cache ID, we can't ESI validate this.
-      if (empty($ph_object['cache_info']['cid'])) {
-	      continue;
-      }
-
-      $base_esi = 'render-cache/esi-validate-render';
-      if (variable_get('render_cache_esi_use_php_script', FALSE)) {
-        $base_esi = drupal_get_path('module', 'esi_render_cache') . '/esi_validate.php';
-      }
-
-      // The markup is already cached, so just provide a Cache ID.
-      $url = url($base_esi, array(
-        'query' => array(
-          'cid' => $ph_object['cache_info']['cid'],
-          'bin' => $ph_object['cache_info']['bin'],
-        ),
-      ));
-
-      $placeholders[$placeholder] = array(
-        '#markup' => '<esi:include src="' . $url . '" />',
-      );
-    }
-
-    return $placeholders;
-  }
-}
diff --git a/modules/renderer/render_cache_esi_validate/src/RenderCache/RenderStrategy/esi_validate.inc b/modules/renderer/render_cache_esi_validate/src/RenderCache/RenderStrategy/esi_validate.inc
deleted file mode 100644
index bcf2d8d..0000000
--- a/modules/renderer/render_cache_esi_validate/src/RenderCache/RenderStrategy/esi_validate.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
-$plugin = array(
-  'class' => "\\Drupal\\render_cache_esi_validate\\RenderCache\\RenderStrategy\\EsiValidateRenderStrategy",
-);
diff --git a/modules/utility/render_cache_comment/render_cache_comment.info b/modules/utility/render_cache_comment/render_cache_comment.info
deleted file mode 100644
index 6f58d7d..0000000
--- a/modules/utility/render_cache_comment/render_cache_comment.info
+++ /dev/null
@@ -1,8 +0,0 @@
-name = Render cache for comments added to a node.
-description = Hijacks the comment_node_view callback to enable entity_view caching.
-package = Performance and scalability
-core = 7.x
-
-dependencies[] = render_cache_entity
-dependencies[] = entity
-
diff --git a/modules/utility/render_cache_comment/render_cache_comment.module b/modules/utility/render_cache_comment/render_cache_comment.module
deleted file mode 100644
index 4b1d429..0000000
--- a/modules/utility/render_cache_comment/render_cache_comment.module
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-/**
- * @file
- * Hijacks comment.module's implementation of hook_node_view() to enable entity caching.
- */
-
-use Drupal\render_cache\Cache\RenderCachePlaceholder;
-
-/**
- * Implements hook_module_implements_alter().
- *
- * @param array $implementations
- *   Format: $[$module] = string|false
- * @param string $hook
- */
-function render_cache_comment_module_implements_alter(&$implementations, $hook) {
-  if ($hook == 'node_view') {
-    unset($implementations['comment']);
-  }
-}
-
-/**
- * Implements hook_node_view()
- *
- * Runs instead of comment_node_view(), but not necessarily in the same position
- * in the order of hook_node_view() implementations.
- *
- * @param object $node
- * @param string $view_mode
- */
-function render_cache_comment_node_view($node, $view_mode) {
-  // Save original preview state.
-  $in_preview = !empty($node->in_preview);
-
-  // Call the original function, but set the preview bit, so that the comments
-  // are not rendered.
-  $node->in_preview = TRUE;
-  comment_node_view($node, $view_mode);
-
-  // Restore previous value.
-  $node->in_preview = $in_preview;
-
-  // Now do the rest of comment_node_view() that was skipped, but using our own
-  // render function.  This if-clause was copied from comment_node_view().
-  if ($node->comment && $view_mode == 'full' && node_is_page($node) && empty($node->in_preview)) {
-    // Use a placeholder to make the containing node cache-eable - if we are not called at the top-level.
-    if (variable_get('render_cache_comment_use_placeholder', TRUE) && RenderCache::isRecursive()) {
-      $node->content['comments'] = RenderCachePlaceholder::getPlaceholder('render_cache_comment_node_page_additions', array(
-        '%node' => $node->nid,
-      ));
-    } else {
-      $node->content['comments'] = render_cache_comment_node_page_additions($node);
-    }
-  }
-}
-
-/**
- * Replaces comment_node_page_additions(), with added entity caching.
- *
- * This uses @see entity_view() instead of @see comment_view_multiple(), to
- * enable entity_view() render caching.
- *
- * @param object $node
- *
- * @return array
- */
-function render_cache_comment_node_page_additions($node) {
-  $additions = array();
-
-  // Only attempt to render comments if the node has visible comments.
-  // Unpublished comments are not included in $node->comment_count, so show
-  // comments unconditionally if the user is an administrator.
-  if (($node->comment_count && user_access('access comments')) || user_access('administer comments')) {
-    $mode = variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED);
-    $comments_per_page = variable_get('comment_default_per_page_' . $node->type, 50);
-    if ($cids = comment_get_thread($node, $mode, $comments_per_page)) {
-      $comments = comment_load_multiple($cids);
-      comment_prepare_thread($comments);
-
-      // CHANGED: Use entity_view() here to ensure caching is possible.
-      $build = entity_view('comment', $comments);
-
-      $build['pager']['#theme'] = 'pager';
-      $additions['comments'] = $build;
-    }
-  }
-
-  // Append comment form if needed.
-  if (user_access('post comments') && $node->comment == COMMENT_NODE_OPEN && (variable_get('comment_form_location_' . $node->type, COMMENT_FORM_BELOW) == COMMENT_FORM_BELOW)) {
-    $build = drupal_get_form("comment_node_{$node->type}_form", (object) array('nid' => $node->nid));
-    $additions['comment_form'] = $build;
-  }
-
-  if ($additions) {
-    $additions += array(
-      '#theme' => 'comment_wrapper__node_' . $node->type,
-      '#node' => $node,
-      'comments' => array(),
-      'comment_form' => array(),
-    );
-  }
-
-  return $additions;
-}
diff --git a/modules/utility/render_cache_context/context/plugins/render_cache_hijack_context_reaction_block.inc b/modules/utility/render_cache_context/context/plugins/render_cache_hijack_context_reaction_block.inc
deleted file mode 100644
index 9ea7c79..0000000
--- a/modules/utility/render_cache_context/context/plugins/render_cache_hijack_context_reaction_block.inc
+++ /dev/null
@@ -1,133 +0,0 @@
-<?php
-
-class render_cache_hijack_context_reaction_block extends context_reaction_block {
-
-  /**
-   * {@inheritdoc}
-   */
-  function block_get_blocks_by_region($region) {
-    module_load_include('module', 'block', 'block');
-
-    // renderBlockList returns a render array() already,
-    // so no need to call _block_get_renderable_array().
-    $build = $this->renderBlockList($region);
-    if ($this->is_editable_region($region)) {
-      $build = $this->editable_region($region, $build);
-    }
-    return $build;
-  }
-
-  /**
-   * Support the optional aggressive block list caching.
-   *
-   * Otherwise system_cron() clears context cache and parent::get_blocks()
-   * runs _block_rehash(), which is slow, every 30 minutes.
-   *
-   * @param string|null $region
-   * @param object|null $context
-   * @param bool $reset
-   *
-   * @return array|bool
-   */
-  function get_blocks($region = NULL, $context = NULL, $reset = FALSE) {
-    if (!variable_get('render_cache_cache_block_list', TRUE)) {
-      return parent::get_blocks($region, $context, $reset);
-    }
-
-    $hash = md5(serialize(array($region, $context)));
-    $cid = "render_cache:context_reaction_block:block_list:$hash";
-
-    if (!$reset) {
-      $cache = cache_get($cid);
-      if (!empty($cache->data)) {
-        return $cache->data;
-      }
-    }
-
-    $blocks = parent::get_blocks($region, $context, $reset);
-    cache_set($cid, $blocks);
-    return $blocks;
-  }
-
-  /**
-   * A caching version of block_list() plus _block_get_renderable_array().
-   *
-   * This function is identical to context_reaction_block::block_list()
-   * except that $this->renderBlocks() is called instead of
-   * _block_render_blocks() and that the sorting is done earlier.
-   *
-   * @see context_reaction_block::block_list().
-   *
-   * @param string $region
-   *   The region to get blocks from.
-   *
-   * @return array
-   *   A render array for this region. This render array will only contain
-   *   #markup elements.
-   */
-  protected function renderBlockList($region) {
-    module_load_include('module', 'block', 'block');
-
-    $context_blocks = &drupal_static('context_reaction_block_list');;
-    $contexts = context_active_contexts();
-    if (!isset($context_blocks)) {
-      $info = $this->get_blocks();
-      $context_blocks = array();
-      foreach ($contexts as $context) {
-        $options = $this->fetch_from_context($context);
-        if (!empty($options['blocks'])) {
-          foreach ($options['blocks'] as $context_block) {
-            $bid = "{$context_block['module']}-{$context_block['delta']}";
-            if (isset($info[$bid])) {
-              $block = (object) array_merge((array) $info[$bid], $context_block);
-              $block->context = $context->name;
-              $block->title = isset($info[$block->bid]->title) ? $info[$block->bid]->title : NULL;
-              $block->cache = isset($info[$block->bid]->cache) ? $info[$block->bid]->cache : DRUPAL_NO_CACHE;
-              $context_blocks[$block->region][$block->bid] = $block;
-            }
-          }
-        }
-      }
-
-      $this->is_editable_check($context_blocks);
-      global $theme;
-      $active_regions = $this->system_region_list($theme);
-      foreach ($context_blocks as $r => $blocks) {
-        //only render blocks in an active region
-        if (array_key_exists($r, $active_regions)) {
-          // Sort blocks.
-          uasort($blocks, array('context_reaction_block', 'block_sort'));
-          $context_blocks[$r] = $this->renderBlocks($blocks, $r);
-
-          // Make blocks editable if allowed.
-          if ($this->is_editable_region($r)) {
-            foreach ($context_blocks[$r] as $key => $block) {
-              $context_blocks[$r][$key] = $this->editable_block($block);
-            }
-          }
-        }
-      }
-    }
-    return isset($context_blocks[$region]) ? $context_blocks[$region] : array();
-  }
-
-  protected function renderBlocks($context_blocks, $region) {
-    // Save the region to the $context.
-    $context = array(
-      'region' => $region,
-    );
-
-    // Convert the blocks array into the right format.
-    $blocks = array();
-    foreach ($context_blocks as $key => $block) {
-      $blocks["{$block->module}_{$block->delta}"] = $block;
-    }
-
-    // Delegate to render cache controller.
-    $rcc = render_cache_get_controller('block');
-    $rcc->setContext($context);
-    $build = $rcc->view($blocks);
-
-    return $build;
-  }
-}
diff --git a/modules/utility/render_cache_context/render_cache_context.info b/modules/utility/render_cache_context/render_cache_context.info
deleted file mode 100644
index a345fe7..0000000
--- a/modules/utility/render_cache_context/render_cache_context.info
+++ /dev/null
@@ -1,9 +0,0 @@
-name = Render cache for context blocks
-description = Hijacks the context block plugin to enable better caching control
-package = Performance and scalability
-core = 7.x
-
-dependencies[] = render_cache_block
-dependencies[] = context (>=7.x-3.3)
-
-files[] = context/plugins/render_cache_hijack_context_reaction_block.inc
diff --git a/modules/utility/render_cache_context/render_cache_context.module b/modules/utility/render_cache_context/render_cache_context.module
deleted file mode 100644
index f2f136f..0000000
--- a/modules/utility/render_cache_context/render_cache_context.module
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-/**
- * Implements hook_context_registry_alter().
- *
- * @param array[] $registry
- */
-function render_cache_context_context_registry_alter(&$registry) {
-  $registry['reactions']['block']['plugin'] = 'render_cache_hijack_context_reaction_block';
-}
-
-/**
- * Implementation of hook_context_plugins().
- *
- * This is a ctools plugins hook.
- *
- * @return array[]
- */
-function render_cache_context_context_plugins() {
-  $plugins['render_cache_hijack_context_reaction_block'] = array(
-    'handler' => array(
-      'path' => drupal_get_path('module', 'render_cache_context') . '/context/plugins',
-      'file' => 'render_cache_hijack_context_reaction_block.inc',
-      'class' => 'render_cache_hijack_context_reaction_block',
-      'parent' => 'context_reaction_block',
-    ),
-  );
-  return $plugins;
-}
diff --git a/modules/utility/render_cache_ds/render_cache_ds.info b/modules/utility/render_cache_ds/render_cache_ds.info
deleted file mode 100644
index 7ae2610..0000000
--- a/modules/utility/render_cache_ds/render_cache_ds.info
+++ /dev/null
@@ -1,11 +0,0 @@
-name = Render cache for display suite views integration
-description = Hijacks the display suite row plugin of views to enable entity_view caching.
-package = Performance and scalability
-core = 7.x
-
-dependencies[] = render_cache_entity
-dependencies[] = views
-dependencies[] = ds
-dependencies[] = entity
-
-files[] = views/plugins/render_cache_hijack_views_plugin_ds_entity_view.inc
diff --git a/modules/utility/render_cache_ds/render_cache_ds.module b/modules/utility/render_cache_ds/render_cache_ds.module
deleted file mode 100644
index 525d263..0000000
--- a/modules/utility/render_cache_ds/render_cache_ds.module
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
-/**
- * @file
- * Hook implementations and frequently used functions for render cache ds module.
- */
-
-/**
- * Implements hook_views_api().
- */
-function render_cache_ds_views_api() {
-  return array(
-    'api' => 3,
-    'path' => drupal_get_path('module', 'render_cache_ds') . '/views',
-  );
-}
-
diff --git a/modules/utility/render_cache_ds/views/plugins/render_cache_hijack_views_plugin_ds_entity_view.inc b/modules/utility/render_cache_ds/views/plugins/render_cache_hijack_views_plugin_ds_entity_view.inc
deleted file mode 100644
index ec8d670..0000000
--- a/modules/utility/render_cache_ds/views/plugins/render_cache_hijack_views_plugin_ds_entity_view.inc
+++ /dev/null
@@ -1,157 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains the display suite row style plugin hijack for caching.
- */
-
-/**
- * Plugin which defines the view mode on the resulting entity object.
- *
- * Enabled for caching via entity_view().
- */
-class render_cache_hijack_views_plugin_ds_entity_view extends views_plugin_ds_entity_view {
-
-  /**
-   * Overrides views_plugin_ds_entity_view::ds_views_row_render_entity().
-   *
-   * @todo Ask DS to provide a method to return the render function
-   *       and override it here.
-   *
-   * @param string $view_mode
-   *   The view mode which is set in the Views' options.
-   * @param object $row
-   *   The current active row object being rendered.
-   * @param bool $load_comments
-   *
-   * @return string
-   *   An entity view rendered as HTML
-   */
-  function ds_views_row_render_entity($view_mode, $row, $load_comments) {
-    // Save the original base table.
-    $original_base_table = $this->base_table;
-    // Override the base table as that will change the render function being called.
-    $this->base_table = 'render_cache_' . $this->base_table;
-
-    // This context is created by the parent function _after_ rendering.
-    // We need to provide the context for caching purposes within the entity.
-    $context = array(
-      'row' => $row,
-      'view' => &$this->view,
-      'view_mode' => $view_mode,
-      'load_comments' => $load_comments,
-    );
-    $this->entities[$row->{$this->field_alias}]->render_cache_ds_context = $context;
-
-    // Call the original function
-    $output = parent::ds_views_row_render_entity($view_mode, $row, $load_comments);
-    // And restore the base table again,
-    $this->base_table = $original_base_table;
-    return $output;
-  }
-}
-
-/**
- * Render the node through the entity plugin.
- *
- * @param object $entity
- * @param string $view_mode
- * @param bool $load_comments
- *
- * @return array
- *   A Drupal render array.
- *
- * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
- */
-function ds_views_row_render_render_cache_node($entity, $view_mode, $load_comments) {
-  $node_display = render_cache_entity_view_single('node', $entity, $view_mode);
-  if ($load_comments && module_exists('comment')) {
-    $node_display['comments'] = comment_node_page_additions($entity);
-  }
-  return $node_display;
-}
-
-/**
- * Render the comment through the entity plugin.
- *
- * @param object $entity
- * @param string $view_mode
- * @param bool $load_comments
- *
- * @return array
- *   A Drupal render array.
- *
- * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
- */
-function ds_views_row_render_render_cache_comment($entity, $view_mode, $load_comments) {
-  $element = render_cache_entity_view_single('comment', $entity, $view_mode);
-  return $element;
-}
-
-/**
- * Render the user through the entity plugin.
- *
- * @param object $entity
- * @param string $view_mode
- * @param bool $load_comments
- *
- * @return array
- *   A Drupal render array.
- *
- * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
- */
-function ds_views_row_render_render_cache_users($entity, $view_mode, $load_comments) {
-  $element = render_cache_entity_view_single('user', $entity, $view_mode);
-  return $element;
-}
-
-/**
- * Render the taxonomy term through the entity plugin.
- *
- * @param object $entity
- * @param string $view_mode
- * @param bool $load_comments
- *
- * @return array
- *   A Drupal render array.
- *
- * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
- */
-function ds_views_row_render_render_cache_taxonomy_term_data($entity, $view_mode, $load_comments) {
-  $element = render_cache_entity_view_single('taxonomy_term', $entity, $view_mode);
-  return $element;
-}
-
-/**
- * Render the file through the entity plugin.
- *
- * @param object $entity
- * @param string $view_mode
- * @param bool $load_comments
- *
- * @return array
- *   A Drupal render array.
- *
- * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
- */
-function ds_views_row_render_render_cache_file_managed($entity, $view_mode, $load_comments) {
-  $element = render_cache_entity_view_single('file', $entity, $view_mode);
-  return $element;
-}
-
-/**
- * Render the micro through the entity plugin.
- *
- * @param object $entity
- * @param string $view_mode
- * @param bool $load_comments
- *
- * @return array
- *   A Drupal render array.
- *
- * @see views_plugin_ds_entity_view::ds_views_row_render_entity()
- */
-function ds_views_row_render_render_cache_micro($entity, $view_mode, $load_comments) {
-  $element = render_cache_entity_view_single('micro', $entity, $view_mode);
-  return $element;
-}
diff --git a/modules/utility/render_cache_ds/views/render_cache_ds.views.inc b/modules/utility/render_cache_ds/views/render_cache_ds.views.inc
deleted file mode 100644
index 6c56b80..0000000
--- a/modules/utility/render_cache_ds/views/render_cache_ds.views.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-/**
- * Implements hook_views_plugins_alter().
- *
- * @param array[] $plugins
- */
-function render_cache_ds_views_plugins_alter(&$plugins) { 
-  $plugins['row']['ds']['handler'] = 'render_cache_hijack_views_plugin_ds_entity_view';
-}
diff --git a/modules/utility/render_cache_node/render_cache_node.info b/modules/utility/render_cache_node/render_cache_node.info
deleted file mode 100644
index 745240c..0000000
--- a/modules/utility/render_cache_node/render_cache_node.info
+++ /dev/null
@@ -1,7 +0,0 @@
-name = Render cache for node_show
-description = Hijacks the node_show callback to enable entity_view caching.
-package = Performance and scalability
-core = 7.x
-
-dependencies[] = render_cache_entity
-dependencies[] = entity
diff --git a/modules/utility/render_cache_node/render_cache_node.module b/modules/utility/render_cache_node/render_cache_node.module
deleted file mode 100644
index c8e94e9..0000000
--- a/modules/utility/render_cache_node/render_cache_node.module
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-/**
- * @file
- * Hijacks node_show router path to enable entity_view caching.
- */
-
-/**
- * Implements hook_menu_alter().
- *
- * @param array[] $items
- */
-function render_cache_node_menu_alter(&$items) {
-  // Use a custom callback for node/% to use entity_view caching().
-  $items['node/%node']['page callback'] = 'render_cache_node_node_show';
-}
-
-/**
- * Overrides node_show().
- *
- * This uses entity_view() instead of node_view_multiple to enable
- * entity_view() render caching.
- *
- * @param object $node
- * @param bool $message
- *   A flag which sets a page title relevant to the revision being viewed.
- *
- * @return array
- *   A Drupal render array.
- *
- * @see node_show()
- */
-function render_cache_node_node_show($node, $message = FALSE) {
-  // Do not cache if there is a message.
-  if ($message) {
-    return node_view($node, $message);
-  }
-
-  // Use entity_view to display this node potentially cached.
-  // entity_view() is almost compatible to node_view_multiple().
-  // just the key is different ('node' vs 'nodes').
-  $nodes = entity_view('node', array($node->nid => $node), 'full');
-
-  // Update the history table, stating that this user viewed this node.
-  node_tag_new($node);
-
-  // Re-key the array key here to be compatible to normal node_show().
-  if (isset($nodes['node'])) {
-    return array(
-      'nodes' => $nodes['node'],
-    );
-  }
-  return $nodes;
-}
diff --git a/modules/utility/render_cache_views/render_cache_views.info b/modules/utility/render_cache_views/render_cache_views.info
deleted file mode 100644
index 2a0849c..0000000
--- a/modules/utility/render_cache_views/render_cache_views.info
+++ /dev/null
@@ -1,10 +0,0 @@
-name = Render cache for views_plugin_row_node_view
-description = Hijacks the node_view row plugin of views to enable entity_view caching.
-package = Performance and scalability
-core = 7.x
-
-dependencies[] = render_cache_entity
-dependencies[] = views
-dependencies[] = entity
-
-files[] = views/plugins/render_cache_hijack_views_plugin_row_node_view.inc
diff --git a/modules/utility/render_cache_views/render_cache_views.module b/modules/utility/render_cache_views/render_cache_views.module
deleted file mode 100644
index 4df3cdc..0000000
--- a/modules/utility/render_cache_views/render_cache_views.module
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
-/**
- * @file
- * Hook implementations and frequently used functions for render cache views module.
- */
-
-/**
- * Implements hook_views_api().
- */
-function render_cache_views_views_api() {
-  return array(
-    'api' => 3,
-    'path' => drupal_get_path('module', 'render_cache_views') . '/views',
-  );
-}
-
diff --git a/modules/utility/render_cache_views/views/plugins/render_cache_hijack_views_plugin_row_node_view.inc b/modules/utility/render_cache_views/views/plugins/render_cache_hijack_views_plugin_row_node_view.inc
deleted file mode 100644
index cfb049f..0000000
--- a/modules/utility/render_cache_views/views/plugins/render_cache_hijack_views_plugin_row_node_view.inc
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains the node view row style plugin hijack for caching.
- */
-
-/**
- * Plugin which performs a node_view on the resulting object.
- *
- * Attempts to cache rendered nodes per view mode and language.
- *
- * @ingroup views_row_plugins
- */
-class render_cache_hijack_views_plugin_row_node_view extends views_plugin_row_node_view {
-
-  /**
-   * Overrides parent::render() to add caching.
-   *
-   * @param stdClass $row
-   *   A single row of the query result, so an element of $view->result.
-   *
-   * @return string|null
-   *   The rendered output of a single row, used by the style plugin.
-   *
-   * @see views_plugin_row_node_view::render()
-   */
-  function render($row) {
-    if (isset($this->nodes[$row->{$this->field_alias}])) {
-      $node = $this->nodes[$row->{$this->field_alias}];
-      $node->view = $this->view;
-
-      // Use render_cache_entity_view_single to display this node potentially cached.
-      $build = render_cache_entity_view_single('node', $node, $this->options['view_mode']);
-
-      return drupal_render($build);
-    }
-
-    return NULL;
-  }
-}
diff --git a/modules/utility/render_cache_views/views/render_cache_views.views.inc b/modules/utility/render_cache_views/views/render_cache_views.views.inc
deleted file mode 100644
index 196733e..0000000
--- a/modules/utility/render_cache_views/views/render_cache_views.views.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-
-/**
- * Implements hook_views_plugins_alter().
- *
- * @param array[] $plugins
- */
-function render_cache_views_views_plugins_alter(&$plugins) {
-  $plugins['row']['node']['handler'] = 'render_cache_hijack_views_plugin_row_node_view';
-}
diff --git a/render_cache.api.php b/render_cache.api.php
index 8d29bd5..9f99775 100644
--- a/render_cache.api.php
+++ b/render_cache.api.php
@@ -40,24 +40,3 @@ function hook_render_cache_block_cache_info_alter(&$cache_info, $block, $context
 function hook_render_cache_block_default_cache_info_alter(&$cache_info_default, $default_alter_context) {
   // @todo Add example implementation.
 }
-
-/**
- * Allows to alter the container definition.
- *
- * @param array $container_definition
- *   An associative array with the following keys:
- *     - parameters: Simple key-value store of container parameters.
- *     - services: Services like defined in services.yml
- *     - tags: Associative array keyed by tag names with
- *             array('service_name' => $tag_args) as values.
- *
- * @see ServiceProviderInterface::getContainerDefinition()
- * @see ServiceProviderInterface::alterContainerDefinition()
- */
-function hook_render_cache_container_build_alter(&$container_definition) {
-  $tagged_services = array();
-  foreach ($container_definition['tags']['some-tag'] as $service => $tags) {
-    $tagged_services[] = $service;
-  }
-  $container_definition['parameters']['some_service_tagged_services'] = implode(',', $tagged_services);
-}
diff --git a/render_cache.info b/render_cache.info
index 896f432..34d09e0 100644
--- a/render_cache.info
+++ b/render_cache.info
@@ -3,14 +3,7 @@ description = Cache rendered items to drastically improve performance.
 package = Performance and scalability
 core = 7.x
 
-; Configuration
 configure = admin/config/development/render-cache
 
-; Dependencies
-dependencies[] = ctools
 dependencies[] = entity_modified
-dependencies[] = registry_autoload
-dependencies[] = service_container
-
-registry_autoload[] = PSR-0
-registry_autoload[] = PSR-4
+dependencies[] = entity
diff --git a/render_cache.module b/render_cache.module
index 5561532..5f3aee3 100644
--- a/render_cache.module
+++ b/render_cache.module
@@ -1,159 +1,511 @@
 <?php
+
 /**
  * @file
- * Main module file for the Render Cache caching system.
+ * Hook implementations and frequently used functions for render cache module.
  */
 
-// Include Drupal 8 render helper functions.
-require_once __DIR__ . '/includes/drupal_render_8.inc';
-
-// -----------------------------------------------------------------------
-// Core Hooks
-
 /**
- * Implements hook_flush_caches().
+ * Override entity API rendering callback to add a caching layer.
+ *
+ * This callback is registered as $entity_info[$type]['view callback'] with
+ * hook_entity_info_alter()
+ *
+ * @param object[] $entities
+ * @param string $view_mode
+ * @param string|null $langcode
+ * @param string $entity_type
+ *
+ * @return array
+ * @throws \EntityMalformedException
+ *
+ * @see entity_view()
+ * @see render_cache_entity_info_alter()
  */
-function render_cache_flush_caches() {
-  return array('cache_render');
-}
+function render_cache_entity_view_callback($entities, $view_mode, $langcode = NULL, $entity_type) {
+  // Remove any passed values that are not an object, this can happen with out
+  // of date Apache Solr search when entities are deleted and probably other
+  // situations.
+  foreach($entities as $key => $entity) {
+    if (!is_object($entity)) {
+      unset($entities[$key]);
+    }
+  }
 
-// -----------------------------------------------------------------------
-// Contrib Hooks
+  $entity_info = entity_get_info($entity_type);
+  $entity_order = array_keys($entities);
 
-/**
- * Implements hook_ctools_plugin_type().
- */
-function render_cache_ctools_plugin_type() {
-  $items['Controller'] = array(
-    'cache' => FALSE,
-  );
-  $items['ValidationStrategy'] = array(
-    'cache' => FALSE,
+  // Prepare context
+  $context = array(
+    'entity_type' => $entity_type,
+    'view_mode' => $view_mode,
+    'langcode' => $langcode,
   );
-  $items['RenderStrategy'] = array(
-    'cache' => FALSE,
+
+  // Setup drupal_render style cache array.
+  $cache_info = render_cache_cache_info_defaults();
+  $cache_info['keys'] = array(
+    'entity',
+    $entity_type,
+    $view_mode,
   );
 
-  return $items;
-}
+  /* @see hook_render_cache_block_default_cache_info_alter() */
+  drupal_alter('render_cache_entity_default_cache_info', $cache_info, $context);
 
-/**
- * Implements hook_ctools_plugin_directory().
- *
- * @param string $owner
- * @param string $plugin_type
- *
- * @return null|string
- */
-function render_cache_ctools_plugin_directory($owner, $plugin_type) {
-  if ($owner == 'service_container') {
-    return 'src/ServiceContainer/' . $plugin_type;
+  // Retrieve a list of cache_ids
+  $cid_map = array();
+  foreach ($entities as $id => $entity) {
+    list($entity_id, $entity_revision_id, $bundle) = entity_extract_ids($entity_type, $entity);
+    $entity_context = $context + array(
+      'entity_id' => $entity_id,
+      'entity_revision_id' => $entity_revision_id,
+      'bundle' => $bundle,
+    );
+    $cid_map[$id] = render_cache_get_entity_cid($entity, $cache_info, $entity_context);
+  }
+
+  $cids = array_values($cid_map);
+
+  $cached_entities = array();
+  if (isset($cache_info['granularity']) && $cache_info['granularity'] != DRUPAL_NO_CACHE) {
+    $cached_entities = cache_get_multiple($cids, 'cache_render');
   }
-  if ($owner == 'render_cache') {
-    return 'src/RenderCache/' . $plugin_type;
+
+  // Calculate remaining entities
+  $cid_remaining = array_intersect($cid_map, $cids);
+  $entities = array_intersect_key($entities, $cid_remaining);
+
+  // Render non-cached entities.
+  if (!empty($entities)) {
+    // If this is a view callback.
+    if (isset($entity_info['render cache']['callback'])) {
+      $rendered = $entity_info['render cache']['callback']($entities, $view_mode, $langcode, $entity_type);
+    }
+    // Otherwise this is a controller class callback.
+    else {
+      // We need the $page variable from entity_view() that it does not pass us.
+      if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
+        // Get only the stack frames we need (PHP 5.4 only).
+        $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2);
+      }
+      elseif (version_compare(PHP_VERSION, '5.3.6', '>=')) {
+        $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT);
+      }
+      else {
+        // @see http://php.net/manual/en/function.debug-backtrace.php#refsect1-function.debug-backtrace-parameters
+        $backtrace = debug_backtrace(TRUE);
+      }
+      $page = NULL;
+      // As a safety, do not grab an unexpected arg for $page, check that this
+      // was called from entity_view().
+      if (isset($backtrace[1]['function']) && $backtrace[1]['function'] === 'entity_view' && isset($backtrace[1]['args'][4])) {
+        $page = $backtrace[1]['args'][4];
+      }
+      $rendered = entity_get_controller($entity_type)->view($entities, $view_mode, $langcode, $page);
+    }
+    $rendered = reset($rendered);
+
+    // Store rendered entities in cache for future views.
+    foreach (element_children($rendered) as $id) {
+      // Remove #weight as it will not be accurate, we weight in the cached and
+      // rendered merge below.
+      unset($rendered[$id]['#weight']);
+
+      // Cache the entity.
+      $cid = $cid_map[$id];
+      $render = $rendered[$id];
+
+      _render_cache_pre_render($render, $cid, $cache_info);
+
+      $cached_entities[$cid] = (object) array(
+        'data' => $render,
+      );
+    }
   }
 
-  return NULL;
+  // Not needed in rest of function.
+  unset($entities, $rendered);
+
+  // Return false if no entities are available, matches entity_view()'s
+  // functionality.
+  if (empty($cached_entities)) {
+    return FALSE;
+  }
+
+  // Put entities back in their request order and output.
+  $return = array();
+  // Render entities cached as render arrays.
+  foreach ($entity_order as $weight => $id) {
+    $cid = $cid_map[$id];
+    if (!empty($cached_entities[$cid]->data)) {
+      $render = $cached_entities[$cid]->data;
+      _render_cache_post_render($render, $id);
+      $return[$id] = $render;
+      $return[$id]['#weight'] = $weight;
+    }
+  }
+  // Return $return, wrap with entity type key in array to match
+  // entity_view()'s functionality.
+  return array($entity_type => $return);
+}
+
+function _render_cache_pre_render(array &$render, $cid, $cache_info) {
+  if (isset($cache_info['granularity']) && $cache_info['granularity'] != DRUPAL_NO_CACHE) {
+    if (empty($cache_info['render_cache_render_to_markup'])) {
+      cache_set($cid, $render, 'cache_render');
+    }
+    else {
+      // Process markup with drupal_render() caching.
+      $render['#cache'] = $cache_info;
+
+      // Explicitly set cache id.
+      $render['#cache']['cid'] = $cid;
+
+      $render_cache_attached = array();
+      // Preserve some properties in #attached?
+      if (!empty($cache_info['render_cache_render_to_markup']['preserve properties']) &&
+        is_array($cache_info['render_cache_render_to_markup']['preserve properties'])) {
+        foreach ($cache_info['render_cache_render_to_markup']['preserve properties'] as $key) {
+          if (isset($render[$key])) {
+            $render_cache_attached[$key] = $render[$key];
+          }
+        }
+      }
+      if (!empty($render_cache_attached)) {
+        $render['#attached']['render_cache'] = $render_cache_attached;
+      }
+
+      // Do we want to render now?
+      if (empty($cache_info['render_cache_render_to_markup']['cache late'])) {
+        // And save things. Also add our preserved properties back.
+        $render = array(
+            '#markup' => drupal_render($render),
+          ) + $render_cache_attached;
+      }
+    }
+  }
+
+  return $render;
 }
 
-// -----------------------------------------------------------------------
-// Public API
+function _render_cache_post_render(array &$render, $id) {
+  // Potentially merge back previously saved properties.
+  if (!empty($render['#attached']['render_cache'])) {
+    $render += $render['#attached']['render_cache'];
+    unset($render['#attached']['render_cache']);
+  }
+
+  // Run any post-render callbacks.
+  render_cache_process_attached_callbacks($render, $id);
+}
 
 /**
- * Returns a render cache controller.
+ * Invokes attached post-render callbacks.
  *
- * @param string $type
+ * This function can not be named "render_cache_post_render" because that is
+ * the name of the #attached element.  Any function with the name of an
+ * #attached element will be invoked to process it from
+ * drupal_process_attached().
  *
- * @return \Drupal\render_cache\RenderCache\Controller\ControllerInterface
+ * @param array &$element
+ *    The renderable element to check for and run post-render callbacks on.
+ * @param string $id
+ *    An identifier for this render-cacheable elements.
  */
-function render_cache_get_controller($type) {
-  return RenderCache::getController($type);
+function render_cache_process_attached_callbacks(&$element, $id) {
+  if (isset($element['#markup']) && !empty($element['#attached']['render_cache_post_render'])) {
+    foreach ($element['#attached']['render_cache_post_render'] as $function) {
+      // Fail fatally if the function has not been defined.
+      $element['#markup'] = call_user_func($function, $element['#markup'], $id);
+    }
+    unset($element['#attached']['render_cache_post_render']);
+  }
 }
 
 /**
- * Returns a render cache validation strategy plugin.
+ * Implements hook_entity_info_alter().
  *
- * @param string $type
+ * We hijack entity rendering, as performed through the Entity API module, to
+ * provide full entity caching.
  *
- * @return \Drupal\render_cache\RenderCache\ValidationStrategy\ValidationStrategyInterface
+ * @param array $entity_info
  */
-function render_cache_get_validator($type) {
-  return RenderCache::getValidationStrategy($type);
+function render_cache_entity_info_alter(&$entity_info) {
+  foreach ($entity_info as $type => $info) {
+    if (isset($info['view callback'])) {
+      // Since we are overwriting the view callback we record the original
+      // callback so that we know how to render.
+      $entity_info[$type]['render cache']['callback'] = $info['view callback'];
+      /* @see render_cache_entity_view_callback() */
+      $entity_info[$type]['view callback'] = 'render_cache_entity_view_callback';
+    }
+    elseif (isset($info['controller class'])
+      && in_array('EntityAPIControllerInterface', class_implements($info['controller class']))
+    ) {
+      // We do not set the render cache callback, when it is missing we will
+      // render using the controller class.
+      /* @see render_cache_entity_view_callback() */
+      $entity_info[$type]['view callback'] = 'render_cache_entity_view_callback';
+    }
+  }
 }
 
 /**
- * Returns a render cache render strategy plugin.
- *
- * @param string $type
- *   The type of the plugin, e.g. "esi_validate", "esi", "ajax2,
- *   "ajax_lstorage", ...
+ * Returns default values for cache info.
  *
- * @return \Drupal\render_cache\RenderCache\RenderStrategy\RenderStrategyInterface
+ * @return array
  */
-function render_cache_get_renderer($type) {
-  return RenderCache::getRenderStrategy($type);
+function render_cache_cache_info_defaults() {
+  // Setup defaults.
+  return array(
+    'bin' => 'cache_render',
+    'expire' => CACHE_PERMANENT,
+    'granularity' => DRUPAL_CACHE_PER_ROLE, // Use per role to support contextual and its safer anyway.
+    'keys' => array(),
+    // Special keys that are only related to our implementation.
+    'render_cache_render_to_markup' => FALSE,
+  );
 }
 
 /**
- * Check if this call should / can be served from the cache.
+ * Retrieve cache ID to use for entity render caching.
  *
- * By default only GET and / or HEAD requests are cacheable.
+ * @param object $entity
+ *   The entity object being rendered.
+ * @param array $cache_info
+ *   A drupal_render style cache array().
+ * @param array $context
+ *   The context of the entity, with the following keys:
+ *   - entity_type
+ *   - entity_id
+ *   - entity_revision_id
+ *   - bundle
+ *   - langcode
+ *   - view_mode
+ *   If a field is being rendered, the following additional keys are required:
+ *   - field_name
+ *   - deltas
+ *   - display
  *
- * @param bool $allow_caching
- *   Set to FALSE if you want to prevent this call to get the cached version and
- *   / or fill the cache.
-  * @param bool $ignore_request_method_check
- *   Set to TRUE if you want to ignore the request method check.
+ * @return string
+ */
+function render_cache_get_entity_cid($entity, &$cache_info, $context) {
+  if (isset($cache_info['cid'])) {
+    return $cache_info['cid'];
+  }
+
+  $cache_info += render_cache_cache_info_defaults();
+
+  /* @see hook_render_cache_entity_cache_info_alter() */
+  drupal_alter('render_cache_entity_cache_info', $cache_info, $entity, $context);
+
+  $cid_parts = array();
+  $hash = array();
+
+  if (!empty($cache_info['keys']) && is_array($cache_info['keys'])) {
+    $cid_parts = $cache_info['keys'];
+  }
+
+  // Add drupal_render cid_parts based on granularity
+  $granularity = isset($cache_info['granularity']) ? $cache_info['granularity'] : NULL;
+  $cid_parts = array_merge($cid_parts, drupal_render_cid_parts($granularity));
+
+  // Calculate hash to expire cached items automatically.
+  $hash['id'] = !empty($context['entity_revision_id']) ? $context['entity_revision_id'] : $context['entity_id'];
+  $hash['bundle'] = !empty($context['bundle']) ? $context['bundle'] : $context['entity_type'];
+  $hash['langcode'] = !empty($context['langcode']) ? $context['langcode'] : $GLOBALS['language_content']->language;
+  $hash['modified'] = entity_modified_last($context['entity_type'], $entity);
+  $hash['render_method'] = !empty($cache_info['render_cache_render_to_markup']);
+  if ($hash['render_method']) {
+    $hash['render_options'] = serialize($cache_info['render_cache_render_to_markup']);
+  }
+
+  if (!empty($context['field_name'])) {
+    $hash['deltas'] = implode(',', $context['deltas']);
+    $hash['display'] = serialize(array_intersect_key($context['display'], array('type' => '', 'settings' => '')));
+  }
+  else {
+    // Generally hash per view_mode - its unlikely they are the same.
+    $hash['view_mode'] = !empty($context['view_mode']) ? $context['view_mode'] : 'default';
+  }
+
+  // Allow modules to modify $hash for custom invalidating.
+  /* @see hook_render_cache_entity_hash_alter() */
+  drupal_alter('render_cache_entity_hash', $hash, $entity, $cache_info, $context);
+
+  $cid_parts[] = sha1(implode('-', $hash));
+  /* @see hook_render_cache_entity_cid_alter() */
+  drupal_alter('render_cache_entity_cid', $cid_parts, $entity, $cache_info, $context);
+
+  return implode(':', $cid_parts);
+}
+
+/**
+ * Implements hook_module_implements_alter().
  *
- * @return bool
- *   TRUE if the current call can be cached, FALSE otherwise.
+ * Moves our hook_entity_info_alter() implementation to occur last so that we
+ * can consistently hijack the render function of the entity type.
  *
- * @see drupal_page_is_cacheable()
+ * @param array $implementations
+ * @param string $hook
  */
-function render_cache_call_is_cacheable($allow_caching = NULL, $ignore_request_method_check = FALSE) {
-  $allow_caching_static = &drupal_static(__FUNCTION__, TRUE);
-  if (isset($allow_caching)) {
-    $allow_caching_static = $allow_caching;
+function render_cache_module_implements_alter(&$implementations, $hook) {
+  if ($hook === 'entity_info_alter') {
+    // Move our hook implementation to the bottom.
+    $group = $implementations['render_cache'];
+    unset($implementations['render_cache']);
+    $implementations['render_cache'] = $group;
   }
-
-  return $allow_caching_static
-    && ($ignore_request_method_check
-      || ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD'))
-    && !drupal_is_cli();
 }
 
-// -----------------------------------------------------------------------
-// Helper functions
+/**
+ * Implements hook_flush_caches().
+ */
+function render_cache_flush_caches() {
+  return array('cache_render');
+}
 
 /**
- * Overrides drupal_render().
+ * Helper function to view a single entity.
  *
- * If we really need to render early, at least collect the cache tags, etc.
+ * This can be used to replace node_view(), comment_view(), easier.
  *
- * @param array $render
+ * @param string $entity_type
+ *   The type of the entity.
+ * @param object $entity
+ *   The entity to render.
+ * @param string $view_mode
+ *   A view mode as used by this entity type, e.g. 'full', 'teaser'...
  *
- * @return string
+ * @return array
+ *   A renderable array.
  */
-function render_cache_drupal_render(&$render) {
-  return RenderCache::drupalRender($render);
+function render_cache_entity_view_single($entity_type, $entity, $view_mode) {
+  list($entity_id) = entity_extract_ids($entity_type, $entity);
+  $build = entity_view($entity_type, array($entity_id => $entity), $view_mode);
+
+  // The output needs to be compatible to what the single function would have
+  // returned.
+  if (isset($build[$entity_type][$entity_id])) {
+    return $build[$entity_type][$entity_id];
+  }
+  return array();
 }
 
 /**
- * Returns default values for cache info.
+ * Implements hook_render_cache_entity_hash_alter().
+ *
+ * @param array $hash
+ * @param object $entity
+ * @param array $cache_info
+ * @param array $context
+ */
+function node_render_cache_entity_hash_alter(&$hash, $entity, $cache_info, $context) {
+  // We generally cache nodes based on comment count.
+  if ($context['entity_type'] == 'node' && isset($entity->comment_count)) {
+    // @todo This is very unreliable if comments can be edited, it would be better
+    //       to directly save a list of entity_modified values but entity_modified
+    //       needs to support multiple get and caching for that first.
+    $hash['node_comment_count'] = $entity->comment_count;
+  }
+}
+
+/**
+ * Helper function to view a single entity field.
  *
- * @deprecated
- * @todo remove when all modules are converted.
+ * This can be used to replace field_view_field().
  *
- * @return array
+ * @param string $entity_type
+ *   The type of $entity; e.g., 'node' or 'user'.
+ * @param object $entity
+ *   The entity containing the field to display. Must at least contain the id
+ *   key and the field data to display.
+ * @param string $field_name
+ *   The name of the field to display.
+ * @param string|array $display
+ *   Can be either:
+ *   - The name of a view mode. The field will be displayed according to the
+ *     display settings specified for this view mode in the $instance
+ *     definition for the field in the entity's bundle.
+ *     If no display settings are found for the view mode, the settings for
+ *     the 'default' view mode will be used.
+ *   - An array of display settings, as found in the 'display' entry of
+ *     $instance definitions. The following key/value pairs are allowed:
+ *     - label: (string) Position of the label. The default 'field' theme
+ *       implementation supports the values 'inline', 'above' and 'hidden'.
+ *       Defaults to 'above'.
+ *     - type: (string) The formatter to use. Defaults to the
+ *       'default_formatter' for the field type, specified in
+ *       hook_field_info(). The default formatter will also be used if the
+ *       requested formatter is not available.
+ *     - settings: (array) Settings specific to the formatter. Defaults to the
+ *       formatter's default settings, specified in
+ *       hook_field_formatter_info().
+ *     - weight: (float) The weight to assign to the renderable element.
+ *       Defaults to 0.
+ * @param string $langcode
+ *   (Optional) The language the field values are to be shown in. The site's
+ *   current language fallback logic will be applied no values are available
+ *   for the language. If no language is provided the current language will be
+ *   used.
+ *
+ * @return
+ *   A renderable array for the field value.
  */
-function render_cache_cache_info_defaults() {
-  // Setup defaults.
-  return array(
-    'bin' => 'cache_render',
-    'expire' => CACHE_PERMANENT,
-    'granularity' => DRUPAL_CACHE_PER_ROLE, // Use per role to support contextual and its safer anyway.
-    'keys' => array(),
-    // Special keys that are only related to our implementation.
-    'render_cache_render_to_markup' => FALSE,
+function render_cache_view_field($entity_type, $entity, $field_name, $display = array(), $langcode = NULL) {
+  // If the entity has no field value, just return nothing.
+  $items = field_get_items($entity_type, $entity, $field_name);
+  if (empty($items)) {
+    return array();
+  }
+
+  // Prepare context
+  $context = array(
+    'entity_type' => $entity_type,
+    'field_name' => $field_name,
+    'display' => $display,
+    'langcode' => field_language($entity_type, $entity, $field_name, $langcode),
+    'deltas' => array_keys($items),
+  );
+
+  // Setup drupal_render style cache array.
+  $cache_info = render_cache_cache_info_defaults();
+  $cache_info['keys'] = array(
+    'field',
+    $entity_type,
+    $field_name,
+  );
+
+  drupal_alter('render_cache_field_default_cache_info', $cache_info, $context);
+
+  list($entity_id, $entity_revision_id, $bundle) = entity_extract_ids($entity_type, $entity);
+  $entity_context = $context + array(
+    'entity_id' => $entity_id,
+    'entity_revision_id' => $entity_revision_id,
+    'bundle' => $bundle,
   );
+  $cid = render_cache_get_entity_cid($entity, $cache_info, $entity_context);
+
+  $cache = NULL;
+  if (isset($cache_info['granularity']) && $cache_info['granularity'] != DRUPAL_NO_CACHE) {
+    $cache = cache_get($cid, 'cache_render');
+  }
+
+  if (!$cache) {
+    $field_render = field_view_field($entity_type, $entity, $field_name, $display, $langcode);
+
+    _render_cache_pre_render($field_render, $cid, $cache_info);
+
+    $cache = (object) array(
+      'data' => $field_render,
+    );
+  }
+
+  $render = $cache->data;
+
+  // @todo Not sure what should be used for the second parameter here?
+  _render_cache_post_render($render, $cid);
+
+  return $render;
 }
diff --git a/render_cache.settings.inc b/render_cache.settings.inc
deleted file mode 100644
index fa8185a..0000000
--- a/render_cache.settings.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-/**
- * @file
- * Settings file for render_cache with core patch.
- * Using this allows using dynamic assets.
- */
-
-$conf['render_cache_supports_dynamic_assets'] = TRUE;
-$conf['drupal_add_js_function'] = 'RenderCache::drupal_add_js';
-$conf['drupal_add_css_function'] = 'RenderCache::drupal_add_css';
-$conf['drupal_add_library_function'] = 'RenderCache::drupal_add_library';
-$conf['drupal_process_attached_function'] = 'RenderCache::drupal_process_attached';
diff --git a/src/Cache/Cache.php b/src/Cache/Cache.php
deleted file mode 100644
index 42ea151..0000000
--- a/src/Cache/Cache.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\render_cache\Cache\Cache.
- */
-
-namespace Drupal\render_cache\Cache;
-
-use Drupal\Core\Cache\Cache as D8Cache;
-use SelectQueryInterface;
-
-/**
- * Helper methods for cache.
- *
- * @ingroup cache
- */
-class Cache extends D8Cache {
-  /**
-   * Generates a hash from a query object, to be used as part of the cache key.
-   *
-   * This smart caching strategy saves Drupal from querying and rendering to
-   * HTML when the underlying query is unchanged.
-   *
-   * Expensive queries should use the query builder to create the query and then
-   * call this function. Executing the query and formatting results should
-   * happen in a #pre_render callback.
-   *
-   * Note: This function was overridden to provide the D7 version of
-   *       SelectQueryInterface.
-   *
-   * @param \SelectQueryInterface
-   *   A select query object.
-   *
-   * @return string
-   *   A hash of the query arguments.
-   */
-  public static function keyFromQuery(SelectQueryInterface $query) {
-    $query->preExecute();
-    $keys = array((string) $query, $query->getArguments());
-    return hash('sha256', serialize($keys));
-  }
-}
diff --git a/src/Cache/CacheContexts.php b/src/Cache/CacheContexts.php
deleted file mode 100644
index 7e31355..0000000
--- a/src/Cache/CacheContexts.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\Cache\CacheContexts
- */
-
-namespace Drupal\render_cache\Cache;
-
-use Drupal\service_container\DependencyInjection\ContainerInterface;
-
-use Drupal\Core\Cache\CacheContexts as DrupalCacheContexts;
-
-/**
- * Defines the CacheContexts service.
- *
- * Provides CacheContexts service using the render_cache container.
- *
- * Note: The original Drupal 8 CacheContexts service uses the Symfony
- *       ContainerInterface, which is not available here. So we over-
- *       write the constructor to enable us to use the functionality of the
- *       stock file.
- *
- * @ingroup cache
- */
-class CacheContexts extends DrupalCacheContexts {
-
-  /**
-   * The service container.
-   *
-   * @var \Drupal\service_container\DependencyInjection\ContainerInterface
-   */
-  protected $container;
-
- /**
-   * Constructs a CacheContexts object.
-   *
-   * @param \Drupal\service_container\DependencyInjection\ContainerInterface $container
-   *   The current service container.
-   * @param array $contexts
-   *   An array of key-value pairs, where the keys are service names (which also
-   *   serve as the corresponding cache context token) and the values are the
-   *   cache context labels.
-   */
-  public function __construct(ContainerInterface $container, array $contexts) {
-    $this->container = $container;
-    $this->contexts = $contexts;
-  }
-}
diff --git a/src/Cache/RenderCacheBackendAdapter.php b/src/Cache/RenderCacheBackendAdapter.php
deleted file mode 100644
index 6e59c2f..0000000
--- a/src/Cache/RenderCacheBackendAdapter.php
+++ /dev/null
@@ -1,257 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\Cache\RenderCacheBackendAdapter
- */
-
-namespace Drupal\render_cache\Cache;
-
-use Drupal\Component\Utility\NestedArray;
-use Drupal\Core\Cache\CacheBackendInterface;
-use Drupal\Core\Render\Element;
-
-use Drupal\render_cache\Cache\RenderStackInterface;
-use DrupalCacheInterface;
-use RenderCache;
-
-/**
- * Defines the render_cache.cache service.
- *
- * This class is used as an adapter from D8 style render
- * arrays to the Drupal 7 cache API.
- *
- * @ingroup cache
- */
-class RenderCacheBackendAdapter implements RenderCacheBackendAdapterInterface {
-
-  /**
-   * The injected render stack.
-   *
-   * @var \Drupal\render_cache\Cache\RenderStackInterface
-   */
-  protected $renderStack;
-
-  /**
-   * Constructs a render cache backend adapter object.
-   */
-  public function __construct(RenderStackInterface $render_stack) {
-    $this->renderStack = $render_stack;
-  }
-
-  // @codeCoverageIgnoreStart
-  /**
-   * {@inheritdoc}
-   */
-  public function cache($bin = 'cache') {
-    // This is an internal API, but we need the cache object.
-    return _cache_get_object($bin);
-  }
-  // @codeCoverageIgnoreEnd
-
-  /**
-   * {@inheritdoc}
-   */
-  public function get(array $cache_info) {
-    $id = 42;
-    $cache_info_map = array( $id => $cache_info);
-    $build = $this->getMultiple($cache_info_map);
-    if (!empty($build[$id])) {
-      return $build[$id];
-    }
-
-    return array();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getMultiple(array $cache_info_map) {
-    $build = array();
-
-    $cid_map_per_bin = array();
-    foreach ($cache_info_map as $id => $cache_info) {
-      $bin = isset($cache_info['bin']) ? $cache_info['bin'] : 'cache';
-      $cid = $this->getCacheId($cache_info);
-      $cid_map_per_bin[$bin][$cid] = $id;
-    }
-
-    foreach ($cid_map_per_bin as $bin => $cid_map) {
-      // Retrieve data from the cache.
-      $cids = array_filter(array_keys($cid_map));
-
-      if (!empty($cids)) {
-        $cached = $this->cache($bin)->getMultiple($cids);
-        foreach ($cached as $cid => $cache) {
-          if (!$cache) {
-            continue;
-          }
-          $id = $cid_map[$cid];
-          $render = $this->renderStack->convertRenderArrayFromD7($cache->data);
-          // @codeCoverageIgnoreStart
-          if (!$this->validate($render)) {
-            $cache_strategy = $cache_info_map[$id]['render_cache_cache_strategy'];
-
-            // We need to clear the cache for the late rendering strategy, else
-            // drupal_render_cache_get() will retrieve the item again from the
-            // cache.
-            if ($cache_strategy == RenderCache::RENDER_CACHE_STRATEGY_LATE_RENDER) {
-              $this->cache($bin)->clear($cid);
-            }
-            continue;
-          }
-          // @codeCoverageIgnoreEnd
-          $build[$id] = $render;
-        }
-      }
-    }
-    return $build;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function set(array &$render, array $cache_info) {
-    $cid = $this->getCacheId($cache_info);
-
-    $bin = 'cache';
-    if (isset($cache_info['bin'])) {
-      $bin = $cache_info['bin'];
-    }
-    $expire = RenderCache::CACHE_PERMANENT;
-    if (isset($cache_info['expire'])) {
-      $expire = $cache_info['expire'];
-    }
-
-    $cache_strategy = $cache_info['render_cache_cache_strategy'];
-
-    // Preserve some properties.
-    $properties = $this->preserveProperties($render, $cache_info);
-    if (!empty($cache_info['render_cache_preserve_original'])) {
-      $properties['#render_cache_original'] = $render;
-    }
-
-    // Need to first render to markup, else we would need to collect and remove
-    // assets twice. This saves a lot performance.
-    if ($cache_strategy == RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER) {
-      // This internally inc / dec recursion and attaches new out-of-bound assets.
-      list($markup, $original) = $this->renderStack->render($render);
-      if (!empty($cache_info['render_cache_preserve_original'])) {
-        $properties['#render_cache_original'] = $original;
-      }
-    }
-
-    // This normalizes that all #cache, etc. properties are in the top
-    // render element.
-    $full_render = array();
-    // Ensure that cache_info is processed first.
-    $full_render['#cache'] = $cache_info;
-    $full_render['render'] = &$render;
-    $assets = $this->renderStack->collectAndRemoveAssets($full_render);
-    $render = NestedArray::mergeDeep($render, $assets);
-
-    $data = $this->renderStack->convertRenderArrayToD7($render);
-    $data['#attached']['render_cache'] += $properties;
-
-    if ($cache_strategy == RenderCache::RENDER_CACHE_STRATEGY_NO_RENDER) {
-      if ($cid) {
-        $this->cache($bin)->set($cid, $data, $expire);
-      }
-    }
-    elseif ($cache_strategy == RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER) {
-      $attached = $this->renderStack->collectAttached($data);
-
-      $data = array();
-      $data['#markup'] = &$markup;
-      $data['#attached'] = $attached;
-      if ($cid) {
-        $this->cache($bin)->set($cid, $data, $expire);
-      }
-
-      $render = $this->renderStack->convertRenderArrayFromD7($data);
-    }
-    elseif ($cache_strategy == RenderCache::RENDER_CACHE_STRATEGY_LATE_RENDER) {
-      // This cache id was invalidated via cache clear if it was not valid
-      // before. This prevents drupal_render_cache_get() from getting an item
-      // from the cache.
-      if ($cid) {
-        $render['#cache']['cid'] = $cid;
-      }
-      else {
-        unset($render['#cache']['cid']);
-        unset($render['#cache']['keys']);
-      }
-      $render['#attached']['render_cache'] = $data['#attached']['render_cache'];
-    }
-    else {
-      // This is actually covered, but not seen by xdebug.
-      // @codeCoverageIgnoreStart
-      throw new \RunTimeException('Unknown caching strategy passed.');
-      // @codeCoverageIgnoreEnd
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setMultiple(array &$build, array $cache_info_map) {
-    foreach (Element::children($build) as $id) {
-      $this->set($build[$id], $cache_info_map[$id]);
-    }
-  }
-
-  /**
-   * Calculates the Cache ID from the cache keys.
-   *
-   * @param array $cache_info
-   *   The cache info structure.
-   *
-   * @return string|NULL
-   *   The calculated cache id.
-   */
-  protected function getCacheId(array $cache_info) {
-    return $cache_info['cid'];
-  }
-
-  // @codeCoverageIgnoreStart
-  /**
-   * Checks that a cache entry is still valid.
-   *
-   * @param array $render
-   *   The render array to check.
-   *
-   * @return bool
-   *   TRUE when its valid, FALSE otherwise.
-   */
-  protected function validate(array $render) {
-    // @todo implement.
-    return TRUE;
-  }
-  // @codeCoverageIgnoreEnd
-
-  /**
-   * Preserves some properties based on the cache info struct.
-   *
-   * @param array $render
-   *   The render array to preserve properties for.
-   * @param array $cache_info
-   *   The cache information structure.
-   *
-   * @return array
-   *   The preserved properties.
-   */
-  protected function preserveProperties(array $render, array $cache_info) {
-    $properties = array();
-
-    if (empty($cache_info['render_cache_preserve_properties']) || !is_array($cache_info['render_cache_preserve_properties'])) {
-      return $properties;
-    }
-
-    foreach ($cache_info['render_cache_preserve_properties'] as $key) {
-      if (isset($render[$key])) {
-        $properties[$key] = $render[$key];
-      }
-    }
-
-    return $properties;
-  }
-}
diff --git a/src/Cache/RenderCacheBackendAdapterInterface.php b/src/Cache/RenderCacheBackendAdapterInterface.php
deleted file mode 100644
index 8480b21..0000000
--- a/src/Cache/RenderCacheBackendAdapterInterface.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\Cache\RenderCacheBackendAdapterInterface
- */
-
-namespace Drupal\render_cache\Cache;
-
-/**
- * Defines an interface for the render cache backend adapter.
- *
- * This is an adapter from the render cache, caching implementation
- * to the Drupal 7 cache interface.
- *
- * This implements advanced Drupal 8 features like cache tags using
- * a cache re-validation strategy.
- *
- * An implementation supporting cache tags natively can switch out
- * the service.
- *
- * @ingroup cache
- */
-interface RenderCacheBackendAdapterInterface {
-
-  /**
-   * Retrieves the Drupal 7 cache object for the given bin.
-   *
-   * @param string $bin
-   *   The cache bin to retrieve a cache object for.
-   *
-   * @return \DrupalCacheInterface
-   *   The Drupal 7 cache object.
-   */
-  public function cache($bin = 'cache');
-
-  /**
-   * Gets a cache entry based on the given cache info.
-   *
-   * @param array $cache_info
-   *   The cache info structure.
-   *
-   * @return array
-   *   The cached render array, which can be empty.
-   */
-  public function get(array $cache_info);
-
-  /**
-   * Gets multiple cache entries based on the cache info map.
-   *
-   * @param array $cache_info_map
-   *   The cache information map, keyed by ID, consisting of cache info structs.
-   *
-   * @return array
-   *   The builded render array, keyed by ID for each cache entry found.
-   */
-  public function getMultiple(array $cache_info_map);
-
-  /**
-   * Sets one cache entry based on the given $cache_info structure.
-   *
-   * Because cache_info supports different caching strategies, this
-   * function needs to be able to change the given render array.
-   *
-   * @param array &$render
-   *   The render array to set the cache for.
-   * @param array $cache_info
-   *   The cache info structure.
-   */
-  public function set(array &$render, array $cache_info);
-
-  /**
-   * This sets multiple cache entries based on the cache info map.
-   *
-   * It is expected that $build and $cache_info_map are keyed by the same
-   * IDs.
-   *
-   * @param array &$build
-   *   The build of render arrays, keyed by ID.
-   * @param array $cache_info_map
-   *   The cache information map, keyed by ID, consisting of cache info structs.
-   */
-  public function setMultiple(array &$build, array $cache_info_map);
-}
diff --git a/src/Cache/RenderCachePlaceholder.php b/src/Cache/RenderCachePlaceholder.php
deleted file mode 100644
index e51306b..0000000
--- a/src/Cache/RenderCachePlaceholder.php
+++ /dev/null
@@ -1,166 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\Cache\RenderCachePlaceholder
- */
-
-namespace Drupal\render_cache\Cache;
-
-use RenderCache;
-
-/**
- * Provides placeholder utility functions.
- *
- * @ingroup cache
- */
-class RenderCachePlaceholder implements RenderCachePlaceholderInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getPlaceholder($function, array $args = array(), $multiple = FALSE) {
-    // Add the classname to the front.
-    $callback = get_called_class();
-    $callback .= $multiple ? '::postRenderCacheMultiCallback' : '::postRenderCacheCallback';
-
-    $context = array(
-      'function' => $function,
-      'args' => $args,
-    );
-
-    $placeholder = static::generatePlaceholder($context['function'], $context);
-
-    $context = array($context);
-    if ($multiple) {
-      $context = array(
-        $function => $context,
-      );
-    }
-
-    return array(
-      '#post_render_cache' => array(
-        $callback => $context,
-      ),
-      '#markup' => $placeholder,
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function postRenderCacheMultiCallback(array $element, array $contexts) {
-    // Check this is really a multi placeholder.
-    if (isset($contexts['function']) || !isset($contexts[0]['function'])) {
-      return $element;
-    }
-
-    $function = $contexts[0]['function'];
-    $args = array();
-    foreach ($contexts as $context) {
-      $placeholder = static::generatePlaceholder($context['function'], $context);
-
-      // Check if the placeholder is present at all.
-      if (strpos($element['#markup'], $placeholder) === FALSE) {
-        continue;
-      }
-
-      $args[$placeholder] = static::loadPlaceholderFunctionArgs($context);
-    }
-
-    // This expects an array keyed by placeholder with the build as value.
-    $placeholders = call_user_func($function, $args);
-
-    foreach ($placeholders as $placeholder => $new_element) {
-      $markup = static::drupalRender($new_element);
-      $element['#markup'] = str_replace($placeholder, $markup, $element['#markup']);
-    }
-
-    return $element;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function postRenderCacheCallback(array $element, array $context) {
-
-    $placeholder = static::generatePlaceholder($context['function'], $context);
-
-    // Check if the placeholder is present at all.
-    if (strpos($element['#markup'], $placeholder) === FALSE) {
-      return $element;
-    }
-
-    $function = $context['function'];
-    $args = static::loadPlaceholderFunctionArgs($context);
-    $new_element = call_user_func_array($function, $args);
-
-    $markup = static::drupalRender($new_element);
-    $element['#markup'] = str_replace($placeholder, $markup, $element['#markup']);
-
-    return $element;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function loadPlaceholderFunctionArgs(array $context) {
-    $args = array();
-
-    foreach ($context['args'] as $key => $arg) {
-      // In case a dynamic argument has been passed, load it with the loader.
-      if (strpos($key, '%') !== 0) {
-        $args[$key] = $arg;
-        continue;
-      }
-
-      $prefix = substr($key, 1);
-      $loader_functions = array(
-        $prefix . '_load',
-        $prefix . 'Load',
-      );
-      foreach ($loader_functions as $loader_function) {
-        if (is_callable($loader_function)) {
-          $arg = call_user_func($loader_function, $arg);
-        }
-      }
-      $args[$key] = $arg;
-    }
-
-    return $args;
-  }
-
-  /**
-   * Generates a render cache placeholder.
-   *
-   * @param string $callback
-   *   The #post_render_cache callback that will replace the placeholder with its
-   *   eventual markup.
-   * @param array $context
-   *   An array providing context for the #post_render_cache callback. This array
-   *   will be altered to provide a 'token' key/value pair, if not already
-   *   provided, to uniquely identify the generated placeholder.
-   *
-   * @return string
-   *   The generated placeholder HTML.
-   *
-   * @codeCoverageIgnore
-   */
-  protected static function generatePlaceholder($callback, array &$context) {
-    return drupal_render_cache_generate_placeholder($callback, $context);
-  }
-
-  /**
-   * Overrides drupal_render().
-   *
-   * @param array $elements
-   *   The elements to render.
-   *
-   * @return string
-   *   The rendered HTML string.
-   *
-   * @codeCoverageIgnore
-   */
-  protected static function drupalRender(array &$elements) {
-    return RenderCache::drupalRender($elements);
-  }
-}
diff --git a/src/Cache/RenderCachePlaceholderInterface.php b/src/Cache/RenderCachePlaceholderInterface.php
deleted file mode 100644
index af2e445..0000000
--- a/src/Cache/RenderCachePlaceholderInterface.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\Cache\RenderCachePlaceholderInterface
- */
-
-namespace Drupal\render_cache\Cache;
-
-/**
- * Defines an interface for #post_render_cache placeholders.
- *
- * @ingroup cache
- */
-interface RenderCachePlaceholderInterface {
-  /**
-   * Gets a #post_render_cache placeholder for a given function.
-   *
-   * @param $function
-   *   The function to call when the #post_render_cache callback is invoked.
-   * @param array $args
-   *   The arguments to pass to the function. This can contain %load arguments,
-   *   similar to how menu paths are working.
-   *   @code
-   *     $args = array(
-   *       '%node' => $node->nid,
-   *       'full',
-   *     );
-   *   @endcode
-   *   Given %node the function node_load() will be called with the argument, the resulting
-   *   function will just be given the $node as argument.
-   *
-   *   This can be any valid callable, so also %MyClass::staticMethod, where
-   *   MyClass::staticMethodLoad() is called.
-   *
-   * @param bool $multiple
-   *   Whether the function accepts multiple contexts. This is useful to group similar objects
-   *   together.
-   *
-   * @return array
-   *   A render array with #markup set to the placeholder and
-   *   #post_render_cache callback set to callback postRenderCacheCallback()
-   *   with the given arguments and function encoded in the context.
-   */
-  public static function getPlaceholder($function, array $args = array(), $multiple = FALSE);
-
-  /**
-   * Generic #post_render_cache callback for getPlaceholder().
-   *
-   * @param array $element
-   *   The renderable array that contains the to be replaced placeholder.
-   * @param array $context
-   *   An array with the following keys:
-   *   - function: The function to call.
-   *   - args: The arguments to pass to the function.
-   *
-   * @return array
-   *   A renderable array with the placeholder replaced.
-   */
-  public static function postRenderCacheCallback(array $element, array $context);
-
-  /**
-   * Generic #post_render_cache callback for getPlaceholder() with multi=TRUE.
-   *
-   * This is useful to group several related elements together.
-   *
-   * @param array $element
-   *   The renderable array that contains the to be replaced placeholders.
-   * @param array $contexts
-   *   An array keyed by function with the contexts as values.
-   *
-   * @return array
-   *   A renderable array with the placeholders replaced.
-   */
-  public static function postRenderCacheMultiCallback(array $element, array $contexts);
-
-
-  /**
-   * Loads the %load arguments within $context['args'].
-   *
-   * @see RenderCachePlaceholderInterface::getPlaceholder()
-   *
-   * @param array $context
-   *   An array with the following keys:
-   *   - function: The function to call.
-   *   - args: The arguments to process.
-   *
-   * @return array
-   *   The function arguments suitable for call_user_func_array() with
-   *   an argument keyed %node with a value of nid replaced with the loaded
-   *   $node.
-   */
-  public static function loadPlaceholderFunctionArgs(array $context);
-}
-
diff --git a/src/Cache/RenderStack.php b/src/Cache/RenderStack.php
deleted file mode 100644
index ed34539..0000000
--- a/src/Cache/RenderStack.php
+++ /dev/null
@@ -1,519 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\Cache\RenderStack
- */
-
-namespace Drupal\render_cache\Cache;
-
-use Drupal\Component\Utility\NestedArray;
-use Drupal\Core\Cache\CacheableInterface;
-use Drupal\Core\Render\Element;
-
-use Drupal\render_cache\Cache\Cache;
-use RenderCache;
-
-/**
- * Defines the RenderStack service.
- *
- * @ingroup cache
- */
-class RenderStack implements RenderStackInterface, CacheableInterface {
-  /**
-   * {@inheritdoc}
-   */
-  public function getCacheKeys() {
-    return array('render_cache', 'foo');
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getCacheTags() {
-    return array(array('node' => 1));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getCacheMaxAge() {
-    return 600;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function isCacheable() {
-    return TRUE;
-  }
-
-  // ----------------------------
-
-  /**
-   * Recursion level of current call stack.
-   *
-   * @var int
-   */
-  protected $recursionLevel = 0;
-
-  /**
-   * Recursion storage of current call stack.
-   *
-   * @var array
-   */
-  protected $recursionStorage = array();
-
-  /**
-   * Whether this stack supports dynamic asset adding by overriding
-   * drupal_add_* functions via $conf.
-   *
-   * Default: FALSE
-   *
-   * @var bool
-   */
-  protected $supportsDynamicAssets = FALSE;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function increaseRecursion() {
-    $this->recursionLevel += 1;
-    $this->recursionStorage[$this->recursionLevel] = array();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function decreaseRecursion() {
-    $storage = $this->getRecursionStorage();
-    unset($this->recursionStorage[$this->recursionLevel]);
-    $this->recursionLevel -= 1;
-    return $storage;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function isRecursive() {
-    return $this->recursionLevel > 0;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getRecursionLevel() {
-    return $this->recursionLevel;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getRecursionStorage() {
-    if (!isset($this->recursionStorage[$this->recursionLevel])) {
-      $this->recursionStorage[$this->recursionLevel] = array();
-    }
-    $storage = $this->recursionStorage[$this->recursionLevel];
-    $render = array();
-
-    // Collect the new storage.
-    if (!empty($storage)) {
-      $render = $this->collectAndRemoveAssets($storage);
-      $attached = $this->collectAttached($storage);
-      if ($attached) {
-        $render['#attached'] = $attached;
-      }
-      // Cache the work, no need to do it twice.
-      $this->recursionStorage[$this->recursionLevel] = $render;
-    }
-
-    return $render;
-  }
-
-  // ----------------------------
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setRecursionStorage(array $storage) {
-    $this->recursionStorage[$this->recursionLevel] = $storage;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function addRecursionStorage(array &$render, $collect_attached = FALSE) {
-    $storage = $this->collectAndRemoveAssets($render);
-    if ($collect_attached) {
-      $storage['#attached'] = $this->collectAttached($render);
-    }
-    $this->recursionStorage[$this->recursionLevel][] = $storage;
-
-    return $storage;
-  }
-
-  /**
-   * {@inheritdoc}
-   *
-   * @codeCoverageIgnore
-   */
-  public function drupalRender(array &$render) {
-    $markup = drupal_render($render);
-
-    // Store and remove recursive storage.
-    // for our properties.
-    $this->addRecursionStorage($render);
-
-    return $markup;
-  }
-
-  /**
-   * {@inheritdoc}
-   *
-   * @codeCoverageIgnore
-   */
-  public function collectAttached(array $render) {
-    return drupal_render_collect_attached($render, TRUE);
-  }
-
-  /**
-   * Getter/Setter for dynamic asset support.
-   *
-   * This should only be set to TRUE, when render_cache.settings.inc is
-   * included in settings.php, which will set
-   * $conf['render_cache_supports_dynamic_assets'] = TRUE.
-   *
-   * This is needed to determine if its necessary to collect assets before
-   * setting the cache ourselves or if they have been added to the stacks
-   * recursive storage.
-   *
-   * Note: This settings include will only work with a core patch for now.
-   *
-   * @param bool $supportsDynamicAssets
-   *   If this isset the stack state will be changed to this.
-   *
-   * @return bool
-   *   Whether or not dynamic assets are supported.
-   */
-  public function supportsDynamicAssets($supportsDynamicAssets = NULL) {
-    if (isset($supportsDynamicAssets)) {
-      $this->supportsDynamicAssets = $supportsDynamicAssets;
-    }
-
-    return $this->supportsDynamicAssets;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function render(array &$render) {
-    $this->increaseRecursion();
-
-    // Push our recursive stored storage on the stack first.
-    if (!empty($render['x_render_cache_recursion_storage'])) {
-      $storage = $render['x_render_cache_recursion_storage'];
-      unset($render['x_render_cache_recursion_storage']);
-      $this->addRecursionStorage($storage, TRUE);
-    }
-
-    $markup = $this->drupalRender($render);
-
-    // In case the dynamic assets have not been processed via our
-    // drupal_process_attached, we need to collect them ourselves.
-    if (!$this->supportsDynamicAssets()) {
-      $storage = array();
-      $storage['#attached'] = $this->collectAttached($render);
-      $this->addRecursionStorage($storage, TRUE);
-    }
-
-    $storage = $this->decreaseRecursion();
-
-    $original_render = $render;
-
-    $render = $storage;
-    $render['#markup'] = &$markup;
-
-    return array($markup, $original_render);
-  }
-
-  public function collectAndRemoveAssets(&$element, $recursive = FALSE) {
-    $assets = $this->collectAndRemoveD8Properties($element);
-
-    $assets['#cache']['tags'] = isset($assets['#cache']['tags']) ? $assets['#cache']['tags'] : array();
-    $assets['#cache']['max-age'] = isset($assets['#cache']['max-age']) ? $assets['#cache']['max-age'] : array();
-    $assets['#cache']['downstream-ttl'] = isset($assets['#cache']['downstream-ttl']) ? $assets['#cache']['downstream-ttl'] : array();
-    $assets['#post_render_cache'] = isset($assets['#post_render_cache']) ? $assets['#post_render_cache'] : array();
-
-    if (!is_array($assets['#cache']['max-age'])) {
-      $assets['#cache']['max-age'] = array($assets['#cache']['max-age']);
-    }
-    if (!is_array($assets['#cache']['downstream-ttl'])) {
-      $assets['#cache']['downstream-ttl'] = array($assets['#cache']['downstream-ttl']);
-    }
-
-    // Get the children of the element, sorted by weight.
-    $children = Element::children($element, TRUE);
-
-    foreach ($children as $key) {
-      $new_assets = $this->collectAndRemoveAssets($element[$key], TRUE);
-      $assets['#cache']['tags'] = Cache::mergeTags($assets['#cache']['tags'], $new_assets['#cache']['tags']);
-      $assets['#cache']['max-age'] = NestedArray::mergeDeep($assets['#cache']['max-age'], $new_assets['#cache']['max-age']);
-      $assets['#cache']['downstream-ttl'] = NestedArray::mergeDeep($assets['#cache']['downstream-ttl'], $new_assets['#cache']['downstream-ttl']);
-      $assets['#post_render_cache'] = NestedArray::mergeDeep($assets['#post_render_cache'], $new_assets['#post_render_cache']);
-    }
-
-    if (!$recursive) {
-      // Ensure that there are no empty properties.
-      if (empty($assets['#cache']['tags'])) {
-        unset($assets['#cache']['tags']);
-      }
-      if (empty($assets['#cache']['max-age'])) {
-        unset($assets['#cache']['max-age']);
-      }
-      if (empty($assets['#cache']['downstream-ttl'])) {
-        unset($assets['#cache']['downstream-ttl']);
-      }
-      // Ensure the cache property is empty.
-      if (empty($assets['#cache'])) {
-        unset($assets['#cache']);
-      }
-      if (empty($assets['#post_render_cache'])) {
-        unset($assets['#post_render_cache']);
-      }
-    }
-
-    return $assets;
-  }
-
-  public function collectAndRemoveD8Properties(&$element) {
-    $render = array();
-
-    if (!empty($element['#cache']['tags'])) {
-      $render['#cache']['tags'] = $element['#cache']['tags'];
-      unset($element['#cache']['tags']);
-    }
-    if (!empty($element['#cache']['max-age'])) {
-      $render['#cache']['max-age'] = $element['#cache']['max-age'];
-      unset($element['#cache']['max-age']);
-    }
-    if (!empty($element['#cache']['downstream-ttl'])) {
-      $render['#cache']['downstream-ttl'] = $element['#cache']['downstream-ttl'];
-      unset($element['#cache']['downstream-ttl']);
-    }
-
-    // Ensure the cache property is empty.
-    if (empty($element['#cache'])) {
-      unset($element['#cache']);
-    }
-
-    if (!empty($element['#post_render_cache'])) {
-      $render['#post_render_cache'] = $element['#post_render_cache'];
-      unset($element['#post_render_cache']);
-    }
-
-    return $render;
-  }
-
-
-  /**
-   * {@inheritdoc}
-   */
-  public function convertRenderArrayToD7($render) {
-    $render['#attached']['render_cache'] = $this->collectAndRemoveD8Properties($render);
-
-    return $render;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function convertRenderArrayFromD7($render) {
-    if (!empty($render['#attached']['render_cache'])) {
-      $render += $render['#attached']['render_cache'];
-      unset($render['#attached']['render_cache']);
-    }
-
-    return $render;
-  }
-
-  public function processPostRenderCache(&$render, $cache_info) {
-    $strategy = $cache_info['render_cache_cache_strategy'];
-
-    // Only when we have rendered to #markup we can post process.
-    // @todo Use a #post_render function with a closure instead.
-    if ($strategy != RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER) {
-      // @todo Log an error.
-      return;
-    }
-
-    $storage = $this->collectAndRemoveAssets($render);
-
-    while (!empty($storage['#post_render_cache'])) {
-      // Save the value and unset from the storage.
-      $post_render_cache = $storage['#post_render_cache'];
-      unset($storage['#post_render_cache']);
-
-      $this->increaseRecursion();
-      // Add the storage back first, so order is preserved.
-      $this->addRecursionStorage($storage);
-
-      // Add todo use a helper function.
-      foreach (array_keys($post_render_cache) as $callback) {
-        foreach ($post_render_cache[$callback] as $context) {
-          $render = call_user_func_array($callback, array($render, $context));
-        }
-      }
-      // Get and remove any new storage from the render array.
-      $storage = $this->collectAndRemoveAssets($render);
-      // ... and push to the stack.
-      $this->addRecursionStorage($storage);
-
-      // Now everything is in here.
-      $storage = $this->decreaseRecursion();
-
-      // If there is attached on the stack, then merge it to the #attached data we already have.
-      if (!empty($storage['#attached'])) {
-        $render += array(
-          '#attached' => array(),
-        ); // @codeCoverageIgnore
-        $render['#attached'] = NestedArray::mergeDeep($render['#attached'], $storage['#attached']);
-        unset($storage['#attached']);
-      }
-    }
-
-    // Put the storage back, so it can be pushed to the stack.
-    $render = NestedArray::mergeDeep($render, $storage);
-  }
-
-  // JS / CSS asset helper functions.
-  // -------------------------------------------------------------------
-
-  /**
-   * Helper function to add JS/CSS assets to the recursion storage.
-   *
-   * @param string $type
-   *   The type of asset, can be 'js' or 'css'.
-   * @param mixed $data
-   *   The data to add.
-   * @param array|string|NULL $options
-   *   The options to add.
-   *
-   * @return mixed|NULL
-   *   What drupal_add_js/drupal_add_css return or NULL when adding something.
-   *
-   * @see drupal_add_css()
-   * @see drupal_add_js()
-   */
-  public function drupal_add_assets($type, $data = NULL, $options = NULL) {
-
-    // Construct the options when its not an array.
-    if (isset($options)) {
-      if (!is_array($options)) {
-        $options = array('type' => $options);
-      }
-    }
-    else {
-      $options = array();
-    }
-
-    if (isset($data) && $this->isRecursive()) {
-      $new_options = $options;
-      $new_options['data'] = $data;
-      $storage = array();
-      $storage['#attached'][$type][] = $new_options;
-      $this->addRecursionStorage($storage, TRUE);
-      return;
-    }
-
-    return $this->callOriginalFunction("drupal_add_{$type}", $data, $options);
-  }
-
-  /**
-   * Helper function to add library assets to the recursion storage.
-   *
-   * @param $module
-   *   The name of the module that registered the library.
-   * @param $name
-   *   The name of the library to add.
-   * @param $every_page
-   *   Set to TRUE if this library is added to every page on the site. Only items
-   *   with the every_page flag set to TRUE can participate in aggregation.
-   *
-   * @return
-   *   TRUE if the library was successfully added; FALSE if the library or one of
-   *   its dependencies could not be added.
-   *
-   * @see drupal_add_library()
-   */
-  public function drupal_add_library($module, $name, $every_page = NULL) {
-    if ($this->isRecursive()) {
-      $storage = array();
-      $storage['#attached']['library'][] = array($module, $name);
-      $this->addRecursionStorage($storage, TRUE);
-      // @todo Figure out at runtime if library dependencies are met.
-      return TRUE;
-    }
-    return $this->callOriginalFunction("drupal_add_library", $module, $name, $every_page);
-  }
-
-  /**
-   * Helper function to add any #attached assets to the recursion storage.
-   *
-   * @param $elements
-   *   The structured array describing the data being rendered.
-   * @param $group
-   *   The default group of JavaScript and CSS being added. This is only applied
-   *   to the stylesheets and JavaScript items that don't have an explicit group
-   *   assigned to them.
-   * @param $dependency_check
-   *   When TRUE, will exit if a given library's dependencies are missing. When
-   *   set to FALSE, will continue to add the libraries, even though one or more
-   *   dependencies are missing. Defaults to FALSE.
-   * @param $every_page
-   *   Set to TRUE to indicate that the attachments are added to every page on the
-   *   site. Only attachments with the every_page flag set to TRUE can participate
-   *   in JavaScript/CSS aggregation.
-   *
-   * @return
-   *   FALSE if there were any missing library dependencies; TRUE if all library
-   *   dependencies were met.
-   *
-   * @see drupal_process_attached()
-   */
-  public function drupal_process_attached($elements, $group = 0, $dependency_check = FALSE, $every_page = NULL) {
-    if ($this->isRecursive()) {
-      $storage = array();
-      $storage['#attached'] = $elements['#attached'];
-      $this->addRecursionStorage($storage, TRUE);
-      // @todo Figure out at runtime if library dependencies are met.
-      return TRUE;
-    }
-
-    return $this->callOriginalFunction("drupal_process_attached", $elements, $group, $dependency_check, $every_page);
-  }
-
-  /**
-   * This calls the given original function by replacing the global $conf
-   * variable, calling the function and putting it back.
-   *
-   * @param string $function
-   *   The function to call, the arguments are gotton via func_get_args().
-   * @return NULL|mixed
-   *   Returns what the original function returns.
-   */
-  public function callOriginalFunction($function) {
-    global $conf;
-
-    $args = func_get_args();
-    array_shift($args);
-
-    $name = $function . "_function";
-
-    $old = $conf[$name];
-    unset($conf[$name]);
-    $return = call_user_func_array($function, $args);
-    $conf[$name] = $old;
-
-    return $return;
-  }
-
-}
diff --git a/src/Cache/RenderStackInterface.php b/src/Cache/RenderStackInterface.php
deleted file mode 100644
index 79b2a37..0000000
--- a/src/Cache/RenderStackInterface.php
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\Cache\RenderStackInterface
- */
-
-namespace Drupal\render_cache\Cache;
-
-/**
- * Defines an interface for a render stack.
- *
- * @ingroup cache
- */
-interface RenderStackInterface {
-  /**
-   * Renders the given render array, but preserves Drupal 8 properties
-   * in the stack.
-   *
-   * @param array $render
-   *   The render array to render.
-   *
-   * @return string
-   *   The rendered render array.
-   */
-  public function drupalRender(array &$render);
-
-  /**
-   * Increments the recursion level by 1.
-   */
-  public function increaseRecursion();
-
-  /**
-   * Decrements the recursion level by 1.
-   *
-   * @return array
-   *   Returns the current recursion storage with the assets.
-   */
-  public function decreaseRecursion();
-
-  /**
-   * Whether we are in a recursive context.
-   *
-   * This is useful to determine e.g. if its safe to output a placeholder.
-   *
-   * @return bool
-   *   TRUE if its recursive, FALSE otherwise.
-   */
-  public function isRecursive();
-
-  /**
-   * Returns the current recursion level.
-   *
-   * @return int
-   *   The current recursion level.
-   */
-  public function getRecursionLevel();
-
-  /**
-   * Returns the current recursion storage.
-   *
-   * @return array
-   *   The stored assets.
-   */
-  public function getRecursionStorage();
-
-  /**
-   * Sets the current recursion storage, overwriting everything that is
-   * already stored in the current stack frame.
-   *
-   * @param array $storage
-   *   The assets to store in the current stack frame.
-   */
-  public function setRecursionStorage(array $storage);
-
-  /**
-   * Adds assets to the current stack frame and removes them from the
-   * render array.
-   *
-   * @param array $render
-   *   The render array to retrieve and remove the assets from.
-   * @param bool $collect_attached
-   *   Whether or not #attached assets should be collected.
-   */
-  public function addRecursionStorage(array &$render, $collect_attached = FALSE);
-
-  // Render Cache specific functions.
-  // --------------------------------
-
-  /**
-   * Converts a render array to be compatible with Drupal 7.
-   *
-   * This moves Drupal 8 properties into ['#attached']['render_cache'].
-   *
-   * @param array $render
-   *   The render array to convert.
-   * @return array
-   *   The converted render array.
-   */
-  public function convertRenderArrayToD7($render);
-
-  /**
-   * Converts a render array back to be compatible with Drupal 8.
-   *
-   * This moves properties from ['#attached']['render_cache'] back to the root.
-   *
-   * @param array $render
-   *   The render array to convert.
-   * @return array
-   *   The converted render array.
-   */
-  public function convertRenderArrayFromD7($render);
-}
diff --git a/src/Plugin/BasePlugin.php b/src/Plugin/BasePlugin.php
deleted file mode 100644
index 1f52c2e..0000000
--- a/src/Plugin/BasePlugin.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\Plugin\BasePlugin;
- */
-
-namespace Drupal\render_cache\Plugin;
-
-/**
- * Defines a base class for render cache plugin objects.
- *
- * @ingroup rendercache
- */
-class BasePlugin implements PluginInterface {
-  /**
-   * The plugin array from the plugin class's associated .inc file.
-   *
-   * @var array
-   */
-  protected $plugin;
-
-  /**
-   * The type this plugin implements.
-   *
-   * @var string
-   */
-  protected $type;
-
-  /**
-   * Public constructor.
-   *
-   * @param array $plugin
-   *   The plugin associated with this class.
-   */
-  public function __construct($plugin) {
-    $this->plugin = $plugin;
-    $this->type = $plugin['name'];
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getType() {
-    return $this->type;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getPlugin() {
-    return $this->plugin;
-  }
-}
diff --git a/src/Plugin/PluginInterface.php b/src/Plugin/PluginInterface.php
deleted file mode 100644
index 369c3c5..0000000
--- a/src/Plugin/PluginInterface.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\Plugin\PluginInterface;
- */
-
-namespace Drupal\render_cache\Plugin;
-
-/**
- * Defines an interface for render cache plugin objects.
- *
- * @ingroup rendercache
- */
-interface PluginInterface {
-  /**
-   * Returns the plugin associated with this class.
-   *
-   * @return array
-   *   The plugin array from the plugin class's associated .inc file.
-   */
-  public function getPlugin();
-
-  /**
-   * Returns the type this plugin implements.
-   *
-   * @return string
-   *   The type this plugin implements.
-   */
-  public function getType();
-}
diff --git a/src/RenderCache/Controller/AbstractBaseController.php b/src/RenderCache/Controller/AbstractBaseController.php
deleted file mode 100644
index d869ce1..0000000
--- a/src/RenderCache/Controller/AbstractBaseController.php
+++ /dev/null
@@ -1,145 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\RenderCache\Controller\AbstractBaseController
- */
-
-namespace Drupal\render_cache\RenderCache\Controller;
-
-use Drupal\render_cache\Plugin\BasePlugin;
-
-/**
- * Controller abstract base class.
- *
- * @ingroup rendercache
- */
-abstract class AbstractBaseController extends BasePlugin implements ControllerInterface {
-  // -----------------------------------------------------------------------
-  // Suggested implementation functions.
-
-  /**
-   * @param array $default_cache_info
-   * @param array $context
-   *
-   * @return bool
-   */
-  abstract protected function isCacheable(array $default_cache_info, array $context);
-
-  /**
-   * Provides the cache info for all objects based on the context.
-   *
-   * @param array $context
-   *
-   * @return array
-   */
-  abstract protected function getDefaultCacheInfo($context);
-
-  /**
-   * @param object $object
-   * @param array $context
-   *
-   * @return array
-   */
-  abstract protected function getCacheContext($object, array $context);
-
-  /**
-   * Specific cache info overrides based on the $object.
-   *
-   * @param object $object
-   * @param array $context
-   *
-   * @return array
-   */
-  abstract protected function getCacheInfo($object, array $context);
-
-  /**
-   * @param object $object
-   * @param array $context
-   *
-   * @return array
-   */
-  abstract protected function getCacheKeys($object, array $context);
-
-  /**
-   * @param object $object
-   * @param array $context
-   *
-   * @return array
-   */
-  abstract protected function getCacheHash($object, array $context);
-
-  /**
-   * @param object $object
-   * @param array $context
-   *
-   * @return array
-   */
-  abstract protected function getCacheTags($object, array $context);
-
-  /**
-   * @param object $object
-   * @param array $context
-   *
-   * @return array
-   */
-  abstract protected function getCacheValidate($object, array $context);
-
-   /**
-   * Render uncached objects.
-   *
-   * This function needs to be implemented by every child class.
-   *
-   * @param array $objects
-   *   Array of $objects to be rendered keyed by id.
-   *
-   * @return array
-   *   Render array keyed by id.
-   */
-  abstract protected function render(array $objects);
-
-  /**
-   * Renders uncached objects in a recursion compatible way.
-   *
-   * The default implementation is dumb and expensive performance wise, as
-   * it calls the render() method for each object seperately.
-   *
-   * Controllers that support recursions should implement the
-   * RecursionControllerInterface and subclass from
-   * BaseRecursionController.
-   *
-   * @see \Drupal\render_cache\RenderCache\Controller\RecursionControllerInterface
-   * @see \Drupal\render_cache\RenderCache\Controller\BaseRecursionController
-   *
-   * @param object[] $objects
-   *   Array of $objects to be rendered keyed by id.
-   *
-   * @return array[]
-   *   Render array keyed by id.
-   */
-  abstract protected function renderRecursive(array $objects);
-
-  // -----------------------------------------------------------------------
-  // Helper functions.
-
-  /**
-   * Provides the fully pouplated cache information for a specific object.
-   *
-   * @param object $object
-   * @param array $cache_info
-   * @param array $context
-   *
-   * @return array
-   */
-  abstract protected function getCacheIdInfo($object, array $cache_info = array(), array $context = array());
-
-  /**
-   * @param string $type
-   * @param array $data
-   * @param mixed|null $context1
-   * @param mixed|null $context2
-   * @param mixed|null $context3
-   */
-  abstract protected function alter($type, &$data, &$context1 = NULL, &$context2 = NULL, &$context3 = NULL);
-}
-
-
diff --git a/src/RenderCache/Controller/BaseController.php b/src/RenderCache/Controller/BaseController.php
deleted file mode 100644
index 87829ab..0000000
--- a/src/RenderCache/Controller/BaseController.php
+++ /dev/null
@@ -1,560 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\RenderCache\Controller\BaseController
- */
-
-namespace Drupal\render_cache\RenderCache\Controller;
-
-use Drupal\render_cache\Cache\Cache;
-use Drupal\render_cache\Cache\RenderCacheBackendAdapterInterface;
-use Drupal\render_cache\Cache\RenderCachePlaceholder;
-use Drupal\render_cache\Cache\RenderStack;
-use Drupal\render_cache\Cache\RenderStackInterface;
-
-use RenderCache;
-
-/**
- * Base class for Controller plugin objects.
- *
- * @ingroup rendercache
- */
-abstract class BaseController extends AbstractBaseController {
-
-  /**
-   * An optional context provided by this controller.
-   *
-   * @var array
-   */
-  protected $context = array();
-
-  /**
-   * The injected render stack.
-   *
-   * @var \Drupal\render_cache\Cache\RenderStackInterface
-   */
-  protected $renderStack;
-
-  /**
-   * The injected cache backend adapter.
-   *
-   * @var \Drupal\render_cache\Cache\RenderCacheBackendAdapter
-   */
-  protected $cache;
-
-  /**
-   * Constructs a controller plugin object.
-   *
-   * @param array $plugin
-   *   The plugin definition.
-   * @param \Drupal\render_cache\Cache\RenderStack $render_stack
-   *   The render stack.
-   * @param \Drupal\render_cache\Cache\RenderCacheBackendAdapter $cache
-   *   The cache backend adapter.
-   */
-  public function __construct(array $plugin, RenderStackInterface $render_stack, RenderCacheBackendAdapterInterface $cache) {
-    parent::__construct($plugin);
-    $this->renderStack = $render_stack;
-    $this->cache = $cache;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getContext() {
-    return $this->context;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setContext(array $context) {
-    $this->context = $context;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function viewPlaceholders(array $objects) {
-    $object_build = array();
-
-    if (!empty($objects)) {
-      $object_build = $this->render($objects);
-    }
-
-    return $object_build;
-  }
-  /**
-   * {@inheritdoc}
-   */
-  public function view(array $objects) {
-    $object_order = array_keys($objects);
-
-    // Retrieve controller context.
-    $context = $this->getContext();
-
-    // Get default cache info and allow modules to alter it.
-    $default_cache_info = $this->getDefaultCacheInfo($context);
-    $this->alter('default_cache_info', $default_cache_info, $context);
-
-    // Calculate cache info map.
-    $cache_info_map = $this->getCacheInfoMap($objects, $context, $default_cache_info);
-    $build = $this->cache->getMultiple($cache_info_map);
-    $build += $this->getPlaceholders($objects, $cache_info_map, $context);
-
-    $remaining = array_diff_key($objects, $build);
-
-    // Render non-cached entities.
-    if (!empty($remaining)) {
-      $object_build = $this->renderRecursive($remaining);
-
-      // @todo It is possible for modules to set the request to not cacheable, so
-      // check this again.
-      // @todo This conflicts with memcache stampede protection, will need to
-      //       set empty cache entries instead.
-      //if ($this->isCacheable($default_cache_info, $context)) {
-      $this->cache->setMultiple($object_build, $cache_info_map);
-      //}
-      $build += $object_build;
-    }
-
-    $return = array();
-    foreach ($object_order as $id) {
-      // This can happen when a block, e.g. is empty.
-      if (!isset($build[$id])) {
-        continue;
-      }
-      $render = $build[$id];
-
-      // Unset any remaining weight properties.
-      unset($render['#weight']);
-
-      $cache_info = $cache_info_map[$id];
-      if (!$this->renderStack->isRecursive()) {
-        $this->renderStack->processPostRenderCache($render, $cache_info);
-      }
-
-      // Store recursive storage and remove from render array.
-      $storage = $this->renderStack->addRecursionStorage($render);
-
-      // @todo Use a #post_render function.
-      if (isset($render['#markup'])
-         && (variable_get('render_cache_debug_output', FALSE)
-           || variable_get('render_cache_debug_output_' . $this->getType(), FALSE)
-           || !empty($cache_info['render_cache_debug_output']))
-         ) {
-        // @todo Move to helper function.
-        $prefix = '<!-- START RENDER ID: ' . $id . ' CACHE INFO: ' . "\n" . print_r($cache_info, TRUE);
-        $cache_hit = (!empty($cache_info_map[$id]['cid']) && !isset($object_build[$id])) ? 'YES' : 'NO';
-        $prefix .= "\nCACHE_HIT: $cache_hit\n";
-        $full_storage = $storage;
-        $attached = $this->renderStack->collectAttached($render);
-        if ($attached) {
-          $full_storage['#attached'] = $attached;
-        }
-
-        $attached = print_r($storage, TRUE);
-        $prefix .= "\nATTACHED: " . print_r($full_storage, TRUE) . "\n";
-        $prefix .= "\nHOOKS:\n";
-        $hook_prefix = 'render_cache_' . $this->getType() . '_';
-        foreach (array('default_cache_info', 'cache_info', 'keys', 'tags', 'hash', 'validate') as $hook) {
-          $prefix .= '* hook_' . $hook_prefix . $hook . "_alter()\n";
-        }
-        $prefix .= '-->';
-        $suffix = '<!-- END RENDER: ' . $id . ' -->';
-        $render['#markup'] = "\n$prefix\n" . $render['#markup'] . "\n$suffix\n";
-      }
-
-      $return[$id] = $render;
-    }
-
-    // If this is the main entry point.
-    if (!$this->renderStack->isRecursive() && variable_get('render_cache_send_drupal_cache_tags', TRUE)) {
-      $storage = $this->renderStack->getRecursionStorage();
-
-      if (!empty($storage['#cache']['tags'])) {
-        $header = implode(' ', $storage['#cache']['tags']);
-        // @todo ensure render_cache is the top module.
-        // Currently this header can be send multiple times.
-        drupal_add_http_header('X-Drupal-Cache-Tags', $header, TRUE);
-      }
-    }
-
-    return $return;
-  }
-
-  // -----------------------------------------------------------------------
-  // Child implementable functions.
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function isCacheable(array $default_cache_info, array $context) {
-    $ignore_request_method_check = $default_cache_info['render_cache_ignore_request_method_check'];
-    return isset($default_cache_info['granularity'])
-        && variable_get('render_cache_enabled', TRUE)
-        && variable_get('render_cache_' . $this->getType() . '_enabled', TRUE)
-        && render_cache_call_is_cacheable(NULL, $ignore_request_method_check);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheContext($object, array $context) {
-    return $context;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheInfo($object, array $context) {
-    return array();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheKeys($object, array $context) {
-    return array(
-      'render_cache',
-      $this->getType(),
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheHash($object, array $context) {
-    return array(
-      'id' => $context['id'],
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheTags($object, array $context) {
-    return array(
-      'rendered',
-      $this->getType() . '_view',
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheValidate($object, array $context) {
-    return array();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getDefaultCacheInfo($context) {
-    return array(
-      // @todo indentation.
-       // Drupal 7 properties.
-       'bin' => 'cache_render',
-       'expire' => RenderCache::CACHE_PERMANENT,
-       // Use per role to support contextual and its safer anyway.
-       'granularity' => DRUPAL_CACHE_PER_ROLE,
-       'keys' => array(),
-
-       // Drupal 8 properties.
-       'tags' => array(),
-
-       // Proposed Drupal 8 properties.
-       'max-age' => array(),
-       'downstream-ttl' => array(),
-
-       // Allows special rendering via big pipe, esi, etc.
-       'render_strategy' => array(),
-
-       // Render Cache specific properties.
-       // @todo Port to Drupal 8.
-       'hash' => array(),
-       'validate' => array(),
-
-       // Special keys that are only related to our implementation.
-       // @todo Remove and replace with something else.
-       'render_cache_render_to_markup' => FALSE,
-
-       // New internal properties.
-       'render_cache_ignore_request_method_check' => FALSE,
-       'render_cache_cache_strategy' => NULL,
-       'render_cache_preserve_properties' => array(),
-       'render_cache_preserve_original' => FALSE,
-    );
-  }
-
-  // -----------------------------------------------------------------------
-  // Helper functions
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getCacheIdInfo($object, array $cache_info = array(), array $context = array()) {
-    $context = $this->getCacheContext($object, $context);
-
-    $cache_info = drupal_array_merge_deep(
-      $cache_info,
-      $this->getCacheInfo($object, $context)
-    );
-
-    // Ensure these properties are always set.
-    $cache_info += array(
-      'keys' => array(),
-      'hash' => array(),
-      'tags' => array(),
-      'validate' => array(),
-    );
-
-    // Set cache information properties.
-    $cache_info['keys'] = array_merge(
-      $cache_info['keys'],
-      $this->getCacheKeys($object, $context)
-    );
-    $cache_info['hash'] = array_merge(
-      $cache_info['hash'],
-      $this->getCacheHash($object, $context)
-    );
-    $cache_info['tags'] = Cache::mergeTags(
-      $cache_info['tags'],
-      $this->getCacheTags($object, $context)
-    );
-    $cache_info['validate'] = drupal_array_merge_deep(
-      $cache_info['validate'],
-      $this->getCacheValidate($object, $context)
-    );
-
-    // @todo Remove this later.
-    $cache_info['hash']['render_method'] = !empty($cache_info['render_cache_render_to_markup']);
-    if ($cache_info['hash']['render_method']) {
-      $cache_info['hash']['render_options'] = serialize($cache_info['render_cache_render_to_markup']);
-    }
-
-    $this->alter('cache_info', $cache_info, $object, $context);
-
-    // If we can't cache this, return with cid set to NULL.
-    if ($cache_info['granularity'] == DRUPAL_NO_CACHE) {
-      $cache_info['cid'] = NULL;
-      return $cache_info;
-    }
-
-    // If a Cache ID isset, we need to skip the rest.
-    if (isset($cache_info['cid'])) {
-      return $cache_info;
-    }
-
-    $keys = &$cache_info['keys'];
-    $hash = &$cache_info['hash'];
-
-    $tags = &$cache_info['tags'];
-    $validate = &$cache_info['validate'];
-
-    // Allow modules to alter the keys, hash, tags and validate.
-    $this->alter('keys', $keys, $object, $cache_info, $context);
-    $this->alter('hash', $hash, $object, $cache_info, $context);
-
-    $this->alter('tags', $tags, $object, $cache_info, $context);
-    $this->alter('validate', $validate, $object, $cache_info, $context);
-
-    // Add drupal_render cid_parts based on granularity.
-    $granularity = isset($cache_info['granularity']) ? $cache_info['granularity'] : NULL;
-    $cid_parts = array_merge(
-      $cache_info['keys'],
-      drupal_render_cid_parts($granularity)
-    );
-
-    // Calculate the hash.
-    $algorithm = variable_get('render_cache_hash_algorithm', 'md5');
-    $cid_parts[] = hash($algorithm, implode('-', $cache_info['hash']));
-
-    // Allow modules to alter the final cid_parts array.
-    $this->alter('cid', $cid_parts, $cache_info, $object, $context);
-
-    $cache_info['cid'] = implode(':', $cid_parts);
-
-    // Save the placeholder ID and remove cache id.
-    if (!empty($cache_info['render_strategy'])) {
-      $cache_info['placeholder_id'] = $cache_info['cid'];
-      $cache_info['cid'] = NULL;
-    }
-
-    // If the caller caches this customly, unset cid.
-    if ($cache_info['granularity'] == DRUPAL_CACHE_CUSTOM) {
-      $cache_info['cid'] = NULL;
-    }
-
-    // Convert to the new format. (BC layer)
-    if (empty($cache_info['render_cache_cache_strategy'])) {
-      $strategy = $this->determineCachingStrategy($cache_info);
-      $cache_info['render_cache_cache_strategy'] = $strategy;
-    }
-    if (!empty($cache_info['render_cache_render_to_markup']['preserve properties'])) {
-      $cache_info['render_cache_preserve_properties'] = $cache_info['render_cache_render_to_markup']['preserve properties'];
-    }
-    unset($cache_info['render_cache_render_to_markup']);
-
-    return $cache_info;
-  }
-
-  /**
-   * Returns the cache information map for the given objects.
-   *
-   * @param array $objects
-   *   The objects keyed by ID to get cache information for.
-   * @param array $context
-   *   The context given to the controller.
-   * @param array $default_cache_info
-   *   The default cache info structure.
-   *
-   * @return array
-   *   Array keyed by ID with the cache info structures as values.
-   */
-  protected function getCacheInfoMap(array $objects, array $context, array $default_cache_info) {
-    $cache_info_map = array();
-
-    // Determine if this is cacheable.
-    $is_cacheable = $this->isCacheable($default_cache_info, $context);
-
-    // Retrieve a list of cache_info structures.
-    foreach ($objects as $id => $object) {
-      $object_context = $context;
-      $object_context['id'] = $id;
-      $cache_info_map[$id] = $this->getCacheIdInfo($object, $default_cache_info, $object_context);
-
-      // If it is not cacheable, set the 'cid' to NULL.
-      if (!$is_cacheable) {
-        $cache_info_map[$id]['cid'] = NULL;
-      }
-    }
-
-    return $cache_info_map;
-  }
-
-  /**
-   * Determines the caching strategy for a given cache info structure.
-   *
-   * @param array $cache_info
-   *   The cache information structure.
-   *
-   * @return int
-   *   One of the RenderCache::RENDER_CACHE_STRATEGY_* constants.
-   */
-  protected function determineCachingStrategy($cache_info) {
-    if (empty($cache_info['render_cache_render_to_markup'])) {
-      return RenderCache::RENDER_CACHE_STRATEGY_NO_RENDER;
-    }
-
-    if (!empty($cache_info['render_cache_render_to_markup']['cache late'])) {
-      return RenderCache::RENDER_CACHE_STRATEGY_LATE_RENDER;
-    }
-
-    return RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function renderRecursive(array $objects) {
-    $build = array();
-    foreach ($objects as $id => $object) {
-
-      $single_objects = array(
-        $id => $object,
-      );
-
-      $this->renderStack->increaseRecursion();
-      $render = $this->render($single_objects);
-      $storage = $this->renderStack->decreaseRecursion();
-      if (!empty($render[$id])) {
-        $build[$id] = $render[$id];
-        $build[$id]['x_render_cache_recursion_storage'] = $storage;
-      }
-    }
-    return $build;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function alter($type, &$data, &$context1 = NULL, &$context2 = NULL, &$context3 = NULL) {
-    drupal_alter('render_cache_' . $this->getType() . '_' . $type, $data, $context1, $context2, $context3);
-  }
-
-  /**
-   * Get the placeholders from the cache information map.
-   *
-   * @param array $objects
-   *   The objects keyed by ID to get cache information for.
-   * @param array $cache_info_map
-   *   The cache information map.
-   * @param array $context
-   *   The context given to the controller.
-   *
-   * @return array
-   *   The render array keyed by id with placeholders as values.
-   */
-  protected function getPlaceholders(array $objects, array $cache_info_map, $context) {
-    $build = array();
-    foreach ($cache_info_map as $id => $cache_info) {
-      if (empty($cache_info['placeholder_id'])) {
-        continue;
-      }
-
-      // @todo Serialize the object.
-      $ph_object = array(
-        'id' => $id,
-        'type' => $this->getType(),
-        'context' => $context,
-        'object' => $objects[$id],
-        'cache_info' => $cache_info,
-        // Put this for easy access here.
-        'render_strategy' => $cache_info['render_strategy'],
-      );
-      $build[$id] = RenderCachePlaceholder::getPlaceholder(get_class($this) . '::renderPlaceholders', $ph_object, TRUE);
-    }
-
-    return $build;
-  }
-
-  /**
-   * @param array $args
-   *
-   * @return array|string
-   */
-  public static function renderPlaceholders(array $args) {
-    $all_placeholders = array();
-    $strategies = array();
-
-    foreach ($args as $placeholder => $ph_object) {
-      foreach ($ph_object['render_strategy'] as $render_strategy) {
-        $strategies[$render_strategy][$placeholder] = $placeholder;
-      }
-
-      // Fallback to direct rendering.
-      $strategies['direct'][$placeholder] = $placeholder;
-    }
-
-    foreach ($strategies as $render_strategy => $placeholder_keys) {
-      $rcs = render_cache_get_renderer($render_strategy);
-      if (!$rcs) {
-        continue;
-      }
-
-      $objects = array_intersect_key($args, $placeholder_keys);
-      if (empty($objects)) {
-        continue;
-      }
-
-      $placeholders = $rcs->render($objects);
-      foreach ($placeholders as $placeholder => $render) {
-        $all_placeholders[$placeholder] = $render;
-        unset($args[$placeholder]);
-      }
-    }
-
-    return $all_placeholders;
-  }
-}
diff --git a/src/RenderCache/Controller/BaseRecursionController.php b/src/RenderCache/Controller/BaseRecursionController.php
deleted file mode 100644
index be3d273..0000000
--- a/src/RenderCache/Controller/BaseRecursionController.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\RenderCache\Controller\BaseRecursionController
- */
-
-namespace Drupal\render_cache\RenderCache\Controller;
-
-/**
- * Base class for RecursionController plugin objects.
- *
- * Used for render cache controllers that support recursion.
- *
- * @ingroup rendercache
- */
-abstract class BaseRecursionController extends BaseController implements RecursionControllerInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function recursionStep(array &$build) {
-    $storage = $this->renderStack->decreaseRecursion();
-    if (!empty($build)) {
-      $build['x_render_cache_recursion_storage'] = $storage;
-    }
-    $this->renderStack->increaseRecursion();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function renderRecursive(array $objects) {
-    // This provides an optimized version for rendering in a
-    // recursive way.
-    //
-    // @see BaseController::renderRecursive()
-
-    // Store the render cache controller within the objects.
-    foreach ($objects as $object) {
-      if (is_object($object)) {
-        $object->render_cache_controller = $this;
-      }
-    }
-
-    // Increase recursion for the first step.
-    $this->renderStack->increaseRecursion();
-
-    // Now build the objects, the implementing class
-    // is responsible to call recursionStep()
-    // after each object has been individually built.
-    $build = $this->render($objects);
-
-    // Decrease recursion as the last step.
-    $this->renderStack->decreaseRecursion();
-
-    // Remove the render cache controller within the objects again.
-    foreach ($objects as $object) {
-      if (is_object($object)) {
-        unset($object->render_cache_controller);
-      }
-    }
-
-    return $build;
-  }
-}
diff --git a/src/RenderCache/Controller/ControllerInterface.php b/src/RenderCache/Controller/ControllerInterface.php
deleted file mode 100644
index 2f25449..0000000
--- a/src/RenderCache/Controller/ControllerInterface.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\RenderCache\Controller\ControllerInterface
- */
-
-namespace Drupal\render_cache\RenderCache\Controller;
-
-/**
- * Interface to describe how RenderCache controller plugin objects are implemented.
- *
- * @ingroup rendercache
- */
-interface ControllerInterface {
-
-  /**
-   * @return array
-   */
-  public function getContext();
-
-  /**
-   * @param array $context
-   */
-  public function setContext(array $context);
-
-  /**
-   * @param array $objects
-   *
-   * @return array
-   */
-  public function view(array $objects);
-
-  /**
-   * @param object[] $objects
-   *
-   * @return array
-   */
-  public function viewPlaceholders(array $objects);
-
-  /**
-   * @param array $args
-   *
-   * @return string
-   */
-  public static function renderPlaceholders(array $args);
-}
diff --git a/src/RenderCache/Controller/RecursionControllerInterface.php b/src/RenderCache/Controller/RecursionControllerInterface.php
deleted file mode 100644
index 51c280a..0000000
--- a/src/RenderCache/Controller/RecursionControllerInterface.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\RenderCache\Controller\RecursionControllerInterface
- */
-
-namespace Drupal\render_cache\RenderCache\Controller;
-
-/**
- * Interface to describe how RenderCache controller plugin objects supporting
- * recursion are implemented.
- *
- * @ingroup rendercache
- */
-interface RecursionControllerInterface {
-  /**
-   * Ensures that recursion storage is added to the right cached object.
-   *
-   * Example: A module can implement hook_block_view_alter() and pass
-   *          $block->content to ensure that recursion storage created
-   *          during the building of the block is properly added to the block
-   *          itself:
-   * {@code}
-   * function render_cache_block_block_view_alter(&$data, $block) {
-   *   if (!empty($block->render_cache_controller) && !empty($data['content'])) {
-   *     // Normalize to the drupal_render() structure so we can add something.
-   *     if (is_string($data['content'])) {
-   *       $data['content'] = array(
-   *         '#markup' => $data['#content'],
-   *       );
-   *     }
-   *     $block->render_cache_controller->recursionStep($data['content']);
-   *   }
-   * }
-   * {@endcode}
-   *
-   * @param $build
-   *   The render array to add the recursion storage to when the $build is not
-   *   empty.
-   */
-  public function recursionStep(array &$build);
-}
-
-
diff --git a/src/RenderCache/RenderStrategy/BaseRenderStrategy.php b/src/RenderCache/RenderStrategy/BaseRenderStrategy.php
deleted file mode 100644
index 768790d..0000000
--- a/src/RenderCache/RenderStrategy/BaseRenderStrategy.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\RenderCache\RenderStrategy\BaseRenderStrategy
- */
-
-namespace Drupal\render_cache\RenderCache\RenderStrategy;
-
-use Drupal\render_cache\Plugin\BasePlugin;
-
-/**
- * Base class for RenderStrategy plugin objects.
- *
- * @ingroup rendercache
- */
-abstract class BaseRenderStrategy extends BasePlugin implements RenderStrategyInterface {
-
-}
diff --git a/src/RenderCache/RenderStrategy/DirectRenderStrategy.php b/src/RenderCache/RenderStrategy/DirectRenderStrategy.php
deleted file mode 100644
index 69195a4..0000000
--- a/src/RenderCache/RenderStrategy/DirectRenderStrategy.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\RenderCache\RenderStrategy\DirectRenderStrategy
- */
-
-namespace Drupal\render_cache\RenderCache\RenderStrategy;
-
-/**
- * Direct fallback to render placeholders.
- *
- * @ingroup rendercache
- */
-class DirectRenderStrategy extends BaseRenderStrategy {
-  /**
-   * {@inheritdoc}
-   */
-  public function render(array $args) {
-    $placeholders = array();
-    foreach ($args as $placeholder => $ph_object) {
-      $rcc = render_cache_get_controller($ph_object['type']);
-      $rcc->setContext($ph_object['context']);
-      $objects = array(
-        $ph_object['id'] => $ph_object['object'],
-      );
-      $build = $rcc->viewPlaceholders($objects);
-
-      $placeholders[$placeholder] = $build;
-    }
-
-    return $placeholders;
-  }
-}
diff --git a/src/RenderCache/RenderStrategy/RenderStrategyInterface.php b/src/RenderCache/RenderStrategy/RenderStrategyInterface.php
deleted file mode 100644
index 6f4d42b..0000000
--- a/src/RenderCache/RenderStrategy/RenderStrategyInterface.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\RenderCache\RenderStrategy\RenderStrategyInterface
- */
-
-namespace Drupal\render_cache\RenderCache\RenderStrategy;
-
-/**
- * Interface to describe how RenderCache renderer plugin objects are implemented.
- *
- * @ingroup rendercache
- */
-interface RenderStrategyInterface {
-  public function render(array $placeholders);
-}
diff --git a/src/RenderCache/RenderStrategy/direct.inc b/src/RenderCache/RenderStrategy/direct.inc
deleted file mode 100644
index 89ece93..0000000
--- a/src/RenderCache/RenderStrategy/direct.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-
-$plugin = array(
-  'class' => "\\Drupal\\render_cache\\RenderCache\\RenderStrategy\\DirectRenderStrategy",
-  'priority' => 0,
-);
diff --git a/src/RenderCache/ValidationStrategy/BaseValidationStrategy.php b/src/RenderCache/ValidationStrategy/BaseValidationStrategy.php
deleted file mode 100644
index 77de063..0000000
--- a/src/RenderCache/ValidationStrategy/BaseValidationStrategy.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\RenderCache\ValidationStrategy\BaseValidationStrategy
- */
-
-namespace Drupal\render_cache\RenderCache\ValidationStrategy;
-
-use Drupal\render_cache\Plugin\BasePlugin;
-
-/**
- * Base class for ValidationStrategy plugin objects.
- *
- * @ingroup rendercache
- */
-abstract class BaseValidationStrategy extends BasePlugin implements ValidationStrategyInterface {
-}
diff --git a/src/RenderCache/ValidationStrategy/ValidationStrategyInterface.php b/src/RenderCache/ValidationStrategy/ValidationStrategyInterface.php
deleted file mode 100644
index 901761f..0000000
--- a/src/RenderCache/ValidationStrategy/ValidationStrategyInterface.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\RenderCache\ValidationStrategy\ValidationStrategyInterface
- */
-
-namespace Drupal\render_cache\RenderCache\ValidationStrategy;
-
-/**
- * Interface for RenderCache ValidationStrategy plugin objects.
- *
- * @ingroup rendercache
- */
-interface ValidationStrategyInterface {
-  public function validate(array $objects);
-  public function generate(array $objects);
-}
diff --git a/src/ServiceContainer/ServiceProvider/RenderCacheServiceProvider.php b/src/ServiceContainer/ServiceProvider/RenderCacheServiceProvider.php
deleted file mode 100644
index 9f4d72c..0000000
--- a/src/ServiceContainer/ServiceProvider/RenderCacheServiceProvider.php
+++ /dev/null
@@ -1,120 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\render_cache\ServiceContainer\ServiceProvider\RenderCacheServiceProvider
- */
-
-namespace Drupal\render_cache\ServiceContainer\ServiceProvider;
-
-use Drupal\service_container\DependencyInjection\ServiceProviderInterface;
-
-/**
- * Provides render cache service definitions.
- *
- * @codeCoverageIgnore
- */
-class RenderCacheServiceProvider implements ServiceProviderInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getContainerDefinition() {
-    $parameters = array();
-    $parameters['cache_contexts'] = array();
-    $parameters['service_container.static_event_listeners'] = array('RenderCache');
-
-    $services = array();
-
-    // Cache Contexts
-    $services['cache_contexts'] = array(
-      'class' => '\Drupal\render_cache\Cache\CacheContexts',
-      'arguments' => array(
-        '@service_container',
-        '%cache_contexts%',
-      ),
-    );
-    $services['cache_context.url'] = array(
-      'class' => '\Drupal\render_cache\Cache\UrlCacheContext',
-      'tags' => array(
-        array('name' => 'cache.context'),
-      ),
-    );
-    $services['cache_context.language'] = array(
-      'class' => '\Drupal\render_cache\Cache\LanguageCacheContext',
-      'tags' => array(
-        array('name' => 'cache.context'),
-      ),
-    );
-    $services['cache_context.theme'] = array(
-      'class' => '\Drupal\render_cache\Cache\ThemeCacheContext',
-      'tags' => array(
-        array('name' => 'cache.context'),
-      ),
-    );
-    $services['cache_context.theme'] = array(
-      'class' => '\Drupal\render_cache\Cache\TimezoneCacheContext',
-      'tags' => array(
-        array('name' => 'cache.context'),
-      ),
-    );
-    // Render Stack
-    $services['render_stack'] = array(
-      'class' => '\Drupal\render_cache\Cache\RenderStack',
-    );
-    $services['render_cache.cache'] = array(
-      'class' => '\Drupal\render_cache\Cache\RenderCacheBackendAdapter',
-      'arguments' => array('@render_stack'),
-    );
-
-    // Services provided normally by user.module.
-    $services['cache_context.user'] = array(
-      'class' => '\Drupal\render_cache\Cache\UserCacheContext',
-      'tags' => array(
-        array('name' => 'cache.context'),
-      ),
-    );
-    $services['cache_context.user.roles'] = array(
-      'class' => '\Drupal\render_cache\Cache\UserRolesCacheContext',
-      'tags' => array(
-        array('name' => 'cache.context'),
-      ),
-    );
-
-    // Plugin Managers - filled out by alterDefinition() of service_container
-    // module.
-    // This needs to exist in an empty state.
-    $services['render_cache.controller'] = array();
-    $services['render_cache.render_strategy'] = array();
-    $services['render_cache.validation_strategy'] = array();
-
-    // Syntax is: <service_name> => <plugin_manager_definition>
-    $parameters['service_container.plugin_managers']['ctools'] = array(
-      'render_cache.controller' => array(
-        'owner' => 'render_cache',
-        'type' => 'Controller',
-      ),
-      'render_cache.validation_strategy' => array(
-        'owner' => 'render_cache',
-        'type' => 'ValidationStrategy',
-      ),
-      'render_cache.render_strategy' => array(
-        'owner' => 'render_cache',
-        'type' => 'RenderStrategy',
-      ),
-    );
-
-    return array(
-      'parameters' => $parameters,
-      'services' => $services,
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function alterContainerDefinition(&$container_definition) {
-    // Register cache contexts parameter in the container.
-    $container_definition['parameters']['cache_contexts'] = array_keys($container_definition['tags']['cache.context']);
-  }
-}
diff --git a/src/ServiceContainer/ServiceProvider/render_cache.inc b/src/ServiceContainer/ServiceProvider/render_cache.inc
deleted file mode 100644
index e8dbc5a..0000000
--- a/src/ServiceContainer/ServiceProvider/render_cache.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
-$plugin = array(
-  'class' => "\\Drupal\\render_cache\\ServiceContainer\\ServiceProvider\\RenderCacheServiceProvider",
-);
diff --git a/tests/.coveralls.yml b/tests/.coveralls.yml
deleted file mode 100644
index 16968ef..0000000
--- a/tests/.coveralls.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-# .coveralls.yml configuration
-
-# for php-coveralls
-src_dir: ../src
-coverage_clover: build/logs/clover.xml
-json_path: build/logs/coveralls-upload.json
diff --git a/tests/.gitignore b/tests/.gitignore
deleted file mode 100644
index 48b8bf9..0000000
--- a/tests/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-vendor/
diff --git a/tests/README.md b/tests/README.md
deleted file mode 100644
index b572094..0000000
--- a/tests/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-### How to run the tests
-
-````
-./tests/run-tests.sh
-````
-
-The tests are in a subdirectory to not clutter the main module space with composer, etc.
-Composer is only needed to run the tests.
diff --git a/tests/composer.json b/tests/composer.json
deleted file mode 100644
index 3738b4d..0000000
--- a/tests/composer.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "require-dev": {
-    "phpunit/phpunit": "3.7.*",
-    "mockery/mockery": "0.9.*"
-  },
-  "autoload": {
-    "psr-0": {
-      "Drupal\\Core\\": "../lib/",
-      "RenderCache": "../lib/",
-      "Drupal\\Component\\": "lib/"
-    },
-    "psr-4": {
-      "Drupal\\render_cache\\": "../src/",
-      "Drupal\\render_cache_block\\": "../modules/controller/render_cache_block/src/",
-      "Drupal\\render_cache_entity\\": "../modules/controller/render_cache_entity/src/",
-      "Drupal\\render_cache_page\\": "../modules/controller/render_cache_page/src/",
-      "Drupal\\render_cache_big_pipe\\": "../modules/renderer/render_cache_big_pipe/src/",
-      "Drupal\\render_cache\\Tests\\": "src/"
-    }
-  }
-}
diff --git a/tests/composer.lock b/tests/composer.lock
deleted file mode 100644
index e36b642..0000000
--- a/tests/composer.lock
+++ /dev/null
@@ -1,496 +0,0 @@
-{
-    "_readme": [
-        "This file locks the dependencies of your project to a known state",
-        "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
-        "This file is @generated automatically"
-    ],
-    "hash": "64879cceb7868fced52f3841b25b4be5",
-    "packages": [],
-    "packages-dev": [
-        {
-            "name": "mockery/mockery",
-            "version": "0.9.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/padraic/mockery.git",
-                "reference": "95a4855380dc70176c51807c678fb3bd6198529a"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/padraic/mockery/zipball/95a4855380dc70176c51807c678fb3bd6198529a",
-                "reference": "95a4855380dc70176c51807c678fb3bd6198529a",
-                "shasum": ""
-            },
-            "require": {
-                "lib-pcre": ">=7.0",
-                "php": ">=5.3.2"
-            },
-            "require-dev": {
-                "hamcrest/hamcrest-php": "~1.1",
-                "phpunit/phpunit": "~4.0",
-                "satooshi/php-coveralls": "~0.7@dev"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "0.9.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Mockery": "library/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Pádraic Brady",
-                    "email": "padraic.brady@gmail.com",
-                    "homepage": "http://blog.astrumfutura.com"
-                },
-                {
-                    "name": "Dave Marshall",
-                    "email": "dave.marshall@atstsolutions.co.uk",
-                    "homepage": "http://davedevelopment.co.uk"
-                }
-            ],
-            "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succint API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.",
-            "homepage": "http://github.com/padraic/mockery",
-            "keywords": [
-                "BDD",
-                "TDD",
-                "library",
-                "mock",
-                "mock objects",
-                "mockery",
-                "stub",
-                "test",
-                "test double",
-                "testing"
-            ],
-            "time": "2014-09-03 10:11:10"
-        },
-        {
-            "name": "phpunit/php-code-coverage",
-            "version": "1.2.18",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b",
-                "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3",
-                "phpunit/php-file-iterator": ">=1.3.0@stable",
-                "phpunit/php-text-template": ">=1.2.0@stable",
-                "phpunit/php-token-stream": ">=1.1.3,<1.3.0"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "3.7.*@dev"
-            },
-            "suggest": {
-                "ext-dom": "*",
-                "ext-xdebug": ">=2.0.5"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.2.x-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "PHP/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "include-path": [
-                ""
-            ],
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sb@sebastian-bergmann.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
-            "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
-            "keywords": [
-                "coverage",
-                "testing",
-                "xunit"
-            ],
-            "time": "2014-09-02 10:13:14"
-        },
-        {
-            "name": "phpunit/php-file-iterator",
-            "version": "1.3.4",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
-                "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
-                "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "autoload": {
-                "classmap": [
-                    "File/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "include-path": [
-                ""
-            ],
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sb@sebastian-bergmann.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "FilterIterator implementation that filters files based on a list of suffixes.",
-            "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
-            "keywords": [
-                "filesystem",
-                "iterator"
-            ],
-            "time": "2013-10-10 15:34:57"
-        },
-        {
-            "name": "phpunit/php-text-template",
-            "version": "1.2.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/php-text-template.git",
-                "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
-                "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "autoload": {
-                "classmap": [
-                    "Text/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "include-path": [
-                ""
-            ],
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sb@sebastian-bergmann.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Simple template engine.",
-            "homepage": "https://github.com/sebastianbergmann/php-text-template/",
-            "keywords": [
-                "template"
-            ],
-            "time": "2014-01-30 17:20:04"
-        },
-        {
-            "name": "phpunit/php-timer",
-            "version": "1.0.5",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/php-timer.git",
-                "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
-                "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "autoload": {
-                "classmap": [
-                    "PHP/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "include-path": [
-                ""
-            ],
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sb@sebastian-bergmann.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Utility class for timing",
-            "homepage": "https://github.com/sebastianbergmann/php-timer/",
-            "keywords": [
-                "timer"
-            ],
-            "time": "2013-08-02 07:42:54"
-        },
-        {
-            "name": "phpunit/php-token-stream",
-            "version": "1.2.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/php-token-stream.git",
-                "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32",
-                "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32",
-                "shasum": ""
-            },
-            "require": {
-                "ext-tokenizer": "*",
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.2-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "PHP/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "include-path": [
-                ""
-            ],
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sb@sebastian-bergmann.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Wrapper around PHP's tokenizer extension.",
-            "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
-            "keywords": [
-                "tokenizer"
-            ],
-            "time": "2014-03-03 05:10:30"
-        },
-        {
-            "name": "phpunit/phpunit",
-            "version": "3.7.38",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/38709dc22d519a3d1be46849868aa2ddf822bcf6",
-                "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6",
-                "shasum": ""
-            },
-            "require": {
-                "ext-ctype": "*",
-                "ext-dom": "*",
-                "ext-json": "*",
-                "ext-pcre": "*",
-                "ext-reflection": "*",
-                "ext-spl": "*",
-                "php": ">=5.3.3",
-                "phpunit/php-code-coverage": "~1.2",
-                "phpunit/php-file-iterator": "~1.3",
-                "phpunit/php-text-template": "~1.1",
-                "phpunit/php-timer": "~1.0",
-                "phpunit/phpunit-mock-objects": "~1.2",
-                "symfony/yaml": "~2.0"
-            },
-            "require-dev": {
-                "pear-pear.php.net/pear": "1.9.4"
-            },
-            "suggest": {
-                "phpunit/php-invoker": "~1.1"
-            },
-            "bin": [
-                "composer/bin/phpunit"
-            ],
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "3.7.x-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "PHPUnit/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "include-path": [
-                "",
-                "../../symfony/yaml/"
-            ],
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "The PHP Unit Testing framework.",
-            "homepage": "http://www.phpunit.de/",
-            "keywords": [
-                "phpunit",
-                "testing",
-                "xunit"
-            ],
-            "time": "2014-10-17 09:04:17"
-        },
-        {
-            "name": "phpunit/phpunit-mock-objects",
-            "version": "1.2.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
-                "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5794e3c5c5ba0fb037b11d8151add2a07fa82875",
-                "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3",
-                "phpunit/php-text-template": ">=1.1.1@stable"
-            },
-            "suggest": {
-                "ext-soap": "*"
-            },
-            "type": "library",
-            "autoload": {
-                "classmap": [
-                    "PHPUnit/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "include-path": [
-                ""
-            ],
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sb@sebastian-bergmann.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Mock Object library for PHPUnit",
-            "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
-            "keywords": [
-                "mock",
-                "xunit"
-            ],
-            "time": "2013-01-13 10:24:48"
-        },
-        {
-            "name": "symfony/yaml",
-            "version": "v2.5.5",
-            "target-dir": "Symfony/Component/Yaml",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/Yaml.git",
-                "reference": "b1dbc53593b98c2d694ebf383660ac9134d30b96"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/Yaml/zipball/b1dbc53593b98c2d694ebf383660ac9134d30b96",
-                "reference": "b1dbc53593b98c2d694ebf383660ac9134d30b96",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.5-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Symfony\\Component\\Yaml\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Symfony Community",
-                    "homepage": "http://symfony.com/contributors"
-                },
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                }
-            ],
-            "description": "Symfony Yaml Component",
-            "homepage": "http://symfony.com",
-            "time": "2014-09-22 09:14:18"
-        }
-    ],
-    "aliases": [],
-    "minimum-stability": "stable",
-    "stability-flags": [],
-    "prefer-stable": false,
-    "platform": [],
-    "platform-dev": []
-}
diff --git a/tests/install.sh b/tests/install.sh
deleted file mode 100755
index 48115db..0000000
--- a/tests/install.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-# @file
-# Simple script to install composer dependencies.
-
-set -e
-
-DIR=$(dirname $0)
-cd $DIR
-composer self-update
-composer install --no-interaction --prefer-source --dev
diff --git a/tests/lib/Drupal/Component/Utility/NestedArray.php b/tests/lib/Drupal/Component/Utility/NestedArray.php
deleted file mode 100644
index c494c24..0000000
--- a/tests/lib/Drupal/Component/Utility/NestedArray.php
+++ /dev/null
@@ -1,347 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\Component\Utility\NestedArray.
- */
-
-namespace Drupal\Component\Utility;
-
-/**
- * Provides helpers to perform operations on nested arrays and array keys of variable depth.
- *
- * @ingroup utility
- */
-class NestedArray {
-
-  /**
-   * Retrieves a value from a nested array with variable depth.
-   *
-   * This helper function should be used when the depth of the array element
-   * being retrieved may vary (that is, the number of parent keys is variable).
-   * It is primarily used for form structures and renderable arrays.
-   *
-   * Without this helper function the only way to get a nested array value with
-   * variable depth in one line would be using eval(), which should be avoided:
-   * @code
-   * // Do not do this! Avoid eval().
-   * // May also throw a PHP notice, if the variable array keys do not exist.
-   * eval('$value = $array[\'' . implode("']['", $parents) . "'];");
-   * @endcode
-   *
-   * Instead, use this helper function:
-   * @code
-   * $value = NestedArray::getValue($form, $parents);
-   * @endcode
-   *
-   * A return value of NULL is ambiguous, and can mean either that the requested
-   * key does not exist, or that the actual value is NULL. If it is required to
-   * know whether the nested array key actually exists, pass a third argument
-   * that is altered by reference:
-   * @code
-   * $key_exists = NULL;
-   * $value = NestedArray::getValue($form, $parents, $key_exists);
-   * if ($key_exists) {
-   *   // ... do something with $value ...
-   * }
-   * @endcode
-   *
-   * However if the number of array parent keys is static, the value should
-   * always be retrieved directly rather than calling this function.
-   * For instance:
-   * @code
-   * $value = $form['signature_settings']['signature'];
-   * @endcode
-   *
-   * @param array $array
-   *   The array from which to get the value.
-   * @param array $parents
-   *   An array of parent keys of the value, starting with the outermost key.
-   * @param bool $key_exists
-   *   (optional) If given, an already defined variable that is altered by
-   *   reference.
-   *
-   * @return mixed
-   *   The requested nested value. Possibly NULL if the value is NULL or not all
-   *   nested parent keys exist. $key_exists is altered by reference and is a
-   *   Boolean that indicates whether all nested parent keys exist (TRUE) or not
-   *   (FALSE). This allows to distinguish between the two possibilities when
-   *   NULL is returned.
-   *
-   * @see NestedArray::setValue()
-   * @see NestedArray::unsetValue()
-   */
-  public static function &getValue(array &$array, array $parents, &$key_exists = NULL) {
-    $ref = &$array;
-    foreach ($parents as $parent) {
-      if (is_array($ref) && array_key_exists($parent, $ref)) {
-        $ref = &$ref[$parent];
-      }
-      else {
-        $key_exists = FALSE;
-        $null = NULL;
-        return $null;
-      }
-    }
-    $key_exists = TRUE;
-    return $ref;
-  }
-
-  /**
-   * Sets a value in a nested array with variable depth.
-   *
-   * This helper function should be used when the depth of the array element you
-   * are changing may vary (that is, the number of parent keys is variable). It
-   * is primarily used for form structures and renderable arrays.
-   *
-   * Example:
-   * @code
-   * // Assume you have a 'signature' element somewhere in a form. It might be:
-   * $form['signature_settings']['signature'] = array(
-   *   '#type' => 'text_format',
-   *   '#title' => t('Signature'),
-   * );
-   * // Or, it might be further nested:
-   * $form['signature_settings']['user']['signature'] = array(
-   *   '#type' => 'text_format',
-   *   '#title' => t('Signature'),
-   * );
-   * @endcode
-   *
-   * To deal with the situation, the code needs to figure out the route to the
-   * element, given an array of parents that is either
-   * @code array('signature_settings', 'signature') @endcode
-   * in the first case or
-   * @code array('signature_settings', 'user', 'signature') @endcode
-   * in the second case.
-   *
-   * Without this helper function the only way to set the signature element in
-   * one line would be using eval(), which should be avoided:
-   * @code
-   * // Do not do this! Avoid eval().
-   * eval('$form[\'' . implode("']['", $parents) . '\'] = $element;');
-   * @endcode
-   *
-   * Instead, use this helper function:
-   * @code
-   * NestedArray::setValue($form, $parents, $element);
-   * @endcode
-   *
-   * However if the number of array parent keys is static, the value should
-   * always be set directly rather than calling this function. For instance,
-   * for the first example we could just do:
-   * @code
-   * $form['signature_settings']['signature'] = $element;
-   * @endcode
-   *
-   * @param array $array
-   *   A reference to the array to modify.
-   * @param array $parents
-   *   An array of parent keys, starting with the outermost key.
-   * @param mixed $value
-   *   The value to set.
-   * @param bool $force
-   *   (optional) If TRUE, the value is forced into the structure even if it
-   *   requires the deletion of an already existing non-array parent value. If
-   *   FALSE, PHP throws an error if trying to add into a value that is not an
-   *   array. Defaults to FALSE.
-   *
-   * @see NestedArray::unsetValue()
-   * @see NestedArray::getValue()
-   */
-  public static function setValue(array &$array, array $parents, $value, $force = FALSE) {
-    $ref = &$array;
-    foreach ($parents as $parent) {
-      // PHP auto-creates container arrays and NULL entries without error if $ref
-      // is NULL, but throws an error if $ref is set, but not an array.
-      if ($force && isset($ref) && !is_array($ref)) {
-        $ref = array();
-      }
-      $ref = &$ref[$parent];
-    }
-    $ref = $value;
-  }
-
-  /**
-   * Unsets a value in a nested array with variable depth.
-   *
-   * This helper function should be used when the depth of the array element you
-   * are changing may vary (that is, the number of parent keys is variable). It
-   * is primarily used for form structures and renderable arrays.
-   *
-   * Example:
-   * @code
-   * // Assume you have a 'signature' element somewhere in a form. It might be:
-   * $form['signature_settings']['signature'] = array(
-   *   '#type' => 'text_format',
-   *   '#title' => t('Signature'),
-   * );
-   * // Or, it might be further nested:
-   * $form['signature_settings']['user']['signature'] = array(
-   *   '#type' => 'text_format',
-   *   '#title' => t('Signature'),
-   * );
-   * @endcode
-   *
-   * To deal with the situation, the code needs to figure out the route to the
-   * element, given an array of parents that is either
-   * @code array('signature_settings', 'signature') @endcode
-   * in the first case or
-   * @code array('signature_settings', 'user', 'signature') @endcode
-   * in the second case.
-   *
-   * Without this helper function the only way to unset the signature element in
-   * one line would be using eval(), which should be avoided:
-   * @code
-   * // Do not do this! Avoid eval().
-   * eval('unset($form[\'' . implode("']['", $parents) . '\']);');
-   * @endcode
-   *
-   * Instead, use this helper function:
-   * @code
-   * NestedArray::unset_nested_value($form, $parents, $element);
-   * @endcode
-   *
-   * However if the number of array parent keys is static, the value should
-   * always be set directly rather than calling this function. For instance, for
-   * the first example we could just do:
-   * @code
-   * unset($form['signature_settings']['signature']);
-   * @endcode
-   *
-   * @param array $array
-   *   A reference to the array to modify.
-   * @param array $parents
-   *   An array of parent keys, starting with the outermost key and including
-   *   the key to be unset.
-   * @param bool $key_existed
-   *   (optional) If given, an already defined variable that is altered by
-   *   reference.
-   *
-   * @see NestedArray::setValue()
-   * @see NestedArray::getValue()
-   */
-  public static function unsetValue(array &$array, array $parents, &$key_existed = NULL) {
-    $unset_key = array_pop($parents);
-    $ref = &self::getValue($array, $parents, $key_existed);
-    if ($key_existed && is_array($ref) && array_key_exists($unset_key, $ref)) {
-      $key_existed = TRUE;
-      unset($ref[$unset_key]);
-    }
-    else {
-      $key_existed = FALSE;
-    }
-  }
-
-  /**
-   * Determines whether a nested array contains the requested keys.
-   *
-   * This helper function should be used when the depth of the array element to
-   * be checked may vary (that is, the number of parent keys is variable). See
-   * NestedArray::setValue() for details. It is primarily used for form
-   * structures and renderable arrays.
-   *
-   * If it is required to also get the value of the checked nested key, use
-   * NestedArray::getValue() instead.
-   *
-   * If the number of array parent keys is static, this helper function is
-   * unnecessary and the following code can be used instead:
-   * @code
-   * $value_exists = isset($form['signature_settings']['signature']);
-   * $key_exists = array_key_exists('signature', $form['signature_settings']);
-   * @endcode
-   *
-   * @param array $array
-   *   The array with the value to check for.
-   * @param array $parents
-   *   An array of parent keys of the value, starting with the outermost key.
-   *
-   * @return bool
-   *   TRUE if all the parent keys exist, FALSE otherwise.
-   *
-   * @see NestedArray::getValue()
-   */
-  public static function keyExists(array $array, array $parents) {
-    // Although this function is similar to PHP's array_key_exists(), its
-    // arguments should be consistent with getValue().
-    $key_exists = NULL;
-    self::getValue($array, $parents, $key_exists);
-    return $key_exists;
-  }
-
-  /**
-   * Merges multiple arrays, recursively, and returns the merged array.
-   *
-   * This function is similar to PHP's array_merge_recursive() function, but it
-   * handles non-array values differently. When merging values that are not both
-   * arrays, the latter value replaces the former rather than merging with it.
-   *
-   * Example:
-   * @code
-   * $link_options_1 = array('fragment' => 'x', 'attributes' => array('title' => t('X'), 'class' => array('a', 'b')));
-   * $link_options_2 = array('fragment' => 'y', 'attributes' => array('title' => t('Y'), 'class' => array('c', 'd')));
-   *
-   * // This results in array('fragment' => array('x', 'y'), 'attributes' => array('title' => array(t('X'), t('Y')), 'class' => array('a', 'b', 'c', 'd'))).
-   * $incorrect = array_merge_recursive($link_options_1, $link_options_2);
-   *
-   * // This results in array('fragment' => 'y', 'attributes' => array('title' => t('Y'), 'class' => array('a', 'b', 'c', 'd'))).
-   * $correct = NestedArray::mergeDeep($link_options_1, $link_options_2);
-   * @endcode
-   *
-   * @param array ...
-   *   Arrays to merge.
-   *
-   * @param bool $preserve_integer_keys
-   *   (optional) If given, integer keys will be preserved and merged instead of
-   *   appended.
-   *
-   * @return array
-   *   The merged array.
-   *
-   * @see NestedArray::mergeDeepArray()
-   */
-  public static function mergeDeep() {
-    return self::mergeDeepArray(func_get_args());
-  }
-
-  /**
-   * Merges multiple arrays, recursively, and returns the merged array.
-   *
-   * This function is equivalent to NestedArray::mergeDeep(), except the
-   * input arrays are passed as a single array parameter rather than a variable
-   * parameter list.
-   *
-   * The following are equivalent:
-   * - NestedArray::mergeDeep($a, $b);
-   * - NestedArray::mergeDeepArray(array($a, $b));
-   *
-   * The following are also equivalent:
-   * - call_user_func_array('NestedArray::mergeDeep', $arrays_to_merge);
-   * - NestedArray::mergeDeepArray($arrays_to_merge);
-   *
-   * @see NestedArray::mergeDeep()
-   */
-  public static function mergeDeepArray(array $arrays, $preserve_integer_keys = FALSE) {
-    $result = array();
-    foreach ($arrays as $array) {
-      foreach ($array as $key => $value) {
-        // Renumber integer keys as array_merge_recursive() does unless
-        // $preserve_integer_keys is set to TRUE. Note that PHP automatically
-        // converts array keys that are integer strings (e.g., '1') to integers.
-        if (is_integer($key) && !$preserve_integer_keys) {
-          $result[] = $value;
-        }
-        // Recurse when both values are arrays.
-        elseif (isset($result[$key]) && is_array($result[$key]) && is_array($value)) {
-          $result[$key] = self::mergeDeepArray(array($result[$key], $value), $preserve_integer_keys);
-        }
-        // Otherwise, use the latter value, overriding any previous value.
-        else {
-          $result[$key] = $value;
-        }
-      }
-    }
-    return $result;
-  }
-
-}
diff --git a/tests/modules/rc_assets_test/css/block-foo.css b/tests/modules/rc_assets_test/css/block-foo.css
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/modules/rc_assets_test/css/entity-inner.css b/tests/modules/rc_assets_test/css/entity-inner.css
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/modules/rc_assets_test/css/entity-outer.css b/tests/modules/rc_assets_test/css/entity-outer.css
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/modules/rc_assets_test/css/entity-preprocess.css b/tests/modules/rc_assets_test/css/entity-preprocess.css
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/modules/rc_assets_test/js/block-foo.js b/tests/modules/rc_assets_test/js/block-foo.js
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/modules/rc_assets_test/js/entity-inner.js b/tests/modules/rc_assets_test/js/entity-inner.js
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/modules/rc_assets_test/js/entity-outer.js b/tests/modules/rc_assets_test/js/entity-outer.js
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/modules/rc_assets_test/js/entity-preprocess.js b/tests/modules/rc_assets_test/js/entity-preprocess.js
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/modules/rc_assets_test/rc_assets_test.info b/tests/modules/rc_assets_test/rc_assets_test.info
deleted file mode 100644
index df2b3d0..0000000
--- a/tests/modules/rc_assets_test/rc_assets_test.info
+++ /dev/null
@@ -1,10 +0,0 @@
-name = Render cache - Test module for assets
-description = Test module for testing assets
-package = Performance and scalability
-core = 7.x
-hidden = TRUE
-
-; Dependencies
-dependencies[] = render_cache
-dependencies[] = render_cache_block
-dependencies[] = render_cache_entity
diff --git a/tests/modules/rc_assets_test/rc_assets_test.module b/tests/modules/rc_assets_test/rc_assets_test.module
deleted file mode 100644
index 3d77259..0000000
--- a/tests/modules/rc_assets_test/rc_assets_test.module
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-
-/**
- * Implements hook_block_info().
- */
-function rc_assets_test_block_info() {
-  $names = array( 'JS_CSS', 'Entity');
-  $blocks = array();
-  foreach ($names as $name) {
-    $blocks['rc_assets_test_' . strtolower($name)] = array(
-      'info' => t('RC Assets: @name', array('@name' => $name)),
-      'cache' => DRUPAL_NO_CACHE,
-    );
-  }
-
-  return $blocks;
-}
-
-/**
- * Implements hook_block_view().
- */
-function rc_assets_test_block_view($delta = '') {
-  $block = array();
-  $name = str_replace('rc_assets_test_', '', $delta);
-
-  $block['subject'] = t('RC Assets Block: ' . $name);
-  $block['content'] = _rc_assets_test_view_block($name);
-
-  return $block;
-}
-
-function _rc_assets_test_view_block($name) {
-
-  $path = drupal_get_path('module', 'rc_assets_test');
-  if ($name == 'js_css') {
-    $build['#markup'] = t('Real time data: ' . microtime(TRUE));
-    $build['#attached']['css'][] = $path . '/css/block-foo.css';
-    $build['#attached']['js'][]  = $path . '/js/block-foo.js';
-    return $build;
-  }
-
-  if ($name == 'entity') {
-    $node = node_load(1);
-    $build = render_cache_entity_view_single('node', $node, 'rc_assets_view_mode');
-    $build['#attached']['css'][] = $path . '/css/entity-outer.css';
-    $build['#attached']['js'][]  = $path . '/js/entity-outer.js';
-    return $build;
-  }
-}
-
-/**
- * Implements hook_entity_view_alter().
- */
-function rc_assets_test_entity_view_alter(&$build, $type) {
-  if ($type == 'node') {
-    $node = $build['#node'];
-    $path = drupal_get_path('module', 'rc_assets_test');
-    $build['#attached']['css'][] = $path . '/css/entity-inner.css';
-    $build['#attached']['js'][]  = $path . '/js/entity-inner.js';
-    $build['#attached']['js'][]  = array( 'type' => 'setting', 'data' => array('foo' => array($node->nid)));
-    $build['some_child'] = array('#markup' => 'Node: ' . $node->nid . t(' Real time data: ' . microtime(TRUE)));
-  }
-}
-
-function rc_assets_test_preprocess_node($variables) {
-  if ($variables['view_mode'] == 'rc_assets_view_mode') {
-    $path = drupal_get_path('module', 'rc_assets_test');
-    drupal_add_css($path . '/css/entity-preprocess.css');
-    drupal_add_js($path . '/js/entity-preprocess.js');
-  }
-}
-
-/**
- * Implements hook_render_cache_block_cache_info_alter().
- */
-function rc_assets_test_render_cache_entity_cache_info_alter(&$cache_info, $object, $context) {
-  if ($context['view_mode'] == 'rc_assets_view_mode') {
-    // @todo check for node == 1 with custom view mode ...
-    $cache_info['granularity'] = DRUPAL_CACHE_GLOBAL;
-    $cache_info['render_cache_cache_strategy'] = RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER;
-  }
-}
-
-/**
- * Implements hook_render_cache_block_cache_info_alter().
- */
-function rc_assets_test_render_cache_block_cache_info_alter(&$cache_info, $object, $context) {
-  if ($context['module'] == 'rc_assets_test') {
-    $cache_info['granularity'] = DRUPAL_CACHE_GLOBAL;
-    $cache_info['render_cache_cache_strategy'] = RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER;
-  }
-}
diff --git a/tests/phpunit.xml.dist b/tests/phpunit.xml.dist
deleted file mode 100644
index dc98618..0000000
--- a/tests/phpunit.xml.dist
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--?xml version="1.0" encoding="UTF-8"?-->
-
-<phpunit colors="true" bootstrap="./vendor/autoload.php">
-  <testsuites>
-    <testsuite name="RenderCache">
-        <directory>./src/</directory>
-    </testsuite>
-  </testsuites>
-  <!-- Filter for coverage reports. -->
-  <filter>
-    <blacklist>
-      <directory>./vendor</directory>
-    </blacklist>
-    <whitelist>
-      <directory>../src</directory>
-    </whitelist>
-  </filter>
-  <listeners>
-    <listener class="\Mockery\Adapter\Phpunit\TestListener"></listener>
-  </listeners>
-</phpunit>
diff --git a/tests/run-coverage.sh b/tests/run-coverage.sh
deleted file mode 100755
index d629415..0000000
--- a/tests/run-coverage.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-# @file
-# Simple script to load composer and run the tests.
-
-set -e
-
-DIR=$(dirname $0)
-cd $DIR
-test -f "./vendor/bin/phpunit" || ./install.sh
-./vendor/bin/phpunit --coverage-html ./report
diff --git a/tests/run-simpletests.sh b/tests/run-simpletests.sh
deleted file mode 100755
index ffc61a4..0000000
--- a/tests/run-simpletests.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-# @file
-# Simple script to run the tests.
-
-set -e
-
-# Goto current directory.
-DIR=$(dirname $0)
-cd $DIR
-
-drush test-run "render_cache" "$@"
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
deleted file mode 100755
index 4887247..0000000
--- a/tests/run-tests.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-# @file
-# Simple script to load composer and run the tests.
-
-set -e
-
-DIR=$(dirname $0)
-cd $DIR
-test -f "./vendor/bin/phpunit" || ./install.sh
-./vendor/bin/phpunit "$@"
diff --git a/tests/src/Cache/CacheContextsTest.php b/tests/src/Cache/CacheContextsTest.php
deleted file mode 100644
index 031fea7..0000000
--- a/tests/src/Cache/CacheContextsTest.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\render_cache\Tests\Cache\CacheContextsTest
- */
-
-namespace Drupal\render_cache\Tests\Cache;
-
-use Drupal\render_cache\Cache\CacheContexts;
-
-use Mockery;
-
-/**
- * @coversDefaultClass \Drupal\render_cache\Cache\CacheContexts
- * @group cache
- */
-class CacheContextsTest extends \PHPUnit_Framework_TestCase {
-
-  /**
-   * The cache contexts service.
-   *
-   * @var \Drupal\render_cache\Cache\CacheContexts
-   */
-  protected $cacheContexts;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setUp() {
-    // Setup a foo cache context.
-    $foo_cache_context = Mockery::mock('\Drupal\Core\Cache\CacheContextInterface');
-    $foo_cache_context->shouldReceive('getLabel')
-      ->andReturn('Foo');
-    $foo_cache_context->shouldReceive('getContext')
-      ->andReturn('bar');
-
-    // Setup a mock container.
-    $container = Mockery::mock('alias:Drupal\service_container\DependencyInjection\ContainerInterface');
-    $container->shouldReceive('get')
-      ->with('cache_context.foo')
-      ->andReturn($foo_cache_context);
-
-    $this->cacheContexts = new CacheContexts($container, array('cache_context.foo'));
-  }
-
-  /**
-   * Tests that CacheContexts::getAll() is working properly.
-   * @covers ::__construct()
-   * @covers ::getAll()
-   */
-  public function test_getAll() {
-    $this->assertEquals(array('cache_context.foo'), $this->cacheContexts->getAll(), 'Cache Contexts service contains the right services.');
-  }
-
-  /**
-   * Tests that CacheContexts::getLabels() is working properly.
-   * @covers ::getLabels()
-   */
-  public function test_getLabels() {
-    $this->assertEquals(array('cache_context.foo' => 'Foo'), $this->cacheContexts->getLabels(), 'Cache Contexts service retrieves the right labels.');
-  }
-
-  /**
-   * Tests that CacheContexts::convertTokensToKeys() is working properly.
-   * @covers ::convertTokensToKeys()
-   */
-  public function test_convertTokensToKeys() {
-    $tokens = array('foo', 'bar', 'cache_context.foo');
-    $altered_tokens = array('foo', 'bar', 'bar');
-    $this->assertEquals($altered_tokens, $this->cacheContexts->convertTokensToKeys($tokens), 'Cache Contexts can be converted properly.');
-  }
-}
diff --git a/tests/src/Cache/CacheTest.php b/tests/src/Cache/CacheTest.php
deleted file mode 100644
index f30e094..0000000
--- a/tests/src/Cache/CacheTest.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\render_cache\Tests\Cache\CacheTest
- */
-
-namespace Drupal\render_cache\Tests\Cache;
-
-use Drupal\render_cache\Cache\Cache;
-
-use Mockery;
-
-/**
- * @coversDefaultClass \Drupal\render_cache\Cache\Cache
- * @group cache
- */
-class CacheTest extends \PHPUnit_Framework_TestCase {
-
-  /**
-   * Tests ::keyFromQuery() method.
-   * @covers ::keyFromQuery()
-   */
-  public function test_keyFromQuery() {
-    $query = Mockery::mock('\SelectQueryInterface');
-    $query
-      ->shouldReceive('preExecute')
-      ->once();
-    $query
-      ->shouldReceive('getArguments')
-      ->once()
-      ->andReturn(array(':foo' => 'bar'));
-    $query
-      ->shouldReceive('__toString')
-      ->once()
-      ->andReturn('SELECT * from {node} WHERE nid = :foo');
-
-    $this->assertEquals('46387e3c7711dfd22bf707bcd79fe77bd652741b9b53a7adeb9be32fa3e010bb', Cache::keyFromQuery($query), 'Key from query returns the right hash.');
-  }
-}
diff --git a/tests/src/Cache/RenderCacheBackendAdapterTest.php b/tests/src/Cache/RenderCacheBackendAdapterTest.php
deleted file mode 100644
index 9abe1b0..0000000
--- a/tests/src/Cache/RenderCacheBackendAdapterTest.php
+++ /dev/null
@@ -1,319 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\render_cache\Tests\Cache\RenderCacheBackendAdapterTest
- */
-
-namespace Drupal\render_cache\Tests\Cache;
-
-use Drupal\render_cache\Cache\RenderCacheBackendAdapter;
-use Drupal\render_cache\Cache\RenderStack;
-use DrupalCacheInterface;
-use RenderCache;
-
-use Mockery;
-
-/**
- * @coversDefaultClass \Drupal\render_cache\Cache\RenderCacheBackendAdapter
- * @group cache
- */
-class RenderCacheBackendAdapterTest extends \PHPUnit_Framework_TestCase {
-
-  /**
-   * The cache backend adapter service.
-   *
-   * @var \Drupal\render_cache\Cache\RenderCacheBackendAdapter
-   */
-  protected $cache;
-
-  protected $cacheHitData;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setUp() {
-    // @todo We need to mock Drupal class, because RenderCache extends it.
-    $drupal = Mockery::mock('alias:Drupal');
-
-    $data_raw = array(
-      'foo' => array(
-        '#markup' => 'foo',
-      ),
-      'bar' => array(
-        '#markup' => 'bar',
-      ),
-      'baz' => array(
-        'lama' => array(
-           '#markup' => 'baz',
-         ),
-      ),
-    );
-    $data = $data_raw;
-    $data['#cache'] = array(
-      'tags' => array('bar:1')
-    );
-    $data['foo']['#cache'] = array(
-      'tags' => array('foo:1')
-    );
-    $data['baz']['lama']['#cache'] = array(
-      'tags' => array('baz:42', 'lama:1')
-    );
-
-    $this->cacheHitData = (object) array(
-      'data' => $data,
-    );
-
-    $properties = array(
-      '#cache' => array(
-        'tags' => array(
-          'bar:1',
-          'baz:42',
-          'foo:1',
-          'lama:1',
-          'zar:1',
-        ),
-        'max-age' => array(600),
-      )
-    );
-    $preserved = array( 'baz' => $data['baz'] );
-
-    $this->cacheHitRendered = 'foobarbaz';
-
-    $this->cacheHitRenderedOriginal = $this->cacheHitData->data;
-    $this->cacheHitRenderedOriginal['#printed'] = TRUE;
-    $this->cacheHitRenderedOriginal['foo']['#printed'] = TRUE;
-    $this->cacheHitRenderedOriginal['bar']['#printed'] = TRUE;
-    $this->cacheHitRenderedOriginal['baz']['#printed'] = TRUE;
-    $this->cacheHitRenderedOriginal['baz']['lama']['#printed'] = TRUE;
-
-    $this->cacheHitNoRender = $data_raw + $properties;
-
-    $this->cacheHitLateRender = $data_raw + $properties + array(
-     '#attached' => array(
-       'render_cache' => $properties + $preserved,
-     ),
-   );
-    $this->cacheHitLateRender['#cache']['cid'] = 'render:foo:late';
-
-    $this->cacheHitRenderDirect = array(
-      '#markup' => $this->cacheHitRendered,
-      '#attached' => array(),
-    ) + $properties + $preserved;
-
-    // @todo This should use more mocked methods.
-    $stack = Mockery::mock('\Drupal\render_cache\Cache\RenderStack[render,collectAttached]');
-
-    // @todo Still need to implement those.
-    $stack->shouldReceive('render')
-      ->andReturn(array($this->cacheHitRendered,$this->cacheHitRenderedOriginal));
-    $stack->shouldReceive('collectAttached')
-      ->andReturn($this->cacheHitLateRender['#attached']);
-
-    $cache_bin = Mockery::mock('\DrupalCacheInterface');
-    // Cache hit
-    $cache_bin->shouldReceive('getMultiple')
-      ->with(
-        Mockery::on(function(&$cids) {
-          $cid = reset($cids);
-          if ($cid == 'render:foo:exists') {
-            $cids = array();
-            return TRUE;
-          }
-          return FALSE;
-        })
-      )
-      ->andReturn(
-        array('render:foo:exists' => $this->cacheHitData)
-      );
-
-    // Cache miss
-    $cache_bin->shouldReceive('getMultiple')
-      ->with(
-        Mockery::on(function(&$cids) {
-          $cid = reset($cids);
-          if ($cid == 'render:foo:not_exists') {
-            return TRUE;
-          }
-          return FALSE;
-        })
-      )
-      ->andReturn(
-        array(
-          // This is test only and will never happen with D7 backend.
-          'render:foo:not_exists' => FALSE,
-        )
-      );
-
-    $cache_bin->shouldReceive('set')
-      ->with('render:foo:bar', Mockery::on(function($data) { return TRUE; }), 0);
-
-    $cache_bin->shouldReceive('set')
-      ->with('render:foo:no', Mockery::on(function($data) { return TRUE; }), 0);
-
-    $cache_bin->shouldReceive('set')
-      ->with('render:foo:late', Mockery::on(function($data) { return TRUE; }), 0);
-
-    $cache_bin->shouldReceive('set')
-      ->with('render:foo:direct', Mockery::on(function($data) { return TRUE; }), 0);
-
-    $cache_bin->shouldReceive('set')
-      ->with('render:foo:direct', Mockery::on(function($data) { return TRUE; }), -1);
-
-    $cache = Mockery::mock('\Drupal\render_cache\Cache\RenderCacheBackendAdapter[cache]', array($stack));
-    $cache->shouldReceive('cache')
-      ->once()
-      ->andReturn($cache_bin);
-    $this->cache = $cache;
-  }
-
-  /**
-   * Tests that RenderCacheBackendAdapter::get() is working properly.
-   * @covers ::__construct()
-   * @covers ::get()
-   * @covers ::getCacheId()
-   */
-  public function test_get_hit() {
-    $cache_info = $this->getCacheInfo('render:foo:exists', RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER);
-    $this->assertEquals($this->cacheHitData->data, $this->cache->get($cache_info), 'Cache Hit Data matches for ::get()');
-  }
-
-  /**
-   * @covers ::get()
-   * @covers ::getMultiple()
-   */
-  public function test_get_miss() {
-    $cache_info = $this->getCacheInfo('render:foo:not_exists', RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER);
-    $this->assertEquals(array(), $this->cache->get($cache_info), 'Cache Miss data matches for ::get()');
-  }
-
-
-  /**
-   * Tests that RenderCacheBackendAdapter::set() is working properly.
-   * @covers ::set()
-   * @covers ::preserveProperties()
-   */
-  public function test_set() {
-    $cache_info = $this->getCacheInfo('render:foo:bar', RenderCache::RENDER_CACHE_STRATEGY_NO_RENDER);
-    // Also test that there are no properties to preserve.
-    $cache_info['render_cache_preserve_properties'] = array();
-    $render = $this->cacheHitData->data;
-    $this->cache->set($render, $cache_info);
-    $this->assertEquals($this->cacheHitNoRender, $render, 'Data is the same for no render strategy');
-  }
-
-  /**
-   * Tests that RenderCacheBackendAdapter::set() throwing an exception.
-   * @expectedException \RunTimeException
-   * @covers ::set()
-   */
-  public function test_set_exception() {
-    $cache_info = $this->getCacheInfo('render:foo:bar', -1);
-    $render = array();
-    // Ensure cache() was called one times ...
-    $this->cache->get($cache_info);
-    // ... because this throws an exception.
-    $this->cache->set($render, $cache_info);
-  }
-
-
-  /**
-   * Tests that RenderCacheBackendAdapter::getMultiple() is working properly.
-   * @covers ::getMultiple()
-   */
-  public function test_getMultiple() {
-    $cache_info_map = array(
-      '42' => $this->getCacheInfo('render:foo:exists', RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER),
-      '23' => $this->getCacheInfo('render:foo:not_exists', RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER),
-    );
-    $this->assertEquals(array('42' => $this->cacheHitData->data), $this->cache->getMultiple($cache_info_map), 'Cache data matches for ::getMultiple()');
-  }
-
-  /**
-   * Tests that RenderCacheBackendAdapter::setMultiple() is working properly.
-   * @covers ::setMultiple()
-   * @covers ::set()
-   */
-  public function test_setMultiple() {
-    // @todo consider using a data provider instead.
-    $cache_info_map = array(
-      'no' => $this->getCacheInfo('render:foo:no', RenderCache::RENDER_CACHE_STRATEGY_NO_RENDER),
-      'late' => $this->getCacheInfo('render:foo:late', RenderCache::RENDER_CACHE_STRATEGY_LATE_RENDER),
-    );
-
-    $build = array();
-    foreach ($cache_info_map as $id => $cache_info) {
-      $build[$id] = $this->cacheHitData->data;
-    }
-    $this->cache->setMultiple($build, $cache_info_map);
-    $this->assertEquals($this->cacheHitNoRender, $build['no'], 'Data is the same for no render strategy');
-    $this->assertEquals($this->cacheHitLateRender, $build['late'], 'Data is the same for late render strategy');
-  }
-
-  /**
-   * Tests that RenderCacheBackendAdapter::setMultiple() for direct strategy.
-   * @covers ::setMultiple()
-   * @covers ::set()
-   * @covers ::preserveProperties()
-   */
-  public function test_setMultiple_direct() {
-    // @todo consider using a data provider instead.
-    $cache_info_map = array(
-      'direct' => $this->getCacheInfo('render:foo:direct', RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER),
-      'late' => $this->getCacheInfo('render:foo:late', RenderCache::RENDER_CACHE_STRATEGY_LATE_RENDER),
-    );
-
-    $cache_info_map['late']['cid'] = NULL;
-
-    $build = array();
-    foreach ($cache_info_map as $id => $cache_info) {
-      $build[$id] = $this->cacheHitData->data;
-    }
-
-    $build['late']['#cache']['cid'] = 'foo';
-    $build['late']['#cache']['keys'] = 'foo:bar';
-
-    $this->cache->setMultiple($build, $cache_info_map);
-
-    $this->assertEquals($this->cacheHitRenderDirect, $build['direct'], 'Data is the same for direct render strategy');
-    $this->assertTrue(empty($build['late']['#cache']['cid']), 'cid property is NULL.');
-    $this->assertTrue(empty($build['late']['#cache']['keys']), 'keys property is NULL');
-
-    // Now restore it:
-    $build['late']['#cache']['cid'] = 'render:foo:late';
-    $this->assertEquals($this->cacheHitLateRender, $build['late'], 'Data is the same for late render strategy');
-  }
-
-  /**
-   * Tests that RenderCacheBackendAdapter::set() works for preserve_original.
-   * @covers ::set()
-   */
-  public function test_set_preserve_original() {
-    // @todo consider using a data provider instead.
-    $cache_info = $this->getCacheInfo('render:foo:direct', RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER);
-
-    // Test some more code paths.
-    $cache_info['bin'] = 'cache_render';
-    $cache_info['expire'] = -1;
-    $cache_info['render_cache_preserve_original'] = TRUE;
-
-    $render = $this->cacheHitData->data;
-
-    $this->cache->set($render, $cache_info);
-    $this->assertEquals($this->cacheHitRenderDirect, $render, 'Data is the same for direct render strategy');
-  }
-
-
-  protected function getCacheInfo($cid, $strategy) {
-    return array(
-      'cid' => $cid,
-      'keys' => array('render', 'foo','bar'),
-      'tags' => array('zar:1'),
-      'max-age' => array(600),
-      'downstream-ttl' => array(),
-      'render_cache_ignore_request_method_check' => FALSE,
-      'render_cache_cache_strategy' => $strategy,
-      'render_cache_preserve_properties' => array('baz'),
-    );
-  }
-}
diff --git a/tests/src/Cache/RenderCachePlaceholderTest.php b/tests/src/Cache/RenderCachePlaceholderTest.php
deleted file mode 100644
index 754125e..0000000
--- a/tests/src/Cache/RenderCachePlaceholderTest.php
+++ /dev/null
@@ -1,313 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\render_cache\Tests\Cache\RenderCachePlaceholderTest
- */
-
-namespace Drupal\render_cache\Tests\Cache;
-
-use Drupal\Component\Utility\NestedArray;
-use Drupal\render_cache\Cache\RenderCachePlaceholder;
-
-use Mockery;
-
-/**
- * @coversDefaultClass \Drupal\render_cache\Cache\RenderCachePlaceholder
- * @group cache
- */
-class RenderCachePlaceholderTest extends \PHPUnit_Framework_TestCase {
-
-  /**
-   * Helper variable to see that foo was loaded correctly.
-   * 
-   * @var mixed $foo
-   */
-  protected static $foo;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setUp() {
-    $this->staticClass = RenderCachePlaceholderMock::helper_getClass();
-    $this->testClass = get_class($this);
-    $this->placeholderArgFunc = '%' . $this->testClass . '::foo';
-    $this->placeholderArgLoad = $this->testClass . '::foo_load';
-
-    $data = array(
-      'single' => array(
-        'func' => 'postRenderCacheCallback',
-        'token' => 'n6lnoFtakTea+1C4Ox28YJ9GX/YA33x18RTw46nOOb+42Qofut1EvArYqECraJzlypf7DAR9MA==',
-        'callback' => $this->testClass . '::singleCallback',
-        'args' => array(
-          $this->placeholderArgFunc => 'foo',
-          'bar',
-        ),
-        'return' => 'Foobar',
-      ),
-      'multi_1' => array(
-        'func' => 'postRenderCacheMultiCallback',
-        'token' => 'M41Dgx+Cep02ViLzyRydUNgba8xMNdBjxn7Iu4dXNIXX+6L9RkNsXNfh8msI9mVFgd8yuQLlew==',
-        'callback' => $this->testClass . '::multiCallback',
-        'args' => array(
-          1,
-          'foo' => 'foo',
-        ),
-        'return' => 'bar_1_foo',
-      ),
-      'multi_2' => array(
-        'func' => 'postRenderCacheMultiCallback',
-        'token' => '5jOFkKm/lxLXBzraoHNGi8Aa5KxTZ9sDRTu7doVgxHACDxU2va7N2OpysutTffjDGupAGFpNRg==',
-        'callback' => $this->testClass . '::multiCallback',
-        'args' => array(
-          2,
-          'foo' => 'foo',
-        ),
-        'return' => 'bar_2_foo',
-      ),
-    );
-    foreach ($data as $key => $info) {
-      $data[$key]['placeholder'] = $this->getPlaceholderArray($info['token'], $info['callback'], $info['args'], $info['func']);
-    }
-    $this->data = $data;
-
-    $test_class = $this->testClass;
-
-    $mock = Mockery::mock('\Drupal\render_cache\Tests\Cache\RenderCachePlaceholderHelper');
-    $mock->shouldReceive('generatePlaceholder')
-      ->with(Mockery::any(), Mockery::on(function(array &$context) use ($data, $test_class) {
-        if ($context['function'] == ($test_class . '::singleCallback')) {
-          $context['token'] = $data['single']['token'];
-          return TRUE;
-        }
-        if ($context['function'] != ($test_class . '::multiCallback')) {
-          return FALSE;
-        }
-        $key = 'multi_' . $context['args'][0];
-        $context['token'] = $data[$key]['token'];
-        return TRUE;
-      }))
-      ->andReturnUsing(function($callback, $context) use ($data, $test_class) {
-        if ($context['function'] == ($test_class . '::singleCallback')) {
-          return $data['single']['placeholder']['#markup'];
-        }
-        $key = 'multi_' . $context['args'][0];
-        return $data[$key]['placeholder']['#markup'];
-      });
-
-    $mock->shouldReceive('drupalRender')
-      ->andReturnUsing(function($elements) {
-        return $elements['#markup'];
-      });
-   
-    $class_name = $this->staticClass;
-    $class_name::$mock = $mock;
-  }
-
-  /**
-   * @covers ::getPlaceholder()
-   */
-  public function test_getPlaceholder() {
-    $class_name = $this->staticClass;
-
-    $render = $class_name::getPlaceholder($this->data['single']['callback'], $this->data['single']['args']);
-    $this->assertEquals($this->data['single']['placeholder'], $render, 'getPlaceholder() returns the right output for single callback.');
-    return $render;
-  }
-
-  /**
-   * @depends test_getPlaceholder
-   * @covers ::postRenderCacheCallback()
-   * @covers ::loadPlaceholderFunctionArgs()
-   */
-  public function test_postRenderCacheCallback($render) {
-    $func = $this->placeholderArgLoad;
-    $foo = call_user_func($func, 'foo');
-
-    $this->processPostRenderCache($render);
-    $this->assertEquals($foo, static::$foo, 'Foo was loaded succesfully.');
-    
-    $expected = $this->data['single']['placeholder'];
-    $expected['#markup'] = $this->data['single']['return'];
-
-    $this->assertEquals($expected, $render, 'Placeholder was replaced.');
-  }
-
-  /**
-   * @depends test_getPlaceholder
-   * @covers ::postRenderCacheCallback()
-   */
-  public function test_postRenderCacheCallback_noPlaceholder($render) {
-    static::$foo = NULL;
-    $render['#markup'] = 'Bar';
-    $this->processPostRenderCache($render);
-    $this->assertNull(static::$foo, 'Foo was not loaded.');
-    $expected = $this->data['single']['placeholder'];
-    $expected['#markup'] = 'Bar';
-    $this->assertEquals($expected, $render, 'Placeholder was not replaced.');
-  }
-
-  /**
-   * @depends test_getPlaceholder
-   * @covers ::postRenderCacheMultiCallback()
-   */
-  public function test_postRenderCacheCallback_wrongFunction($render) {
-    // Move the callback from the single callback to the multi callback.
-    $tmp = $render['#post_render_cache'][$this->staticClass . '::postRenderCacheCallback'];
-    $render['#post_render_cache'][$this->staticClass . '::postRenderCacheMultiCallback'] = $tmp;
-    unset($render['#post_render_cache'][$this->staticClass . '::postRenderCacheCallback']);
-
-    $expected = $render;
-    $this->processPostRenderCache($render);
-    $this->assertEquals($expected, $render, 'Expected still matches $render.');
-  }
-
-  /**
-   * @covers ::getPlaceholder()
-   */
-  public function test_getPlaceholder_multi() {
-    $class_name = $this->staticClass;
-
-    $render_1 = $class_name::getPlaceholder($this->data['multi_1']['callback'], $this->data['multi_1']['args'], TRUE);
-    $this->assertEquals($this->data['multi_1']['placeholder'], $render_1, 'getPlaceholder() returns the right output for multi_1 callback.');
-
-    $render_2 = $class_name::getPlaceholder($this->data['multi_2']['callback'], $this->data['multi_2']['args'], TRUE);
-    $this->assertEquals($this->data['multi_2']['placeholder'], $render_2, 'getPlaceholder() returns the right output for multi_2 callback.');
-
-    $render = array();
-    $render['#post_render_cache'] = NestedArray::mergeDeep($render_1['#post_render_cache'], $render_2['#post_render_cache']);
-    $render['#markup'] = $render_1['#markup'] . '|' . $render_2['#markup'];
-
-    return $render;
-  }
-
-  /**
-   * @depends test_getPlaceholder_multi
-   * @covers ::postRenderCacheMultiCallback()
-   */
-  public function test_postRenderCacheMultiCallback($render) {
-    $expected = $render;
-    $this->processPostRenderCache($render);
-    $expected['#markup'] = $this->data['multi_1']['return'] . '|' . $this->data['multi_2']['return'];
-    $this->assertEquals($expected, $render, 'Placeholders have been replaced.');
-  }
-
-  /**
-   * @depends test_getPlaceholder_multi
-   * @covers ::postRenderCacheMultiCallback()
-   */
-  public function test_postRenderCacheMultiCallback_noPlaceholder($render) {
-    $expected = $render;
-    $render['#markup'] = 'Bar12345';
-    $this->processPostRenderCache($render);
-    $expected['#markup'] = 'Bar12345';
-    $this->assertEquals($expected, $render, 'Placeholders have not been replaced.');
-  }
-
-
-  /**
-   * Helper function to check that foo was populated
-   * and the right bar is returned.
-   */
-  public static function singleCallback($foo, $bar) {
-    static::$foo = $foo;
-    return array('#markup' => 'Foo' . $bar);
-  }
-
-  /**
-   * Helper function to check that the right arg is returned.
-   */
-  public static function multiCallback($pholders) {
-    $placeholders = array();
-    foreach ($pholders as $pholder => $args) {
-      $placeholders[$pholder] = array(
-        '#markup' => 'bar_' . $args[0] . '_' . $args['foo'],
-      );
-    }
-
-    return $placeholders;
-  }
-
-  /**
-   * Helper function to test loadPlaceholderFunctionArgs().
-   *
-   * @param string $argument
-   *   The path argument.
-   * @return object|NULL
-   *   The loaded object.
-   */
-  public static function foo_load($argument) {
-    if ($argument == 'foo') {
-      return (object) array('foo_id' => 1, 'type' => 'foo', 'title' => 'bar');
-    }
-
-    return NULL;
-  }
-
-  protected function processPostRenderCache(&$elements) {
-    foreach (array_keys($elements['#post_render_cache']) as $callback) {
-      foreach ($elements['#post_render_cache'][$callback] as $context) {
-        $elements = call_user_func_array($callback, array($elements, $context));
-      }
-    }
-  }
-
-  protected function getPlaceholderArray($token, $callback, $args, $func) {
-    $inner = array(array(
-              'function' => $callback,
-              'args' => $args,
-              'token' => $token,
-             ));
-    if ($func == 'postRenderCacheMultiCallback') {
-      $inner = array($callback => $inner);
-    }
-    return array(
-      '#post_render_cache' => 
-      array(
-        ($this->staticClass . '::' . $func) => $inner,
-      ),
-      '#markup' => '<drupal-render-cache-placeholder callback="' . $callback . '" token="' . $token . '"></drupal-render-cache-placeholder>',
-    );
-  }
-}
-
-class RenderCachePlaceholderMock extends RenderCachePlaceholder {
-  /**
-   * A mock that retrieves static calls we override.
-   *
-   * @var object
-   */
-  public static $mock;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected static function generatePlaceholder($callback, array &$context) {
-    return static::$mock->generatePlaceholder($callback, $context);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected static function drupalRender(array &$elements) {
-    return static::$mock->drupalRender($elements);
-  }
-
-  /**
-   * Helper to return the class of the class.
-   *
-   * @return string
-   *   Returns what the class was called as.
-   */
-  public static function helper_getClass() {
-    return get_called_class();
-  }
-}
-
-/**
- * Helper class to test the placeholder functionality as a mock.
- */
-abstract class RenderCachePlaceholderHelper {
-  abstract public function generatePlaceholder($callback, array &$context);
-  abstract public function drupalRender(array &$elements);
-}
diff --git a/tests/src/Cache/RenderStackTest.php b/tests/src/Cache/RenderStackTest.php
deleted file mode 100644
index 7556a0c..0000000
--- a/tests/src/Cache/RenderStackTest.php
+++ /dev/null
@@ -1,900 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\render_cache\Tests\Cache\RenderStackTest
- */
-
-namespace Drupal\render_cache\Tests\Cache;
-
-use Drupal\Component\Utility\NestedArray;
-use Drupal\render_cache\Cache\RenderStack;
-use Mockery;
-
-/**
- * @coversDefaultClass \Drupal\render_cache\Cache\RenderStack
- * @group cache
- */
-class RenderStackTest extends \PHPUnit_Framework_TestCase {
-
-  /**
-   * The renderStack service.
-   *
-   * @var \Drupal\render_cache\Cache\RenderStack
-   */
-  protected $renderStack;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setUp() {
-    $stack = Mockery::mock('\Drupal\render_cache\Cache\RenderStack[drupalRender,collectAttached,callOriginalFunction]');
-    $this->renderStack = $stack;
-  }
-
-  /**
-   * Tests that RenderStack::getCacheKeys() is working properly.
-   * @covers ::getCacheKeys()
-   */
-  public function test_getCacheKeys() {
-    $this->assertEquals(array('render_cache', 'foo'), $this->renderStack->getCacheKeys());
-  }
-
-  /**
-   * Tests that RenderStack::getCacheTags() is working properly.
-   * @covers ::getCacheTags()
-   */
-  public function test_getCacheTags() {
-    $this->assertEquals(array(array('node' => 1)), $this->renderStack->getCacheTags());
-  }
-
-  /**
-   * Tests that RenderStack::getCacheMaxAge() is working properly.
-   * @covers ::getCacheMaxAge()
-   */
-  public function test_getCacheMaxAge() {
-    $this->assertEquals(600, $this->renderStack->getCacheMaxAge());
-  }
-
-  /**
-   * Tests that RenderStack::isCacheable() is working properly.
-   * @covers ::isCacheable()
-   */
-  public function test_isCacheable() {
-    $this->assertEquals(TRUE, $this->renderStack->isCacheable());
-  }
-
-  /**
-   * Basic tests for recursive functions.
-   *
-   * @covers ::increaseRecursion()
-   * @covers ::decreaseRecursion()
-   * @covers ::getRecursionLevel()
-   * @covers ::isRecursive()
-   */
-  public function test_basicRecursion() {
-    $this->assertFalse($this->renderStack->isRecursive(), 'isRecursive() is FALSE at the beginning.');
-    $this->renderStack->increaseRecursion();
-    $this->assertTrue($this->renderStack->isRecursive(), 'isRecursive() is TRUE after increase.');
-    $this->assertEquals(1, $this->renderStack->getRecursionLevel(), 'Recursion Level is 1 after increase.');
-    $this->renderStack->decreaseRecursion();
-    $this->assertFalse($this->renderStack->isRecursive(), 'isRecursive() is FALSE at the end.');
-    $this->assertEquals(0, $this->renderStack->getRecursionLevel(), 'Recursion Level is 0 after increase and decrease.');
-  }
-
-  /**
-   * @covers ::getRecursionStorage()
-   * @covers ::setRecursionStorage()
-   * @covers ::addRecursionStorage()
-   */
-  public function test_getsetRecursionStorage() {
-    $attached = array();
-    $attached['css'][] = 'foo.css';
-    $attached['js'][] = 'bar.js';
-    $attached['library'][] = array('baz_module', 'lama');
-
-    $attached2 = array();
-    $attached2['css'][] = 'lama2.css';
-
-    $attached_combined = $attached;
-    $attached_combined['css'][] = 'lama2.css';
-
-    $recursion_storage_test_1_set = array(
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-          'rendered',
-        ),
-        '#tags' => array(
-          'invalid',
-        ),
-      ),
-      '#attached' => $attached,
-    );
-    $recursion_storage_test_1 = $recursion_storage_test_1_set;
-    unset($recursion_storage_test_1['#cache']['#tags']);
-
-    $recursion_storage_test_2 = array(
-      '#cache' => array(
-        'tags' => array(
-          'foo:42',
-          'zoo:1',
-        ),
-      ),
-      '#attached' => $attached2,
-    );
-    $recursion_storage_test_combined = array(
-      '#cache' => array(
-        'tags' => array(
-          'foo:42',
-          'node:1',
-          'rendered',
-          'zoo:1',
-        ),
-      ),
-      '#attached' => $attached_combined,
-    );
-    $this->renderStack
-      ->shouldReceive('collectAttached')
-      ->times(8)
-      ->andReturnUsing(function($render) use ($attached_combined) {
-        if (!empty($render['#attached']) && !empty($render[0]['#attached'])) {
-          return $attached_combined;
-        }
-        if (!empty($render['#attached'])) {
-          return $render['#attached'];
-        }
-        if (!empty($render[0]['#attached'])) {
-          return $render[0]['#attached'];
-        }
-
-        return array();
-      });
-
-
-    $this->assertEmpty($this->renderStack->getRecursionStorage(), 'getRecursionStorage() is empty() at the beginning.');
-    $this->renderStack->increaseRecursion();
-    $this->assertEmpty($this->renderStack->getRecursionStorage(), 'getRecursionStorage() is empty() at the beginning for level 1.');
-    $this->assertEquals(1, $this->renderStack->getRecursionLevel(), 'Recursion Level is 1 after increase.');
-    $this->renderStack->setRecursionStorage($recursion_storage_test_1_set);
-    $this->assertEquals($recursion_storage_test_1, $this->renderStack->getRecursionStorage(), 'getRecursionStorage() matches what was set.');
-    $this->renderStack->increaseRecursion();
-    $this->assertEmpty($this->renderStack->getRecursionStorage(), 'getRecursionStorage() is empty() at the beginning for level 2.');
-    $copy = $recursion_storage_test_2;
-    $this->renderStack->addRecursionStorage($copy, TRUE);
-    unset($copy['#attached']);
-    $this->assertEmpty($copy, 'addRecursionStorage() makes argument empty() after adding of storage (except for attached).');
-    $this->assertEquals($recursion_storage_test_2, $this->renderStack->getRecursionStorage(), 'getRecursionStorage() matches what was added.');
-    $storage = $this->renderStack->decreaseRecursion();
-    $this->assertEquals($recursion_storage_test_2, $storage, 'decreaseRecursion() matches what was added.');
-    $this->assertEquals($recursion_storage_test_1, $this->renderStack->getRecursionStorage(), 'getRecursionStorage() matches what was set.');
-    $this->renderStack->addRecursionStorage($storage, TRUE);
-    $storage2 = $this->renderStack->getRecursionStorage();
-    $storage = $this->renderStack->decreaseRecursion();
-    $this->assertEquals($recursion_storage_test_combined, $storage, 'decreaseRecursion() matches what was added combined.');
-    $this->assertEmpty($this->renderStack->getRecursionStorage(), 'getRecursionStorage() is empty() at the end.');
-  }
-
-  /**
-   * @covers ::supportsDynamicAssets()
-   */
-  public function test_supportsDynamicAssets() {
-    $this->assertFalse($this->renderStack->supportsDynamicAssets(), 'supportsDynamicAssets() is FALSE by default.');
-    $this->renderStack->supportsDynamicAssets(TRUE);
-    $this->assertTrue($this->renderStack->supportsDynamicAssets(), 'supportsDynamicAssets() is TRUE after set.');
-    $this->renderStack->supportsDynamicAssets(FALSE);
-    $this->assertFalse($this->renderStack->supportsDynamicAssets(), 'supportsDynamicAssets() is FALSE after set.');
-  }
-
-  /**
-   * @covers ::render()
-   */
-  public function test_render_common() {
-    $storage = array(
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-          'node:2',
-        ),
-        'max-age' => array(600),
-        'downstream-ttl' => array(300),
-      ),
-      '#attached' => array(
-        'library' => array(
-          array('foo', 'bar'),
-        ),
-        'js' => array(
-          'foo.js',
-        ),
-        'css' => array(
-          'foo.css',
-        ),
-      ),
-      '#post_render_cache' => array(
-        'test_post_render_cache' => array(),
-      ),
-    );
-    $render = array(
-      '#markup' => 'foo',
-      '#attached' => array(
-        'library' => array(
-          array('inner', 'baz'),
-        ),
-        'js' => array(
-          'baz.js',
-        ),
-      ),
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-        ),
-      ),
-      'bar' => array(
-        '#markup' => 'bar',
-       ),
-    );
-    $original_render_result = array(
-      '#markup' => 'foo',
-      '#printed' => TRUE,
-      'bar' => array(
-        '#markup' => 'bar',
-        '#printed' => TRUE,
-       ),
-      '#attached' => array(
-        'library' => array(
-          array('inner', 'baz'),
-        ),
-        'js' => array(
-          'baz.js',
-        ),
-      ),
-    );
-    $render_result = array(
-      '#markup' => 'foobar',
-      '#attached' => array(
-        'library' => array(
-          array('foo', 'bar'),
-          array('inner', 'baz'),
-        ),
-        'js' => array(
-          'foo.js',
-          'baz.js',
-        ),
-        'css' => array(
-          'foo.css',
-        ),
-      ),
-    ) + $storage;
-
-    return array($storage, $render, $original_render_result, $render_result);
-  }
-
-  /**
-   * @covers ::render()
-   * @depends test_render_common
-   */
-  public function test_render($args) {
-    list($storage, $render, $original_render_result, $render_result) = $args;
-
-    $this->renderStack
-      ->shouldReceive('collectAttached')
-      ->times(4)
-      ->andReturnUsing(array($this, 'helperCollectAttached'));
-
-    $stack = $this->renderStack;
-
-    $this->renderStack
-      ->shouldReceive('drupalRender')
-      ->with(Mockery::on(function(&$render) use ($stack) {
-          $render['#printed'] = TRUE;
-          $render['bar']['#printed'] = TRUE;
-
-          // This is called by drupal_render() normally.
-          if ($stack->supportsDynamicAssets()) {
-            $stack->drupal_process_attached($render);
-          }
-
-          // Store and remove recursive storage.
-          // for our properties.
-          $stack->addRecursionStorage($render);
-
-          return TRUE;
-        }))
-      ->once()
-      ->andReturn('foobar');
-
-    $render['x_render_cache_recursion_storage'] = $storage;
-    list($markup, $original) = $this->renderStack->render($render);
-    $this->assertEquals('foobar', $markup, 'Markup matches expected rendered data.');
-    $this->assertEquals($original_render_result, $original, 'Original render array matches expected rendered data.');
-    $this->assertEquals($render_result, $render, 'Render array matches expected rendered data.');
-  }
-
-  /**
-   * @covers ::render()
-   * @depends test_render_common
-   */
-  public function test_render_supportsDynamicAssets($args) {
-    list($storage, $render, $original_render_result, $render_result) = $args;
-
-    $this->renderStack
-      ->shouldReceive('collectAttached')
-      ->times(3)
-      ->andReturnUsing(array($this, 'helperCollectAttached'));
-
-    $stack = $this->renderStack;
-
-    $this->renderStack
-      ->shouldReceive('drupalRender')
-      ->with(Mockery::on(function(&$render) use ($stack) {
-          $render['#printed'] = TRUE;
-          $render['bar']['#printed'] = TRUE;
-
-          // This is called by drupal_render() normally.
-          if ($stack->supportsDynamicAssets()) {
-            $stack->drupal_process_attached($render);
-          }
-
-          // Store and remove recursive storage.
-          // for our properties.
-          $stack->addRecursionStorage($render);
-
-          return TRUE;
-        }))
-      ->once()
-      ->andReturn('foobar');
-
-    $this->renderStack->supportsDynamicAssets(TRUE);
-
-    $render['x_render_cache_recursion_storage'] = $storage;
-    list($markup, $original) = $this->renderStack->render($render);
-    $this->assertEquals('foobar', $markup, 'Markup matches expected rendered data.');
-    $this->assertEquals($original_render_result, $original, 'Original render array matches expected rendered data.');
-    $this->assertEquals($render_result, $render, 'Render array matches expected rendered data.');
-  }
-
-  /**
-   * @covers ::collectAndRemoveAssets()
-   */
-  public function test_collectAndRemoveAssets() {
-    $render = array();
-    $render[] = array(
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-        ),
-      ),
-    );
-    $render[] = array(
-      '#cache' => array(
-        'max-age' => 600,
-        'downstream-ttl' => 300,
-      ),
-    );
-    $render[] = array(
-      '#attached' => array(
-        'css' => 'test.css',
-      ),
-    );
-    $render[] = array(
-      '#post_render_cache' => array(
-        'test_post_render_cache' => array(),
-      ),
-    );
-    $render[] = array(
-      'child_1' => array(
-        '#markup' => 'foo',
-        '#cache' => array(
-          'tags' => array(
-            'node:2',
-          ),
-        ),
-      ),
-    );
-    $render_result = array();
-    $render_result[0] = array();
-    $render_result[1] = array();
-    $render_result[2] = array(
-      '#attached' => array(
-        'css' => 'test.css',
-      ),
-    );
-    $render_result[3] = array();
-    $render_result[4] = array(
-      'child_1' => array(
-        '#markup' => 'foo',
-      ),
-    );
-
-    $storage = array(
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-          'node:2',
-        ),
-        'max-age' => array(600),
-        'downstream-ttl' => array(300),
-      ),
-      '#post_render_cache' => array(
-        'test_post_render_cache' => array(),
-      ),
-    );
-
-    $this->assertEquals($storage, $this->renderStack->collectAndRemoveAssets($render), 'Collected assets match after collectAndRemoveAssets.');
-    $this->assertEquals($render_result, $render, 'Render array matches after collectAndRemoveAssets.');
-  }
-
-  /**
-   * @covers ::collectAndRemoveAssets()
-   */
-  public function test_collectAndRemoveAssets_empty() {
-    $render = array(
-      'child_1' => array(
-        '#markup' => 'foo'
-      ),
-    );
-    $render_result = $render;
-
-    $this->assertEmpty($this->renderStack->collectAndRemoveAssets($render), 'Collected assets match for empty case.');
-    $this->assertEquals($render_result, $render, 'Render is unchanged for empty case.');
-  }
-
-  /**
-   * @covers ::collectAndRemoveD8Properties()
-   */
-  public function test_collectAndRemoveD8Properties() {
-    $render = array(
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-        ),
-        'max-age' => 600,
-        'downstream-ttl' => 300,
-      ),
-      '#attached' => array(
-        'css' => 'test.css',
-      ),
-      '#post_render_cache' => array(
-        'test_post_render_cache' => array(),
-      ),
-      'child_1' => array(
-        '#markup' => 'foo',
-      ),
-    );
-    $render_result = $render;
-    unset($render_result['#attached']);
-    unset($render_result['child_1']);
-
-    $this->assertEquals($render_result, $this->renderStack->collectAndRemoveD8Properties($render));
-  }
-
-  /**
-   * Tests that RenderStack::convertRenderArrayToD7() is working properly.
-   * @covers ::convertRenderArrayToD7()
-   */
-  public function test_convertRenderArrayToD7() {
-    $render = array(
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-        ),
-        'max-age' => 600,
-      ),
-      '#attached' => array(
-        'css' => 'test.css',
-      ),
-      '#post_render_cache' => array(
-        'test_post_render_cache' => array(),
-      ),
-    );
-    $render_result = array(
-      '#attached' => array(
-        'css' => 'test.css',
-      ),
-    );
-    $render_result['#attached']['render_cache'] = array(
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-        ),
-        'max-age' => 600,
-      ),
-
-      '#post_render_cache' => array(
-        'test_post_render_cache' => array(),
-      ),
-    );
-
-    $this->assertEquals($render_result, $this->renderStack->convertRenderArrayToD7($render));
-  }
-
-  /**
-   * Tests that RenderStack::convertRenderArrayFromD7() is working properly.
-   * @covers ::convertRenderArrayFromD7()
-   */
-  public function test_convertRenderArrayFromD7() {
-    $render = array(
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-        ),
-        'max-age' => 600,
-      ),
-      '#attached' => array(
-        'css' => 'test.css',
-      ),
-      '#post_render_cache' => array(
-        'test_post_render_cache' => array(),
-      ),
-    );
-    $render_result = array(
-      '#attached' => array(
-        'css' => 'test.css',
-      ),
-    );
-    $render_result['#attached']['render_cache'] = array(
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-        ),
-        'max-age' => 600,
-      ),
-
-      '#post_render_cache' => array(
-        'test_post_render_cache' => array(),
-      ),
-    );
-
-    $this->assertEquals($render, $this->renderStack->convertRenderArrayFromD7($render_result));
-  }
-
-  /**
-   * @covers ::processPostRenderCache()
-   */
-  public function test_processPostRenderCache() {
-    $this->renderStack
-      ->shouldReceive('collectAttached')
-      ->twice()
-      ->andReturnUsing(array($this, 'helperCollectAttached'));
-
-    $cache_info = array(
-      'render_cache_cache_strategy' => \RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER,
-    );
-    $render = array(
-      '#markup' => 'bar',
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-        ),
-      ),
-      '#attached' => array(
-        'library' => array(
-          array('contextual', 'contextual-links'),
-        ),
-      ),
-    );
-
-    $render['#post_render_cache'] = array(
-      '\Drupal\render_cache\Tests\Cache\RenderStackTest::renderStackPostProcessTest' => array(array('bar', 'baz', FALSE, $this->renderStack)),
-    );
-
-    $result = array(
-      '#markup' => 'baz',
-      '#cache' => array(
-        'tags' => array(
-          'bar',
-          'node:1',
-        ),
-      ),
-      '#attached' => array(
-        'library' => array(
-          array('contextual', 'contextual-links'),
-          array('bar', 'baz'),
-          array('foo', 'baz'),
-        ),
-      ),
-    );
-
-    $this->renderStack->processPostRenderCache($render, $cache_info, 'Render matches when using normal post render cache.');
-    $this->assertEquals($result, $render);
-  }
-
-  /**
-   * @covers ::processPostRenderCache()
-   */
-  public function test_processPostRenderCache_recursive() {
-    $this->renderStack
-      ->shouldReceive('collectAttached')
-      ->times(4)
-      ->andReturnUsing(array($this, 'helperCollectAttached'));
-
-    $cache_info = array(
-      'render_cache_cache_strategy' => \RenderCache::RENDER_CACHE_STRATEGY_DIRECT_RENDER,
-    );
-
-    $render = array(
-      '#markup' => 'bar',
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-        ),
-      ),
-      '#attached' => array(
-        'library' => array(
-          array('contextual', 'contextual-links'),
-        ),
-      ),
-    );
-    $render['#post_render_cache'] = array(
-      '\Drupal\render_cache\Tests\Cache\RenderStackTest::renderStackPostProcessTest' => array(array('bar', 'baz', array('baz', 'foo', FALSE, $this->renderStack), $this->renderStack)),
-    );
-
-    $result = array(
-      '#markup' => 'foo',
-      '#cache' => array(
-        'tags' => array(
-          'bar',
-          'baz',
-          'node:1',
-        ),
-      ),
-      '#attached' => array(
-        'library' => array(
-          array('contextual', 'contextual-links'),
-          array('bar', 'baz'),
-          array('foo', 'baz'),
-          array('bar', 'foo'),
-          array('foo', 'foo'),
-        ),
-      ),
-    );
-
-    $this->renderStack->processPostRenderCache($render, $cache_info);
-    $this->assertEquals($result, $render, 'Render matches when using recursive post render cache.');
-  }
-
-  /**
-   * @covers ::processPostRenderCache()
-   */
-  public function test_processPostRenderCache_lateStrategy() {
-    $cache_info = array(
-      'render_cache_cache_strategy' => \RenderCache::RENDER_CACHE_STRATEGY_LATE_RENDER,
-    );
-
-    $render = array(
-      '#markup' => 'bar',
-      '#cache' => array(
-        'tags' => array(
-          'node:1',
-        ),
-      ),
-      '#attached' => array(
-        'library' => array(
-          array('contextual', 'contextual-links'),
-        ),
-      ),
-    );
-    $render['#post_render_cache'] = array(
-      '\Drupal\render_cache\Tests\Cache\RenderStackTest::renderStackPostProcessTest' => array(array('bar', 'baz', array('baz', 'foo', FALSE, $this->renderStack), $this->renderStack)),
-    );
-
-    $result = $render;
-
-    $this->renderStack->processPostRenderCache($render, $cache_info);
-    $this->assertEquals($result, $render, 'Render matches when using post_render_cache with late render strategy.');
-  }
-
-
-  /**
-   * @covers ::drupal_add_assets()
-   */
-  public function test_drupal_add_assets() {
-    $this->renderStack
-      ->shouldReceive('callOriginalFunction')
-      ->twice()
-      ->with('drupal_add_css', Mockery::any(), Mockery::any())
-      ->andReturn(NULL);
-
-    $this->renderStack
-      ->shouldReceive('callOriginalFunction')
-      ->twice()
-      ->with('drupal_add_js', Mockery::any(), Mockery::any())
-      ->andReturn(NULL);
-
-    $this->renderStack
-      ->shouldReceive('collectAttached')
-      ->times(4)
-      ->andReturnUsing(array($this, 'helperCollectAttached'));
-
-    $elements_found = array(
-      '#attached' => array(
-        'js' => array(
-          array(
-            'data' => 'foo.js',
-          ),
-          array(
-            'data' => array('bar' => 'baz'),
-            'type' => 'setting',
-          ),
-        ),
-        'css' => array(
-          array(
-            'data' => 'foo.css',
-          ),
-        ),
-
-      ),
-    );
-
-    $this->assertNull($this->renderStack->drupal_add_assets('js', 'foo.js'), 'Original function returns NULL and is called one time.');
-    $this->assertNull($this->renderStack->drupal_add_assets('css', 'foo.css'), 'Original function returns NULL and is called one time.');
-
-    $this->renderStack->increaseRecursion();
-    $this->assertNull($this->renderStack->drupal_add_assets('js', 'foo.js'), 'Original function returns NULL and is called one time.');
-    $this->assertNull($this->renderStack->drupal_add_assets('css', 'foo.css'), 'Original function returns NULL and is called one time.');
-    $this->assertNull($this->renderStack->drupal_add_assets('js', array('bar' => 'baz'), 'setting'), 'Original function returns NULL and is called one time.');
-    $storage = $this->renderStack->decreaseRecursion();
-    $this->assertEquals($elements_found, $storage, 'Storage matches what was pushed via drupal_add_assets.');
-
-    $this->assertNull($this->renderStack->drupal_add_assets('js', 'bar.js'), 'Original function returns NULL and is called one time.');
-    $this->assertNull($this->renderStack->drupal_add_assets('css', 'bar.css'), 'Original function returns NULL and is called one time.');
-  }
-
-  /**
-   * @covers ::drupal_add_library()
-   */
-  public function test_drupal_add_library() {
-    $this->renderStack
-      ->shouldReceive('callOriginalFunction')
-      ->twice()
-      ->andReturn(FALSE, TRUE);
-    $this->renderStack
-      ->shouldReceive('collectAttached')
-      ->twice()
-      ->andReturnUsing(array($this, 'helperCollectAttached'));
-
-    $elements_found = array(
-      '#attached' => array(
-        'library' => array(
-          array('contextual', 'contextual-links'),
-        ),
-      ),
-    );
-
-    $this->assertFalse($this->renderStack->drupal_add_library('not_exist', 'foo'), 'Original function returns FALSE and is called one time.');
-
-    $this->renderStack->increaseRecursion();
-    $this->assertTrue($this->renderStack->drupal_add_library('contextual', 'contextual-links'), 'Dynamic call path returns TRUE when found.');
-    // @todo Fix this test.
-    // $this->assertFalse($this->renderStack->drupal_add_library('not_exist', 'foo'), 'Dynamic call path returns FALSE when not found.');
-    $storage = $this->renderStack->decreaseRecursion();
-    $this->assertEquals($elements_found, $storage, 'Storage matches what was pushed via drupal_process_attached.');
-
-    $this->assertTrue($this->renderStack->drupal_process_attached('contextual', 'contextual-links'), 'Original function returns TRUE and is called one time.');
-  }
-
-  /**
-   * @covers ::drupal_process_attached()
-   */
-  public function test_drupal_process_attached() {
-    $this->renderStack
-      ->shouldReceive('callOriginalFunction')
-      ->twice()
-      ->andReturn(FALSE, TRUE);
-    $this->renderStack
-      ->shouldReceive('collectAttached')
-      ->twice()
-      ->andReturnUsing(array($this, 'helperCollectAttached'));
-
-    $elements_not_found = array(
-      '#attached' => array(
-        'library' => array('not_exist', 'foo'),
-      ),
-    );
-    $elements_found = array(
-      '#attached' => array(
-        'library' => array(
-          array('contextual', 'contextual-links'),
-        ),
-        'js' => array(
-          'foo.js',
-        ),
-        'css' => array(
-          'bar.css',
-        ),
-        'drupal_set_html_head' => array(
-          'X-Foo' => 'Baz',
-        ),
-      ),
-    );
-
-    $this->assertFalse($this->renderStack->drupal_process_attached($elements_not_found), 'Original function returns FALSE and is called one time.');
-
-    $this->renderStack->increaseRecursion();
-    $this->assertTrue($this->renderStack->drupal_process_attached($elements_found), 'Dynamic call path returns TRUE when found.');
-    // @todo Fix this test.
-    // $this->assertFalse($this->renderStack->drupal_process_attached($elements_not_found), 'Lazy function path returns FALSE when not found.');
-    $storage = $this->renderStack->decreaseRecursion();
-    $this->assertEquals($elements_found, $storage, 'Storage matches what was pushed via drupal_process_attached.');
-
-    $this->assertTrue($this->renderStack->drupal_process_attached($elements_found), 'Original function returns TRUE and is called one time.');
-  }
-
-  /**
-   * @covers ::callOriginalFunction()
-   */
-  public function test_callOriginalFunction() {
-    $this->renderStack->shouldDeferMissing();
-    $result = $this->renderStack->callOriginalFunction('\Drupal\render_cache\Tests\Cache\RenderStackTest::renderStackTest', 42, 23);
-    $this->assertEquals(42+23, $result);
-  }
-
-  /**
-   * Helper function to mock collect attached.
-   *
-   * @param array $render
-   *   The render array to process.
-   *
-   * @return array
-   *   The collected attachments.
-   */
-  public function helperCollectAttached(array $render) {
-    if (!empty($render[2]['#attached']) && empty($render[1]['#attached'])) {
-      return NestedArray::mergeDeep($render[0]['#attached'], $render[2]['#attached']);
-    }
-
-    if (!empty($render[2]['#attached'])) {
-      return NestedArray::mergeDeep($render[0]['#attached'], $render[1]['#attached'], $render[2]['#attached']);
-    }
-
-    if (!empty($render[1]['#attached']) && !empty($render[0]['#attached'])) {
-      return NestedArray::mergeDeep($render[0]['#attached'], $render[1]['#attached']);
-    }
-
-    if (!empty($render[1]['#attached'])) {
-      return $render[1]['#attached'];
-    }
-
-    if (!empty($render[0]['#attached'])) {
-      return $render[0]['#attached'];
-    }
-
-    if (!empty($render['#attached'])) {
-      return $render['#attached'];
-    }
-
-    return array();
-  }
-
-  /**
-   * A test callback function.
-   * @param int $somearg_1
-   * @param int $somearg_2
-   *
-   * @return int
-   */
-  public static function renderStackTest($somearg_1, $somearg_2) {
-    return $somearg_1 + $somearg_2;
-  }
-
-  /**
-   * Helper function to test #post_render_cache.
-   */
-  public static function renderStackPostProcessTest(array $element, array $context) {
-    $source = $context[0];
-    $dest = $context[1];
-    $prc = $context[2];
-    $stack = $context[3];
-
-    $element['#markup'] = str_replace($source, $dest, $element['#markup']);
-    $element['#cache']['tags'][] = $source;
-    $element['#attached']['library'][] = array('bar', $dest);
-    $stack->drupal_add_library('foo', $dest);
-
-    if (!empty($prc)) {
-      $element['#post_render_cache']['\Drupal\render_cache\Tests\Cache\RenderStackTest::renderStackPostProcessTest'][] = $prc;
-    }
-    return $element;
-  }
-
-}
diff --git a/tests/src/Plugin/BasePluginTest.php b/tests/src/Plugin/BasePluginTest.php
deleted file mode 100644
index b152b02..0000000
--- a/tests/src/Plugin/BasePluginTest.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\render_cache\Tests\Plugin\BasePluginTest
- */
-
-namespace Drupal\render_cache\Tests\Plugin;
-
-use Drupal\render_cache\Plugin\BasePlugin;
-
-use Mockery;
-
-/**
- * @coversDefaultClass \Drupal\render_cache\Plugin\BasePlugin
- * @group dic
- */
-class BasePluginTest extends \PHPUnit_Framework_TestCase {
- 
-  /**
-   * {@inheritdoc}
-   */
-  public function setUp() {
-    $this->basePlugin = new BasePlugin(array('name' => 'foo'));
-  }
-
-  /**
-   * Tests that BasePlugin::getType() works properly.
-   * @covers ::__construct()
-   * @covers ::getType()
-   */
-  public function test_getType() {
-    $this->assertEquals('foo', $this->basePlugin->getType());
-  }
-
-  /**
-   * Tests that BasePlugin::getPlugin() works properly.
-   * @covers ::getPlugin()
-   */
-  public function test_getPlugin() {
-    $this->assertEquals(array('name' => 'foo'), $this->basePlugin->getPlugin());
-  }
-}
diff --git a/tests/src/RenderCache/Controller/ControllerTest.php b/tests/src/RenderCache/Controller/ControllerTest.php
deleted file mode 100644
index d147592..0000000
--- a/tests/src/RenderCache/Controller/ControllerTest.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\render_cache\RenderCache\Controller\ControllerTest
- */
-
-namespace Drupal\render_cache\RenderCache\Controller;
-
-/**
- * Class Test
- * @covers Drupal\render_cache\RenderCache\Controller\BaseController
- */
-class ControllerTest extends \PHPUnit_Framework_TestCase {
-
-  /**
-   * Tests that the controller interface has a view method.
-   */
-  public function testControllerInterface() {
-    $mockController = $this->getMockBuilder('\Drupal\render_cache\RenderCache\Controller\ControllerInterface')
-      ->disableOriginalConstructor()
-      ->getMock();
-
-  $mockController->expects($this->any())
-      ->method('view')
-      ->will($this->returnValue('foo'));
-
-    $objects = array();
-    $this->assertEquals('foo', $mockController->view($objects));
-  }
-}
