diff --git a/core/includes/entity.inc b/core/includes/entity.inc
index 761e386..2859b59 100644
--- a/core/includes/entity.inc
+++ b/core/includes/entity.inc
@@ -14,6 +14,7 @@
  * Resets the cached information about entity types.
  */
 function entity_info_cache_clear() {
+  drupal_static_reset('entity_get_view_modes');
   // Clear all languages.
   \Drupal::entityManager()->clearCachedDefinitions();
   \Drupal::entityManager()->clearCachedFieldDefinitions();
@@ -82,45 +83,77 @@ function entity_invoke_bundle_hook($hook, $entity_type, $bundle, $bundle_new = N
 /**
  * Returns the entity form mode info.
  *
- * @param string|null $entity_type_id
+ * @param string|null $entity_type
  *   The entity type whose form mode info should be returned, or NULL for all
  *   form mode info. Defaults to NULL.
  *
  * @return array
  *   The form mode info for a specific entity type, or all entity types.
- *
- * @deprecated Use \Drupal::entityManager()->getFormModes() or
- *   \Drupal::entityManager()->getAllFormModes().
  */
-function entity_get_form_modes($entity_type_id = NULL) {
-  if (isset($entity_type_id)) {
-    return \Drupal::entityManager()->getFormModes($entity_type_id);
+function entity_get_form_modes($entity_type = NULL) {
+  $form_modes = &drupal_static(__FUNCTION__);
+  if (!$form_modes) {
+    $langcode = \Drupal::languageManager()->getCurrentLanguage()->id;
+    if ($cache = \Drupal::cache()->get("entity_form_mode_info:$langcode")) {
+      $form_modes = $cache->data;
+    }
+    else {
+      $form_modes = array();
+      foreach (entity_load_multiple('form_mode') as $form_mode) {
+        list($form_mode_entity_type, $form_mode_name) = explode('.', $form_mode->id(), 2);
+        $form_modes[$form_mode_entity_type][$form_mode_name] = (array) $form_mode;
+      }
+      \Drupal::moduleHandler()->alter('entity_form_mode_info', $form_modes);
+      \Drupal::cache()->set("entity_form_mode_info:$langcode", $form_modes, Cache::PERMANENT, array('entity_types' => TRUE));
+    }
   }
-  else {
-    return \Drupal::entityManager()->getAllFormModes();
+
+  if (empty($entity_type)) {
+    return $form_modes;
   }
+  elseif (isset($form_modes[$entity_type])) {
+    return $form_modes[$entity_type];
+  }
+
+  return array();
 }
 
 /**
  * Returns the entity view mode info.
  *
- * @param string|null $entity_type_id
+ * @param string|null $entity_type
  *   The entity type whose view mode info should be returned, or NULL for all
  *   view mode info. Defaults to NULL.
  *
  * @return array
  *   The view mode info for a specific entity type, or all entity types.
- *
- * @deprecated Use \Drupal::entityManager()->getViewModes() or
- *   \Drupal::entityManager()->getAllViewModes().
  */
-function entity_get_view_modes($entity_type_id = NULL) {
-  if (isset($entity_type_id)) {
-    return \Drupal::entityManager()->getViewModes($entity_type_id);
+function entity_get_view_modes($entity_type = NULL) {
+  $view_modes = &drupal_static(__FUNCTION__);
+  if (!$view_modes) {
+    $langcode = \Drupal::languageManager()->getCurrentLanguage()->id;
+    if ($cache = \Drupal::cache()->get("entity_view_mode_info:$langcode")) {
+      $view_modes = $cache->data;
+    }
+    else {
+      $view_modes = array();
+      foreach (entity_load_multiple('view_mode') as $view_mode) {
+        list($view_mode_entity_type, $view_mode_name) = explode('.', $view_mode->id(), 2);
+        $view_modes[$view_mode_entity_type][$view_mode_name] = (array) $view_mode;
+      }
+      \Drupal::moduleHandler()->alter('entity_view_mode_info', $view_modes);
+      \Drupal::cache()->set("entity_view_mode_info:$langcode", $view_modes, Cache::PERMANENT, array('entity_types' => TRUE));
+    }
   }
-  else {
-    return \Drupal::entityManager()->getAllViewModes();
+
+  if (empty($entity_type)) {
+    return $view_modes;
   }
+  elseif (isset($view_modes[$entity_type])) {
+    return $view_modes[$entity_type];
+  }
+
+  return array();
 }
 
 /**
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
index f69a52b..b7af02b 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
@@ -7,11 +7,9 @@
 
 namespace Drupal\Core\Config\Entity;
 
-use Drupal\Component\Utility\String;
 use Drupal\Core\Entity\Entity;
-use Drupal\Core\Config\ConfigDuplicateUUIDException;
 use Drupal\Core\Entity\EntityStorageControllerInterface;
-use Drupal\Core\Language\Language;
+use Drupal\Core\Config\ConfigDuplicateUUIDException;
 
 /**
  * Defines a base configuration entity class.
@@ -80,13 +78,6 @@
   protected $dependencies = array();
 
   /**
-   * The language code of the entity's default language.
-   *
-   * @var string
-   */
-  public $langcode = Language::LANGCODE_NOT_SPECIFIED;
-
-  /**
    * Overrides Entity::__construct().
    */
   public function __construct(array $values, $entity_type) {
@@ -148,8 +139,6 @@ public function set($property_name, $value) {
     }
 
     $this->{$property_name} = $value;
-
-    return $this;
   }
 
   /**
@@ -186,8 +175,6 @@ public function status() {
    */
   public function setSyncing($syncing) {
     $this->isSyncing = $syncing;
-
-    return $this;
   }
 
   /**
@@ -225,7 +212,7 @@ public function createDuplicate() {
   /**
    * Helper callback for uasort() to sort configuration entities by weight and label.
    */
-  public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
+  public static function sort($a, $b) {
     $a_weight = isset($a->weight) ? $a->weight : 0;
     $b_weight = isset($b->weight) ? $b->weight : 0;
     if ($a_weight == $b_weight) {
@@ -275,14 +262,14 @@ public function preSave(EntityStorageControllerInterface $storage_controller) {
       ->execute();
     $matched_entity = reset($matching_entities);
     if (!empty($matched_entity) && ($matched_entity != $this->id()) && $matched_entity != $this->getOriginalId()) {
-      throw new ConfigDuplicateUUIDException(String::format('Attempt to save a configuration entity %id with UUID %uuid when this UUID is already used for %matched', array('%id' => $this->id(), '%uuid' => $this->uuid(), '%matched' => $matched_entity)));
+      throw new ConfigDuplicateUUIDException(format_string('Attempt to save a configuration entity %id with UUID %uuid when this UUID is already used for %matched', array('%id' => $this->id(), '%uuid' => $this->uuid(), '%matched' => $matched_entity)));
     }
 
     if (!$this->isNew()) {
       $original = $storage_controller->loadUnchanged($this->id());
       // Ensure that the UUID cannot be changed for an existing entity.
       if ($original && ($original->uuid() != $this->uuid())) {
-        throw new ConfigDuplicateUUIDException(String::format('Attempt to save a configuration entity %id with UUID %uuid when this entity already exists with UUID %original_uuid', array('%id' => $this->id(), '%uuid' => $this->uuid(), '%original_uuid' => $original->uuid())));
+        throw new ConfigDuplicateUUIDException(format_string('Attempt to save a configuration entity %id with UUID %uuid when this entity already exists with UUID %original_uuid', array('%id' => $this->id(), '%uuid' => $this->uuid(), '%original_uuid' => $original->uuid())));
       }
     }
     if (!$this->isSyncing()) {
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
index 076af4d..20108aa 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
@@ -17,14 +17,16 @@
   /**
    * Enables the configuration entity.
    *
-   * @return $this
+   * @return \Drupal\Core\Config\Entity\ConfigEntityInterface
+   *   The configuration entity.
    */
   public function enable();
 
   /**
    * Disables the configuration entity.
    *
-   * @return $this
+   * @return \Drupal\Core\Config\Entity\ConfigEntityInterface
+   *   The configuration entity.
    */
   public function disable();
 
@@ -34,7 +36,8 @@ public function disable();
    * @param bool $status
    *   The status of the configuration entity.
    *
-   * @return $this
+   * @return \Drupal\Core\Config\Entity\ConfigEntityInterface
+   *   The class instance that this method is called on.
    */
   public function setStatus($status);
 
@@ -43,8 +46,6 @@ public function setStatus($status);
    *
    * @param bool $status
    *   The status of the sync flag.
-   *
-   * @return $this
    */
   public function setSyncing($status);
 
@@ -109,8 +110,6 @@ public function get($property_name);
    *   The name of the property that should be set.
    * @param mixed $value
    *   The value the property should be set to.
-   *
-   * @return $this
    */
   public function set($property_name, $value);
 
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
index c6ff65c..7afcb68 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
@@ -134,7 +134,7 @@
   public function __construct(array $values, $entity_type, $bundle = FALSE, $translations = array()) {
     $this->entityTypeId = $entity_type;
     $this->bundle = $bundle ? $bundle : $this->entityTypeId;
-    $this->languages = $this->languageManager()->getLanguages(Language::STATE_ALL);
+    $this->languages = language_list(Language::STATE_ALL);
 
     foreach ($values as $key => $value) {
       // If the key matches an existing property set the value to the property
@@ -157,15 +157,8 @@ public function __construct(array $values, $entity_type, $bundle = FALSE, $trans
         }
       }
     }
-  }
 
-  /**
-   * Returns the typed data manager.
-   *
-   * @return \Drupal\Core\TypedData\TypedDataManager
-   */
-  protected function typedDataManager() {
-    return \Drupal::typedDataManager();
+    $this->init();
   }
 
   /**
@@ -204,7 +197,8 @@ public function getRevisionId() {
    * {@inheritdoc}
    */
   public function isTranslatable() {
-    $bundles = $this->entityManager()->getBundleInfo($this->entityTypeId);
+    // @todo Inject the entity manager and retrieve bundle info from it.
+    $bundles = entity_get_bundles($this->entityTypeId);
     return !empty($bundles[$this->bundle()]['translatable']);
   }
 
@@ -247,14 +241,15 @@ public function setValue($value, $notify = TRUE) {
    * {@inheritdoc}
    */
   public function getString() {
-    return (string) $this->label();
+    return $this->label();
   }
 
   /**
    * {@inheritdoc}
    */
   public function validate() {
-    return $this->typedDataManager()->getValidator()->validate($this);
+    // @todo: Add the typed data manager as proper dependency.
+    return \Drupal::typedDataManager()->getValidator()->validate($this);
   }
 
   /**
@@ -310,6 +305,14 @@ public function setContext($name = NULL, TypedDataInterface $parent = NULL) {
   }
 
   /**
+   * Initialize the object. Invoked upon construction and wake up.
+   */
+  protected function init() {
+    // We unset all defined properties, so magic getters apply.
+    unset($this->langcode);
+  }
+
+  /**
    * Clear entity translation object cache to remove stale references.
    */
   protected function clearTranslationCache() {
@@ -332,7 +335,18 @@ public function __sleep() {
     $this->fieldDefinitions = NULL;
     $this->clearTranslationCache();
 
-    return parent::__sleep();
+    // Don't serialize the url generator.
+    $this->urlGenerator = NULL;
+
+    return array_keys(get_object_vars($this));
+  }
+
+
+  /**
+   * Magic __wakeup() implementation.
+   */
+  public function __wakeup() {
+    $this->init();
   }
 
   /**
@@ -381,7 +395,7 @@ public function get($property_name) {
   protected function getTranslatedField($name, $langcode) {
     if ($this->translations[$this->activeLangcode]['status'] == static::TRANSLATION_REMOVED) {
       $message = 'The entity object refers to a removed translation (@langcode) and cannot be manipulated.';
-      throw new \InvalidArgumentException(String::format($message, array('@langcode' => $this->activeLangcode)));
+      throw new \InvalidArgumentException(format_string($message, array('@langcode' => $this->activeLangcode)));
     }
     // Populate $this->fields to speed-up further look-ups and to keep track of
     // fields objects, possibly holding changes to field values.
@@ -505,13 +519,13 @@ public function isEmpty() {
   /**
    * {@inheritdoc}
    */
-  public function access($operation, AccountInterface $account = NULL) {
+  public function access($operation = 'view', AccountInterface $account = NULL) {
     if ($operation == 'create') {
-      return $this->entityManager()
+      return \Drupal::entityManager()
         ->getAccessController($this->entityTypeId)
         ->createAccess($this->bundle(), $account);
     }
-    return $this->entityManager()
+    return \Drupal::entityManager()
       ->getAccessController($this->entityTypeId)
       ->access($this, $operation, $this->activeLangcode, $account);
   }
@@ -523,7 +537,7 @@ public function language() {
     $language = NULL;
     if ($this->activeLangcode != Language::LANGCODE_DEFAULT) {
       if (!isset($this->languages[$this->activeLangcode])) {
-        $this->languages += $this->languageManager()->getLanguages(Language::STATE_ALL);
+        $this->languages += language_list(Language::STATE_ALL);
       }
       $language = $this->languages[$this->activeLangcode];
     }
@@ -573,7 +587,7 @@ public function onChange($name) {
     if ($name == 'langcode') {
       $this->setDefaultLangcode();
       if (isset($this->translations[$this->defaultLangcode])) {
-        $message = String::format('A translation already exists for the specified language (@langcode).', array('@langcode' => $this->defaultLangcode));
+        $message = format_string('A translation already exists for the specified language (@langcode).', array('@langcode' => $this->defaultLangcode));
         throw new \InvalidArgumentException($message);
       }
       $this->updateFieldLangcodes($this->defaultLangcode);
@@ -622,7 +636,7 @@ public function getTranslation($langcode) {
 
     if (empty($translation)) {
       $message = 'Invalid translation language (@langcode) specified.';
-      throw new \InvalidArgumentException(String::format($message, array('@langcode' => $langcode)));
+      throw new \InvalidArgumentException(format_string($message, array('@langcode' => $langcode)));
     }
 
     return $translation;
@@ -687,14 +701,14 @@ public function hasTranslation($langcode) {
   public function addTranslation($langcode, array $values = array()) {
     if (!isset($this->languages[$langcode]) || $this->hasTranslation($langcode)) {
       $message = 'Invalid translation language (@langcode) specified.';
-      throw new \InvalidArgumentException(String::format($message, array('@langcode' => $langcode)));
+      throw new \InvalidArgumentException(format_string($message, array('@langcode' => $langcode)));
     }
 
     // Instantiate a new empty entity so default values will be populated in the
     // specified language.
     $entity_type = $this->getEntityType();
     $default_values = array($entity_type->getKey('bundle') => $this->bundle, 'langcode' => $langcode);
-    $entity = $this->entityManager()
+    $entity = \Drupal::entityManager()
       ->getStorageController($this->getEntityTypeId())
       ->create($default_values);
 
@@ -732,7 +746,7 @@ public function removeTranslation($langcode) {
     }
     else {
       $message = 'The specified translation (@langcode) cannot be removed.';
-      throw new \InvalidArgumentException(String::format($message, array('@langcode' => $langcode)));
+      throw new \InvalidArgumentException(format_string($message, array('@langcode' => $langcode)));
     }
   }
 
@@ -874,7 +888,7 @@ public function __unset($name) {
   public function createDuplicate() {
     if ($this->translations[$this->activeLangcode]['status'] == static::TRANSLATION_REMOVED) {
       $message = 'The entity object refers to a removed translation (@langcode) and cannot be manipulated.';
-      throw new \InvalidArgumentException(String::format($message, array('@langcode' => $this->activeLangcode)));
+      throw new \InvalidArgumentException(format_string($message, array('@langcode' => $this->activeLangcode)));
     }
 
     $duplicate = clone $this;
@@ -883,7 +897,8 @@ public function createDuplicate() {
 
     // Check if the entity type supports UUIDs and generate a new one if so.
     if ($entity_type->hasKey('uuid')) {
-      $duplicate->{$entity_type->getKey('uuid')}->value = $this->uuidGenerator()->generate();
+      // @todo Inject the UUID service into the Entity class once possible.
+      $duplicate->{$entity_type->getKey('uuid')}->value = \Drupal::service('uuid')->generate();
     }
 
     // Check whether the entity type supports revisions and initialize it if so.
@@ -931,8 +946,9 @@ public function __clone() {
   public function label() {
     $label = NULL;
     $entity_type = $this->getEntityType();
-    if (($label_callback = $entity_type->getLabelCallback()) && is_callable($label_callback)) {
-      $label = call_user_func($label_callback, $this);
+    // @todo Convert to is_callable() and call_user_func().
+    if (($label_callback = $entity_type->getLabelCallback()) && function_exists($label_callback)) {
+      $label = $label_callback($this);
     }
     elseif (($label_key = $entity_type->getKey('label')) && isset($this->{$label_key})) {
       $label = $this->{$label_key}->value;
diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php
index e76a7d0..7e60eb7 100644
--- a/core/lib/Drupal/Core/Entity/Entity.php
+++ b/core/lib/Drupal/Core/Entity/Entity.php
@@ -7,14 +7,20 @@
 
 namespace Drupal\Core\Entity;
 
-use Drupal\Core\DependencyInjection\DependencySerialization;
 use Drupal\Core\Language\Language;
 use Drupal\Core\Session\AccountInterface;
 
 /**
  * Defines a base entity class.
  */
-abstract class Entity extends DependencySerialization implements EntityInterface {
+abstract class Entity implements EntityInterface {
+
+  /**
+   * The language code of the entity's default language.
+   *
+   * @var string
+   */
+  public $langcode = Language::LANGCODE_NOT_SPECIFIED;
 
   /**
    * The entity type.
@@ -55,33 +61,6 @@ public function __construct(array $values, $entity_type) {
   }
 
   /**
-   * Returns the entity manager.
-   *
-   * @return \Drupal\Core\Entity\EntityManagerInterface
-   */
-  protected function entityManager() {
-    return \Drupal::entityManager();
-  }
-
-  /**
-   * Returns the language manager.
-   *
-   * @return \Drupal\Core\Language\LanguageManagerInterface
-   */
-  protected function languageManager() {
-    return \Drupal::languageManager();
-  }
-
-  /**
-   * Returns the UUID generator.
-   *
-   * @return \Drupal\Component\Uuid\UuidInterface
-   */
-  protected function uuidGenerator() {
-    return \Drupal::service('uuid');
-  }
-
-  /**
    * {@inheritdoc}
    */
   public function id() {
@@ -107,8 +86,6 @@ public function isNew() {
    */
   public function enforceIsNew($value = TRUE) {
     $this->enforceIsNew = $value;
-
-    return $this;
   }
 
   /**
@@ -131,8 +108,9 @@ public function bundle() {
   public function label() {
     $label = NULL;
     $entity_type = $this->getEntityType();
-    if (($label_callback = $entity_type->getLabelCallback()) && is_callable($label_callback)) {
-      $label = call_user_func($label_callback, $this);
+    // @todo Convert to is_callable() and call_user_func().
+    if (($label_callback = $entity_type->getLabelCallback()) && function_exists($label_callback)) {
+      $label = $label_callback($this);
     }
     elseif (($label_key = $entity_type->getKey('label')) && isset($this->{$label_key})) {
       $label = $this->{$label_key};
@@ -160,7 +138,7 @@ public function urlInfo($rel = 'canonical') {
       $bundle = $this->bundle();
       // A bundle-specific callback takes precedence over the generic one for
       // the entity type.
-      $bundles = $this->entityManager()->getBundleInfo($this->getEntityTypeId());
+      $bundles = \Drupal::entityManager()->getBundleInfo($this->getEntityTypeId());
       if (isset($bundles[$bundle]['uri_callback'])) {
         $uri_callback = $bundles[$bundle]['uri_callback'];
       }
@@ -170,8 +148,9 @@ public function urlInfo($rel = 'canonical') {
 
       // Invoke the callback to get the URI. If there is no callback, use the
       // default URI format.
-      if (isset($uri_callback) && is_callable($uri_callback)) {
-        $uri = call_user_func($uri_callback, $this);
+      // @todo Convert to is_callable() and call_user_func().
+      if (isset($uri_callback) && function_exists($uri_callback)) {
+        $uri = $uri_callback($this);
       }
       else {
         return array();
@@ -268,13 +247,13 @@ public function uriRelationships() {
   /**
    * {@inheritdoc}
    */
-  public function access($operation, AccountInterface $account = NULL) {
+  public function access($operation = 'view', AccountInterface $account = NULL) {
     if ($operation == 'create') {
-      return $this->entityManager()
+      return \Drupal::entityManager()
         ->getAccessController($this->entityTypeId)
         ->createAccess($this->bundle(), $account);
     }
-    return $this->entityManager()
+    return \Drupal::entityManager()
       ->getAccessController($this->entityTypeId)
       ->access($this, $operation, Language::LANGCODE_DEFAULT, $account);
   }
@@ -283,7 +262,7 @@ public function access($operation, AccountInterface $account = NULL) {
    * {@inheritdoc}
    */
   public function language() {
-    $language = $this->languageManager()->getLanguage($this->langcode);
+    $language = language_load($this->langcode);
     if (!$language) {
       // Make sure we return a proper language object.
       $language = new Language(array('id' => Language::LANGCODE_NOT_SPECIFIED));
@@ -295,7 +274,7 @@ public function language() {
    * {@inheritdoc}
    */
   public function save() {
-    return $this->entityManager()->getStorageController($this->entityTypeId)->save($this);
+    return \Drupal::entityManager()->getStorageController($this->entityTypeId)->save($this);
   }
 
   /**
@@ -303,7 +282,7 @@ public function save() {
    */
   public function delete() {
     if (!$this->isNew()) {
-      $this->entityManager()->getStorageController($this->entityTypeId)->delete(array($this->id() => $this));
+      \Drupal::entityManager()->getStorageController($this->entityTypeId)->delete(array($this->id() => $this));
     }
   }
 
@@ -317,7 +296,8 @@ public function createDuplicate() {
 
     // Check if the entity type supports UUIDs and generate a new one if so.
     if ($entity_type->hasKey('uuid')) {
-      $duplicate->{$entity_type->getKey('uuid')} = $this->uuidGenerator()->generate();
+      // @todo Inject the UUID service into the Entity class once possible.
+      $duplicate->{$entity_type->getKey('uuid')} = \Drupal::service('uuid')->generate();
     }
     return $duplicate;
   }
@@ -326,7 +306,7 @@ public function createDuplicate() {
    * {@inheritdoc}
    */
   public function getEntityType() {
-    return $this->entityManager()->getDefinition($this->getEntityTypeId());
+    return \Drupal::entityManager()->getDefinition($this->getEntityTypeId());
   }
 
   /**
@@ -398,8 +378,8 @@ protected function onSaveOrDelete() {
     }
 
     foreach ($referenced_entities as $entity_type => $entities) {
-      if ($this->entityManager()->hasController($entity_type, 'view_builder')) {
-        $this->entityManager()->getViewBuilder($entity_type)->resetCache($entities);
+      if (\Drupal::entityManager()->hasController($entity_type, 'view_builder')) {
+        \Drupal::entityManager()->getViewBuilder($entity_type)->resetCache($entities);
       }
     }
   }
@@ -435,6 +415,16 @@ protected function urlGenerator() {
   /**
    * {@inheritdoc}
    */
+  public function __sleep() {
+    // Don't serialize the url generator.
+    $this->urlGenerator = NULL;
+
+    return array_keys(get_object_vars($this));
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function getOriginalId() {
     // By default, entities do not support renames and do not have original IDs.
     return NULL;
diff --git a/core/lib/Drupal/Core/Entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php
index d083aa5..9fba85f 100644
--- a/core/lib/Drupal/Core/Entity/EntityInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityInterface.php
@@ -65,8 +65,6 @@ public function isNew();
    *   (optional) Whether the entity should be forced to be new. Defaults to
    *   TRUE.
    *
-   * @return self
-   *
    * @see \Drupal\Core\Entity\EntityInterface::isNew()
    */
   public function enforceIsNew($value = TRUE);
diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index 5300dc8..4e8a190 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -115,13 +115,6 @@ class EntityManager extends PluginManagerBase implements EntityManagerInterface
   protected $bundleInfo;
 
   /**
-   * Static cache of display modes information.
-   *
-   * @var array
-   */
-  protected $displayModeInfo = array();
-
-  /**
    * Constructs a new Entity plugin manager.
    *
    * @param \Traversable $namespaces
@@ -162,7 +155,6 @@ public function clearCachedDefinitions() {
     parent::clearCachedDefinitions();
 
     $this->bundleInfo = NULL;
-    $this->displayModeInfo = array();
   }
 
   /**
@@ -336,33 +328,11 @@ protected function buildBaseFieldDefinitions($entity_type_id) {
     $entity_type = $this->getDefinition($entity_type_id);
     $class = $entity_type->getClass();
 
-    // Retrieve base field definitions and assign them the entity type provider.
     $base_field_definitions = $class::baseFieldDefinitions($entity_type);
-    $provider = $entity_type->getProvider();
-    foreach ($base_field_definitions as $definition) {
-      // @todo Remove this check one FieldDefinitionInterface exposes a proper
-      //   provider setter. See https://drupal.org/node/2225961.
-      if ($definition instanceof FieldDefinition) {
-        $definition->setProvider($provider);
-      }
-    }
 
-    // Retrieve base field definitions from modules.
-    foreach ($this->moduleHandler->getImplementations('entity_base_field_info') as $module) {
-      $module_definitions = $this->moduleHandler->invoke($module, 'entity_base_field_info', array($entity_type));
-      if (!empty($module_definitions)) {
-        // Ensure the provider key actually matches the name of the provider
-        // defining the field.
-        foreach ($module_definitions as $field_name => $definition) {
-          // @todo Remove this check one FieldDefinitionInterface exposes a
-          //   proper provider setter. See https://drupal.org/node/2225961.
-          if ($definition instanceof FieldDefinition) {
-            $definition->setProvider($module);
-          }
-          $base_field_definitions[$field_name] = $definition;
-        }
-      }
-    }
+    // Invoke hook.
+    $result = $this->moduleHandler->invokeAll('entity_base_field_info', array($entity_type));
+    $base_field_definitions = NestedArray::mergeDeep($base_field_definitions, $result);
 
     // Automatically set the field name for non-configurable fields.
     foreach ($base_field_definitions as $field_name => $base_field_definition) {
@@ -435,31 +405,10 @@ protected function buildBundleFieldDefinitions($entity_type_id, $bundle, array $
 
     // Allow the entity class to override the base fields.
     $bundle_field_definitions = $class::bundleFieldDefinitions($entity_type, $bundle, $base_field_definitions);
-    $provider = $entity_type->getProvider();
-    foreach ($bundle_field_definitions as $definition) {
-      // @todo Remove this check one FieldDefinitionInterface exposes a proper
-      //   provider setter. See https://drupal.org/node/2225961.
-      if ($definition instanceof FieldDefinition) {
-        $definition->setProvider($provider);
-      }
-    }
 
-    // Retrieve base field definitions from modules.
-    foreach ($this->moduleHandler->getImplementations('entity_bundle_field_info') as $module) {
-      $module_definitions = $this->moduleHandler->invoke($module, 'entity_bundle_field_info', array($entity_type, $bundle, $base_field_definitions));
-      if (!empty($module_definitions)) {
-        // Ensure the provider key actually matches the name of the provider
-        // defining the field.
-        foreach ($module_definitions as $field_name => $definition) {
-          // @todo Remove this check one FieldDefinitionInterface exposes a
-          //   proper provider setter. See https://drupal.org/node/2225961.
-          if ($definition instanceof FieldDefinition) {
-            $definition->setProvider($module);
-          }
-          $bundle_field_definitions[$field_name] = $definition;
-        }
-      }
-    }
+    // Invoke 'per bundle' hook.
+    $result = $this->moduleHandler->invokeAll('entity_bundle_field_info', array($entity_type, $bundle, $base_field_definitions));
+    $bundle_field_definitions = NestedArray::mergeDeep($bundle_field_definitions, $result);
 
     // Automatically set the field name for non-configurable fields.
     foreach ($bundle_field_definitions as $field_name => $field_definition) {
@@ -562,123 +511,4 @@ public function getTranslationFromContext(EntityInterface $entity, $langcode = N
     return $translation;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function getAllViewModes() {
-    return $this->getAllDisplayModesByEntityType('view_mode');
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getViewModes($entity_type_id) {
-    return $this->getDisplayModesByEntityType('view_mode', $entity_type_id);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getAllFormModes() {
-    return $this->getAllDisplayModesByEntityType('form_mode');
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getFormModes($entity_type_id) {
-    return $this->getDisplayModesByEntityType('form_mode', $entity_type_id);
-  }
-
-  /**
-   * Returns the entity display mode info for all entity types.
-   *
-   * @param string $display_type
-   *   The display type to be retrieved. It can be "view_mode" or "form_mode".
-   *
-   * @return array
-   *   The display mode info for all entity types.
-   */
-  protected function getAllDisplayModesByEntityType($display_type) {
-    if (!isset($this->displayModeInfo[$display_type])) {
-      $key = 'entity_' . $display_type . '_info';
-      $langcode = $this->languageManager->getCurrentLanguage(Language::TYPE_INTERFACE)->id;
-      if ($cache = $this->cache->get("$key:$langcode")) {
-        $this->displayModeInfo[$display_type] = $cache->data;
-      }
-      else {
-        $this->displayModeInfo[$display_type] = array();
-        foreach ($this->getStorageController($display_type)->loadMultiple() as $display_mode) {
-          list($display_mode_entity_type, $display_mode_name) = explode('.', $display_mode->id(), 2);
-          $this->displayModeInfo[$display_type][$display_mode_entity_type][$display_mode_name] = (array) $display_mode;
-        }
-        $this->moduleHandler->alter($key, $this->displayModeInfo[$display_type]);
-        $this->cache->set("$key:$langcode", $this->displayModeInfo[$display_type], CacheBackendInterface::CACHE_PERMANENT, array('entity_types' => TRUE));
-      }
-    }
-
-    return $this->displayModeInfo[$display_type];
-  }
-
-  /**
-   * Returns the entity display mode info for a specific entity type.
-   *
-   * @param string $display_type
-   *   The display type to be retrieved. It can be "view_mode" or "form_mode".
-   * @param string $entity_type_id
-   *   The entity type whose display mode info should be returned.
-   *
-   * @return array
-   *   The display mode info for a specific entity type.
-   */
-  protected function getDisplayModesByEntityType($display_type, $entity_type_id) {
-    if (isset($this->displayModeInfo[$display_type][$entity_type_id])) {
-      return $this->displayModeInfo[$display_type][$entity_type_id];
-    }
-    else {
-      $display_modes = $this->getAllDisplayModesByEntityType($display_type);
-      if (isset($display_modes[$entity_type_id])) {
-        return $display_modes[$entity_type_id];
-      }
-    }
-    return array();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getViewModeOptions($entity_type, $include_disabled = FALSE) {
-    return $this->getDisplayModeOptions('view_mode', $entity_type, $include_disabled);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getFormModeOptions($entity_type, $include_disabled = FALSE) {
-    return $this->getDisplayModeOptions('form_mode', $entity_type, $include_disabled);
-  }
-
-  /**
-   * Returns an array of display mode options.
-   *
-   * @param string $display_type
-   *   The display type to be retrieved. It can be "view_mode" or "form_mode".
-   * @param string $entity_type_id
-   *   The entity type whose display mode options should be returned.
-   * @param bool $include_disabled
-   *   Force to include disabled display modes. Defaults to FALSE.
-   *
-   * @return array
-   *   An array of display mode labels, keyed by the display mode ID.
-   */
-  protected function getDisplayModeOptions($display_type, $entity_type_id, $include_disabled = FALSE) {
-    $options = array('default' => t('Default'));
-    foreach ($this->getDisplayModesByEntityType($display_type, $entity_type_id) as $mode => $settings) {
-      if (!empty($settings['status']) || $include_disabled) {
-        $options[$mode] = $settings['label'];
-      }
-    }
-    return $options;
-  }
-
 }
diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
index bb8e0d9..9a65866 100644
--- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
@@ -235,68 +235,4 @@ public function getDefinition($entity_type_id, $exception_on_invalid = FALSE);
    */
   public function getDefinitions();
 
-  /**
-   * Returns the entity view mode info for all entity types.
-   *
-   * @return array
-   *   The view mode info for all entity types.
-   */
-  public function getAllViewModes();
-
-  /**
-   * Returns the entity view mode info for a specific entity type.
-   *
-   * @param string $entity_type_id
-   *   The entity type whose view mode info should be returned.
-   *
-   * @return array
-   *   The view mode info for a specific entity type.
-   */
-  public function getViewModes($entity_type_id);
-
-  /**
-   * Returns the entity form mode info for all entity types.
-   *
-   * @return array
-   *   The form mode info for all entity types.
-   */
-  public function getAllFormModes();
-
-  /**
-   * Returns the entity form mode info for a specific entity type.
-   *
-   * @param string $entity_type_id
-   *   The entity type whose form mode info should be returned.
-   *
-   * @return array
-   *   The form mode info for a specific entity type.
-   */
-  public function getFormModes($entity_type_id);
-
-  /**
-   * Returns an array of view mode options.
-   *
-   * @param string $entity_type_id
-   *   The entity type whose view mode options should be returned.
-   * @param bool $include_disabled
-   *   Force to include disabled view modes. Defaults to FALSE.
-   *
-   * @return array
-   *   An array of view mode labels, keyed by the display mode ID.
-   */
-  public function getViewModeOptions($entity_type_id, $include_disabled = FALSE);
-
-  /**
-   * Returns an array of form mode options.
-   *
-   * @param string $entity_type_id
-   *   The entity type whose form mode options should be returned.
-   * @param bool $include_disabled
-   *   Force to include disabled form modes. Defaults to FALSE.
-   *
-   * @return array
-   *   An array of form mode labels, keyed by the display mode ID.
-   */
-  public function getFormModeOptions($entity_type_id, $include_disabled = FALSE);
-
 }
diff --git a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
index b4c72a4..46d45fb 100644
--- a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
+++ b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php
@@ -360,7 +360,7 @@ protected function isViewModeCacheable($view_mode) {
       // The 'default' is not an actual view mode.
       return TRUE;
     }
-    $view_modes_info = $this->entityManager->getViewModes($this->entityTypeId);
+    $view_modes_info = entity_get_view_modes($this->entityTypeId);
     return !empty($view_modes_info[$view_mode]['cache']);
   }
 
diff --git a/core/lib/Drupal/Core/Field/FieldDefinition.php b/core/lib/Drupal/Core/Field/FieldDefinition.php
index 27e84cc..b5a2c10 100644
--- a/core/lib/Drupal/Core/Field/FieldDefinition.php
+++ b/core/lib/Drupal/Core/Field/FieldDefinition.php
@@ -151,26 +151,6 @@ public function setSetting($setting_name, $value) {
   /**
    * {@inheritdoc}
    */
-  public function getProvider() {
-    return $this->definition['provider'];
-  }
-
-  /**
-   * Sets the name of the provider of this field.
-   *
-   * @param string $provider
-   *   The provider name to set.
-   *
-   * @return $this
-   */
-  public function setProvider($provider) {
-    $this->definition['provider'] = $provider;
-    return $this;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
   public function isTranslatable() {
     return !empty($this->definition['translatable']);
   }
@@ -487,25 +467,4 @@ public static function getReservedColumns() {
     return array('deleted');
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function hasCustomStorage() {
-    return !empty($this->definition['custom_storage']);
-  }
-
-  /**
-   * Sets the storage behavior for this field.
-   *
-   * @param bool $custom_storage
-   *   Pass FALSE if the storage controller takes care of storing the field,
-   *   TRUE otherwise.
-   *
-   * @return $this
-   */
-  public function setCustomStorage($custom_storage) {
-    $this->definition['custom_storage'] = $custom_storage;
-    return $this;
-  }
-
 }
diff --git a/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php b/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php
index 94eb207..1a89c64 100644
--- a/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php
+++ b/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php
@@ -104,14 +104,6 @@ public function getSettings();
   public function getSetting($setting_name);
 
   /**
-   * Returns the name of the provider of this field.
-   *
-   * @return string
-   *   The provider name; e.g., the module name.
-   */
-  public function getProvider();
-
-  /**
    * Returns whether the field is translatable.
    *
    * @return bool
@@ -344,17 +336,4 @@ public function getSchema();
    */
   public function getColumns();
 
-  /**
-   * Returns the storage behavior for this field.
-   *
-   * Indicates whether the entity type's storage controller should take care of
-   * storing the field values or whether it is handled separately; e.g. by the
-   * module providing the field.
-   *
-   * @return bool
-   *   FALSE if the storage controller takes care of storing the field, TRUE
-   *   otherwise.
-   */
-  public function hasCustomStorage();
-
 }
diff --git a/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php b/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php
index 39ed9ce..88e19f6 100644
--- a/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php
+++ b/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php
@@ -63,7 +63,7 @@ public function set($property_name, $value, $notify = TRUE);
    * @param bool $include_computed
    *   If set to TRUE, computed properties are included. Defaults to FALSE.
    *
-   * @return \Drupal\Core\TypedData\TypedDataInterface[]
+   * @return array
    *   An array of property objects implementing the TypedDataInterface, keyed
    *   by property name.
    */
diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index c217c9f..c21e884 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -171,7 +171,7 @@ function block_get_blocks_by_region($region) {
   $build = array();
   if ($list = block_list($region)) {
     foreach ($list as $key => $block) {
-      if ($block->access('view')) {
+      if ($block->access()) {
         $build[$key] = entity_view($block, 'block');
       }
     }
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
index e05089e..dab9b26 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
@@ -8,8 +8,6 @@
 namespace Drupal\custom_block\Plugin\Block;
 
 use Drupal\block\BlockBase;
-use Drupal\Core\Entity\EntityManager;
-use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Session\AccountInterface;
@@ -36,13 +34,6 @@ class CustomBlockBlock extends BlockBase implements ContainerFactoryPluginInterf
   protected $blockManager;
 
   /**
-   * The entity manager service.
-   *
-   * @var \Drupal\Core\Entity\EntityManagerInterface
-   */
-  protected $entityManager;
-
-  /**
    * The Module Handler.
    *
    * @var \Drupal\Core\Extension\ModuleHandlerInterface.
@@ -67,18 +58,15 @@ class CustomBlockBlock extends BlockBase implements ContainerFactoryPluginInterf
    *   The plugin implementation definition.
    * @param \Drupal\block\Plugin\Type\BlockManager
    *   The Plugin Block Manager.
-   * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
-   *   The entity manager service.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface
    *   The Module Handler.
    * @param \Drupal\Core\Session\AccountInterface $account
    *   The account for which view access should be checked.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, BlockManager $block_manager, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, AccountInterface $account) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, BlockManager $block_manager, ModuleHandlerInterface $module_handler, AccountInterface $account) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 
     $this->blockManager = $block_manager;
-    $this->entityManager = $entity_manager;
     $this->moduleHandler = $module_handler;
     $this->account = $account;
   }
@@ -92,7 +80,6 @@ public static function create(ContainerInterface $container, array $configuratio
       $plugin_id,
       $plugin_definition,
       $container->get('plugin.manager.block'),
-      $container->get('entity.manager'),
       $container->get('module_handler'),
       $container->get('current_user')
     );
@@ -121,9 +108,14 @@ public function defaultConfiguration() {
    * Adds body and description fields to the block configuration form.
    */
   public function blockForm($form, &$form_state) {
+    $options = array('default' => t('Default'));
+    $view_modes = entity_get_view_modes('custom_block');
+    foreach ($view_modes as $view_mode => $detail) {
+      $options[$view_mode] = $detail['label'];
+    }
     $form['custom_block']['view_mode'] = array(
       '#type' => 'select',
-      '#options' => $this->entityManager->getViewModeOptions('custom_block'),
+      '#options' => $options,
       '#title' => t('View mode'),
       '#description' => t('Output the block in this view mode.'),
       '#default_value' => $this->configuration['view_mode']
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockCreationTest.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockCreationTest.php
index 4111596..dd349b8 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockCreationTest.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockCreationTest.php
@@ -80,6 +80,7 @@ public function testCustomBlockCreation() {
 
     // Test the available view mode options.
     $this->assertOption('edit-settings-custom-block-view-mode', 'default', 'The default view mode is available.');
+    $this->assertOption('edit-settings-custom-block-view-mode', 'full', 'The full view mode is available.');
 
     // Check that the block exists in the database.
     $blocks = entity_load_multiple_by_properties('custom_block', array('info' => $edit['info']));
diff --git a/core/modules/block/lib/Drupal/block/Entity/Block.php b/core/modules/block/lib/Drupal/block/Entity/Block.php
index 94fe675..6caab04 100644
--- a/core/modules/block/lib/Drupal/block/Entity/Block.php
+++ b/core/modules/block/lib/Drupal/block/Entity/Block.php
@@ -11,7 +11,6 @@
 use Drupal\Core\Config\Entity\ConfigEntityBase;
 use Drupal\block\BlockPluginBag;
 use Drupal\block\BlockInterface;
-use Drupal\Core\Config\Entity\ConfigEntityInterface;
 use Drupal\Core\Config\Entity\EntityWithPluginBagInterface;
 use Drupal\Core\Entity\EntityStorageControllerInterface;
 
@@ -177,7 +176,7 @@ public static function postDelete(EntityStorageControllerInterface $storage_cont
   /**
    * Sorts active blocks by weight; sorts inactive blocks by name.
    */
-  public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
+  public static function sort($a, $b) {
     // Separate enabled from disabled.
     $status = $b->get('status') - $a->get('status');
     if ($status) {
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php
index 91fc249..063738c 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php
@@ -74,7 +74,7 @@ public function preRender($result) {
    * in views_plugin_row_comment|node_rss.inc
    */
   function options_form_summary_options() {
-    $view_modes = \Drupal::entityManager()->getViewModes('node');
+    $view_modes = entity_get_view_modes('node');
     $options = array();
     foreach ($view_modes as $mode => $settings) {
       $options[$mode] = $settings['label'];
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php
index 7ec5e86..55ded74 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php
@@ -97,4 +97,14 @@ public function testStorageControllerMethods() {
     }
   }
 
+  /**
+   * Tests getOriginalId() and setOriginalId().
+   */
+  protected function testGetOriginalId() {
+    $entity = $this->storage->create(array());
+    $id = $this->randomName();
+    $this->assertIdentical(spl_object_hash($entity->setOriginalId($id)), spl_object_hash($entity));
+    $this->assertIdentical($entity->getOriginalId(), $id);
+  }
+
 }
diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php
index b8d2c56..336afb8 100644
--- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php
+++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php
@@ -9,7 +9,6 @@
 
 use Drupal\Core\Config\Entity\ConfigEntityBase;
 use Drupal\config_test\ConfigTestInterface;
-use Drupal\Core\Config\Entity\ConfigEntityInterface;
 
 /**
  * Defines the ConfigTest configuration entity.
@@ -101,7 +100,7 @@ public function toArray() {
   /**
    * Overrides \Drupal\Core\Config\Entity\ConfigEntityBase::sort().
    */
-  public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
+  public static function sort($a, $b) {
     \Drupal::state()->set('config_entity_sort', TRUE);
     return parent::sort($a, $b);
   }
diff --git a/core/modules/edit/lib/Drupal/edit/EditController.php b/core/modules/edit/lib/Drupal/edit/EditController.php
index a086d93..e5d3a87 100644
--- a/core/modules/edit/lib/Drupal/edit/EditController.php
+++ b/core/modules/edit/lib/Drupal/edit/EditController.php
@@ -265,7 +265,7 @@ public function fieldForm(EntityInterface $entity, $field_name, $langcode, $view
    * @see hook_edit_render_field()
    */
   protected function renderField(EntityInterface $entity, $field_name, $langcode, $view_mode_id) {
-    $entity_view_mode_ids = array_keys($this->entityManager()->getViewModes($entity->getEntityTypeId()));
+    $entity_view_mode_ids = array_keys(entity_get_view_modes($entity->getEntityTypeId()));
     if (in_array($view_mode_id, $entity_view_mode_ids)) {
       $entity = \Drupal::entityManager()->getTranslationFromContext($entity, $langcode);
       $output = $entity->get($field_name)->view($view_mode_id);
diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php
index b9e8fcb..4e58485 100644
--- a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php
+++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php
@@ -24,14 +24,14 @@
  * display settings, or just replicate the settings of the 'default' form mode,
  * thus reducing the amount of form display configurations to keep track of.
  *
- * @see \Drupal\Core\Entity\EntityManagerInterface::getAllFormModes()
- * @see \Drupal\Core\Entity\EntityManagerInterface::getFormModes()
+ * @see entity_get_form_modes()
  * @see hook_entity_form_mode_info_alter()
  *
  * @ConfigEntityType(
  *   id = "form_mode",
  *   label = @Translation("Form mode"),
  *   controllers = {
+ *     "storage" = "Drupal\entity\EntityDisplayModeStorageController",
  *     "list_builder" = "Drupal\entity\EntityFormModeListBuilder",
  *     "form" = {
  *       "add" = "Drupal\entity\Form\EntityFormModeAddForm",
diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php
index 221de9c..df31790 100644
--- a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php
+++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php
@@ -25,8 +25,7 @@
  * replicate the settings of the 'default' view mode, thus reducing the amount
  * of display configurations to keep track of.
  *
- * @see \Drupal\Core\Entity\EntityManagerInterface::getAllViewModes()
- * @see \Drupal\Core\Entity\EntityManagerInterface::getViewModes()
+ * @see entity_get_view_modes()
  * @see hook_entity_view_mode_info_alter()
  *
  * @ConfigEntityType(
diff --git a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeBase.php b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeBase.php
index a5c9909..29ddcfb 100644
--- a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeBase.php
+++ b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeBase.php
@@ -8,8 +8,6 @@
 namespace Drupal\entity;
 
 use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Config\Entity\ConfigEntityInterface;
-use Drupal\Core\Entity\EntityStorageControllerInterface;
 
 /**
  * Base class for config entity types that hold settings for form and view modes.
@@ -62,9 +60,7 @@
   /**
    * {@inheritdoc}
    */
-  public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
-    /** @var \Drupal\entity\EntityDisplayModeInterface $a */
-    /** @var \Drupal\entity\EntityDisplayModeInterface $b */
+  public static function sort($a, $b) {
     // Sort by the type of entity the view mode is used for.
     $a_type = $a->getTargetType();
     $b_type = $b->getTargetType();
@@ -89,20 +85,4 @@ public function calculateDependencies() {
     return $this->dependencies;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function preSave(EntityStorageControllerInterface $storage_controller) {
-    parent::preSave($storage_controller);
-    \Drupal::entityManager()->clearCachedDefinitions();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
-    parent::preDelete($storage_controller, $entities);
-    \Drupal::entityManager()->clearCachedDefinitions();
-  }
-
 }
diff --git a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeStorageController.php b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeStorageController.php
new file mode 100644
index 0000000..cca791e
--- /dev/null
+++ b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeStorageController.php
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\entity\EntityDisplayModeStorageController.
+ */
+
+namespace Drupal\entity;
+
+use Drupal\Core\Config\Entity\ConfigStorageController;
+use Drupal\Core\Entity\EntityInterface;
+
+/**
+ * Defines the storage controller class for entity form and view modes.
+ */
+class EntityDisplayModeStorageController extends ConfigStorageController {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function preSave(EntityInterface $view_mode) {
+    entity_info_cache_clear();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function preDelete($view_modes) {
+    entity_info_cache_clear();
+  }
+
+}
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php
index 623140f..60702d6 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceEntityFormatter.php
@@ -38,9 +38,15 @@ public static function defaultSettings() {
    * {@inheritdoc}
    */
   public function settingsForm(array $form, array &$form_state) {
+    $view_modes = entity_get_view_modes($this->getFieldSetting('target_type'));
+    $options = array('default' => t('Default'));
+    foreach ($view_modes as $view_mode => $view_mode_settings) {
+      $options[$view_mode] = $view_mode_settings['label'];
+    }
+
     $elements['view_mode'] = array(
       '#type' => 'select',
-      '#options' => \Drupal::entityManager()->getViewModeOptions($this->getFieldSetting('target_type')),
+      '#options' => $options,
       '#title' => t('View mode'),
       '#default_value' => $this->getSetting('view_mode'),
       '#required' => TRUE,
@@ -61,9 +67,12 @@ public function settingsForm(array $form, array &$form_state) {
   public function settingsSummary() {
     $summary = array();
 
-    $view_modes = \Drupal::entityManager()->getViewModeOptions($this->getFieldSetting('target_type'));
+    $view_modes = entity_get_view_modes($this->getFieldSetting('target_type'));
     $view_mode = $this->getSetting('view_mode');
-    $summary[] = t('Rendered as @mode', array('@mode' => isset($view_modes[$view_mode]) ? $view_modes[$view_mode] : $view_mode));
+    if ($view_mode == 'default') {
+      $view_mode = t('Default');
+    }
+    $summary[] = t('Rendered as @mode', array('@mode' => isset($view_modes[$view_mode]['label']) ? $view_modes[$view_mode]['label'] : $view_mode));
     $summary[] = $this->getSetting('links') ? t('Display links') : t('Do not display links');
 
     return $summary;
diff --git a/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php b/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php
index 844853e..39c406d 100644
--- a/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php
+++ b/core/modules/field/lib/Drupal/field/Entity/FieldConfig.php
@@ -479,13 +479,6 @@ public function getSchema() {
   /**
    * {@inheritdoc}
    */
-  public function hasCustomStorage() {
-    return FALSE;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
   public function getColumns() {
     $schema = $this->getSchema();
     // A typical use case for the method is to iterate on the columns, while
@@ -589,13 +582,6 @@ public function setTranslatable($translatable) {
   /**
    * {@inheritdoc}
    */
-  public function getProvider() {
-    return 'field';
-  }
-
-  /**
-   * {@inheritdoc}
-   */
   public function getLabel() {
     return $this->label();
   }
diff --git a/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php b/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php
index ec398c1..7fa1184 100644
--- a/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php
+++ b/core/modules/field/lib/Drupal/field/Entity/FieldInstanceConfig.php
@@ -453,11 +453,11 @@ public static function postDelete(EntityStorageControllerInterface $storage_cont
     $displays_to_update = array();
     foreach ($instances as $instance) {
       if (!$instance->deleted) {
-        $view_modes = \Drupal::entityManager()->getViewModeOptions($instance->entity_type, TRUE);
+        $view_modes = array('default' => array()) + entity_get_view_modes($instance->entity_type);
         foreach (array_keys($view_modes) as $mode) {
           $displays_to_update['entity_view_display'][$instance->entity_type . '.' . $instance->bundle . '.' . $mode][] = $instance->field->name;
         }
-        $form_modes = \Drupal::entityManager()->getFormModeOptions($instance->entity_type, TRUE);
+        $form_modes = array('default' => array()) + entity_get_form_modes($instance->entity_type);
         foreach (array_keys($form_modes) as $mode) {
           $displays_to_update['entity_form_display'][$instance->entity_type . '.' . $instance->bundle . '.' . $mode][] = $instance->field->name;
         }
@@ -516,13 +516,6 @@ public function getSetting($setting_name) {
   /**
    * {@inheritdoc}
    */
-  public function getProvider() {
-    return $this->field->getProvider();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
   public function isTranslatable() {
     return $this->field->translatable;
   }
@@ -787,11 +780,4 @@ public function getColumns() {
     return $this->field->getColumns();
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function hasCustomStorage() {
-    return $this->field->hasCustomStorage();
-  }
-
 }
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
index 592f0a5..f310d65 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/DisplayOverview.php
@@ -176,7 +176,7 @@ protected function getDefaultPlugin($field_type) {
    * {@inheritdoc}
    */
   protected function getDisplayModes() {
-    return $this->entityManager->getViewModes($this->entity_type);
+    return entity_get_view_modes($this->entity_type);
   }
 
   /**
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php b/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php
index 2e19fb9..1f508d4 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/FormDisplayOverview.php
@@ -143,7 +143,7 @@ protected function getDefaultPlugin($field_type) {
    * {@inheritdoc}
    */
   protected function getDisplayModes() {
-    return $this->entityManager->getFormModes($this->entity_type);
+    return entity_get_form_modes($this->entity_type);
   }
 
   /**
diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Plugin/Derivative/FieldUiLocalTask.php b/core/modules/field_ui/lib/Drupal/field_ui/Plugin/Derivative/FieldUiLocalTask.php
index f7fd862..b29144f 100644
--- a/core/modules/field_ui/lib/Drupal/field_ui/Plugin/Derivative/FieldUiLocalTask.php
+++ b/core/modules/field_ui/lib/Drupal/field_ui/Plugin/Derivative/FieldUiLocalTask.php
@@ -134,7 +134,7 @@ public function getDerivativeDefinitions($base_plugin_definition) {
 
         // One local task for each form mode.
         $weight = 0;
-        foreach ($this->entityManager->getFormModes($entity_type_id) as $form_mode => $form_mode_info) {
+        foreach (entity_get_form_modes($entity_type_id) as $form_mode => $form_mode_info) {
           $this->derivatives['field_form_display_' . $form_mode . '_' . $entity_type_id] = array(
             'title' => $form_mode_info['label'],
             'route_name' => "field_ui.form_display_overview_form_mode_$entity_type_id",
@@ -148,7 +148,7 @@ public function getDerivativeDefinitions($base_plugin_definition) {
 
         // One local task for each view mode.
         $weight = 0;
-        foreach ($this->entityManager->getViewModes($entity_type_id) as $view_mode => $form_mode_info) {
+        foreach (entity_get_view_modes($entity_type_id) as $view_mode => $form_mode_info) {
           $this->derivatives['field_display_' . $view_mode . '_' . $entity_type_id] = array(
             'title' => $form_mode_info['label'],
             'route_name' => "field_ui.display_overview_view_mode_$entity_type_id",
@@ -185,11 +185,11 @@ public function alterLocalTasks(&$local_tasks) {
         $local_tasks["field_ui.fields:field_form_display_default_$entity_type"]['base_route'] = $admin_form;
         $local_tasks["field_ui.fields:field_display_default_$entity_type"]['base_route'] = $admin_form;
 
-        foreach ($this->entityManager->getFormModes($entity_type) as $form_mode => $form_mode_info) {
+        foreach (entity_get_form_modes($entity_type) as $form_mode => $form_mode_info) {
           $local_tasks['field_ui.fields:field_form_display_' . $form_mode . '_' . $entity_type]['base_route'] = $admin_form;
         }
 
-        foreach ($this->entityManager->getViewModes($entity_type) as $view_mode => $form_mode_info) {
+        foreach (entity_get_view_modes($entity_type) as $view_mode => $form_mode_info) {
           $local_tasks['field_ui.fields:field_display_' . $view_mode . '_' . $entity_type]['base_route'] = $admin_form;
         }
       }
diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php b/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php
index 2df6281..ce50508 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php
@@ -62,7 +62,7 @@ public function buildOptionsForm(&$form, &$form_state) {
    * Return the main options, which are shown in the summary title.
    */
   public function buildOptionsForm_summary_options() {
-    $view_modes = \Drupal::entityManager()->getViewModes('node');
+    $view_modes = entity_get_view_modes('node');
     $options = array();
     foreach ($view_modes as $mode => $settings) {
       $options[$mode] = $settings['label'];
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 0c0c99d..408ed8b 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -430,7 +430,7 @@ function node_add_body_field(NodeTypeInterface $type, $label = 'Body') {
 
     // The teaser view mode is created by the Standard profile and therefore
     // might not exist.
-    $view_modes = \Drupal::entityManager()->getViewModes('node');
+    $view_modes = entity_get_view_modes('node');
     if (isset($view_modes['teaser'])) {
       entity_get_display('node', $type->type, 'teaser')
         ->setComponent('body', array(
diff --git a/core/modules/search/lib/Drupal/search/Entity/SearchPage.php b/core/modules/search/lib/Drupal/search/Entity/SearchPage.php
index c89e5a1..18a1807 100644
--- a/core/modules/search/lib/Drupal/search/Entity/SearchPage.php
+++ b/core/modules/search/lib/Drupal/search/Entity/SearchPage.php
@@ -8,7 +8,6 @@
 namespace Drupal\search\Entity;
 
 use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Config\Entity\ConfigEntityInterface;
 use Drupal\Core\Config\Entity\EntityWithPluginBagInterface;
 use Drupal\Core\Entity\EntityStorageControllerInterface;
 use Drupal\Component\Plugin\ConfigurablePluginInterface;
@@ -214,7 +213,7 @@ public static function postDelete(EntityStorageControllerInterface $storage_cont
   /**
    * {@inheritdoc}
    */
-  public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
+  public static function sort($a, $b) {
     /** @var $a \Drupal\search\SearchPageInterface */
     /** @var $b \Drupal\search\SearchPageInterface */
     $a_status = (int) $a->status();
diff --git a/core/modules/system/entity.api.php b/core/modules/system/entity.api.php
index 92ed070..43f6ca6 100644
--- a/core/modules/system/entity.api.php
+++ b/core/modules/system/entity.api.php
@@ -144,8 +144,7 @@ function hook_entity_type_alter(array &$entity_types) {
  * @param array $view_modes
  *   An array of view modes, keyed first by entity type, then by view mode name.
  *
- * @see \Drupal\Core\Entity\EntityManagerInterface::getAllViewModes()
- * @see \Drupal\Core\Entity\EntityManagerInterface::getViewModes()
+ * @see entity_get_view_modes()
  * @see hook_entity_view_mode_info()
  */
 function hook_entity_view_mode_info_alter(&$view_modes) {
diff --git a/core/modules/system/lib/Drupal/system/Entity/Action.php b/core/modules/system/lib/Drupal/system/Entity/Action.php
index 6bc101f..9f08e20 100644
--- a/core/modules/system/lib/Drupal/system/Entity/Action.php
+++ b/core/modules/system/lib/Drupal/system/Entity/Action.php
@@ -8,7 +8,6 @@
 namespace Drupal\system\Entity;
 
 use Drupal\Core\Config\Entity\ConfigEntityBase;
-use Drupal\Core\Config\Entity\ConfigEntityInterface;
 use Drupal\Core\Config\Entity\EntityWithPluginBagInterface;
 use Drupal\system\ActionConfigEntityInterface;
 use Drupal\Core\Action\ActionBag;
@@ -132,9 +131,7 @@ public function getType() {
   /**
    * {@inheritdoc}
    */
-  public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
-    /** @var \Drupal\system\ActionConfigEntityInterface $a */
-    /** @var \Drupal\system\ActionConfigEntityInterface $b */
+  public static function sort($a, $b) {
     $a_type = $a->getType();
     $b_type = $b->getType();
     if ($a_type != $b_type) {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLabelTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLabelTest.php
new file mode 100644
index 0000000..097c7bc
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityLabelTest.php
@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\Tests\Entity\EntityLabelTest.
+ */
+
+namespace Drupal\system\Tests\Entity;
+
+/**
+ * Tests entity properties.
+ */
+class EntityLabelTest extends EntityUnitTestBase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Entity label',
+      'description' => 'Tests entity labels.',
+      'group' => 'Entity API',
+    );
+  }
+
+  /**
+   * Tests label key and label callback of an entity.
+   */
+  function testEntityLabel() {
+    $entity_types = array(
+      'entity_test_no_label',
+      'entity_test_label',
+      'entity_test_label_callback',
+    );
+
+    $values = array(
+      'name' => $this->randomName(),
+    );
+    foreach ($entity_types as $entity_type) {
+      $entity = entity_create($entity_type, $values);
+      $label = $entity->label();
+
+      switch ($entity_type) {
+        case 'entity_test_no_label':
+          $this->assertFalse($label, 'Entity with no label property or callback returned FALSE.');
+          break;
+
+        case 'entity_test_label':
+          $this->assertEqual($label, $entity->name->value, 'Entity with label key returned correct label.');
+          break;
+
+        case 'entity_test_label_callback':
+          $this->assertEqual($label, 'label callback ' . $entity->name->value, 'Entity with label callback returned correct label.');
+          break;
+      }
+    }
+  }
+}
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module
index d7a08fc..bfc73b5 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.module
+++ b/core/modules/system/tests/modules/entity_test/entity_test.module
@@ -318,6 +318,19 @@ function entity_test_entity_test_insert($entity) {
 }
 
 /**
+ * Entity label callback.
+ *
+ * @param $entity
+ *   The entity object.
+ *
+ * @return
+ *   The label of the entity prefixed with "label callback".
+ */
+function entity_test_label_callback($entity) {
+  return 'label callback ' . $entity->name->value;
+}
+
+/**
  * Implements hook_entity_field_access().
  *
  * @see \Drupal\system\Tests\Entity\FieldAccessTest::testFieldAccess()
diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php
index 1f93df1..357b77e 100644
--- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php
+++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTest.php
@@ -49,6 +49,54 @@
 class EntityTest extends ContentEntityBase implements EntityOwnerInterface {
 
   /**
+   * The entity ID.
+   *
+   * @var \Drupal\Core\Field\FieldItemListInterface
+   */
+  public $id;
+
+  /**
+   * The entity UUID.
+   *
+   * @var \Drupal\Core\Field\FieldItemListInterface
+   */
+  public $uuid;
+
+  /**
+   * The bundle of the test entity.
+   *
+   * @var \Drupal\Core\Field\FieldItemListInterface
+   */
+  public $type;
+
+  /**
+   * The name of the test entity.
+   *
+   * @var \Drupal\Core\Field\FieldItemListInterface
+   */
+  public $name;
+
+  /**
+   * The associated user.
+   *
+   * @var \Drupal\Core\Field\FieldItemListInterface
+   */
+  public $user_id;
+
+  /**
+   * Initialize the object. Invoked upon construction and wake up.
+   */
+  protected function init() {
+    parent::init();
+    // We unset all defined properties, so magic getters apply.
+    unset($this->id);
+    unset($this->uuid);
+    unset($this->name);
+    unset($this->user_id);
+    unset($this->type);
+  }
+
+  /**
    * {@inheritdoc}
    */
   public static function preCreate(EntityStorageControllerInterface $storage_controller, array &$values) {
@@ -127,26 +175,4 @@ public function setOwner(UserInterface $account) {
     return $this;
   }
 
-  /**
-   * Sets the name.
-   *
-   * @param string $name
-   *   Name of the entity.
-   *
-   * @return $this
-   */
-  public function setName($name) {
-    $this->set('name', $name);
-    return $this;
-  }
-
-  /**
-   * Returns the name.
-   *
-   * @return string
-   */
-  public function getName() {
-    return $this->get('name')->value;
-  }
-
 }
diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php
index b6b660e..c2496a6 100644
--- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php
+++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Entity/EntityTestRev.php
@@ -43,6 +43,21 @@
 class EntityTestRev extends EntityTest {
 
   /**
+   * The entity revision id.
+   *
+   * @var \Drupal\Core\Field\FieldItemListInterface
+   */
+  public $revision_id;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function init() {
+    parent::init();
+    unset($this->revision_id);
+  }
+
+  /**
    * Implements Drupal\Core\Entity\EntityInterface::getRevisionId().
    */
   public function getRevisionId() {
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/Entity.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/Entity.php
index f762c03..e61ae0b 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/area/Entity.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/Entity.php
@@ -57,9 +57,10 @@ protected function defineOptions() {
   public function buildOptionsForm(&$form, &$form_state) {
     parent::buildOptionsForm($form, $form_state);
 
+    $options = $this->buildViewModeOptions();
     $form['view_mode'] = array(
       '#type' => 'select',
-      '#options' => \Drupal::entityManager()->getViewModeOptions($this->entityType),
+      '#options' => $options,
       '#title' => t('View mode'),
       '#default_value' => $this->options['view_mode'],
     );
@@ -79,6 +80,22 @@ public function buildOptionsForm(&$form, &$form_state) {
   }
 
   /**
+   * Return the main options, which are shown in the summary title.
+   *
+   * @return array
+   *   All view modes of the entity type.
+   */
+  protected function buildViewModeOptions() {
+    $options = array('default' => t('Default'));
+    $view_modes = entity_get_view_modes($this->entityType);
+    foreach ($view_modes as $mode => $settings) {
+      $options[$mode] = $settings['label'];
+    }
+
+    return $options;
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function render($empty = FALSE) {
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php b/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php
index 6e8843b..2ca0dc9 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php
@@ -128,9 +128,10 @@ protected function defineOptions() {
   public function buildOptionsForm(&$form, &$form_state) {
     parent::buildOptionsForm($form, $form_state);
 
+    $options = $this->buildViewModeOptions();
     $form['view_mode'] = array(
       '#type' => 'select',
-      '#options' => \Drupal::entityManager()->getViewModeOptions($this->entityTypeId),
+      '#options' => $options,
       '#title' => t('View mode'),
       '#default_value' => $this->options['view_mode'],
     );
@@ -146,6 +147,19 @@ public function buildOptionsForm(&$form, &$form_state) {
   }
 
   /**
+   * Return the main options, which are shown in the summary title.
+   */
+  protected function buildViewModeOptions() {
+    $options = array('default' => t('Default'));
+    $view_modes = entity_get_view_modes($this->entityTypeId);
+    foreach ($view_modes as $mode => $settings) {
+      $options[$mode] = $settings['label'];
+    }
+
+    return $options;
+  }
+
+  /**
    * Returns the available rendering strategies for language-aware entities.
    *
    * @return array
@@ -164,7 +178,7 @@ protected function buildRenderingLanguageOptions() {
    * Overrides Drupal\views\Plugin\views\PluginBase::summaryTitle().
    */
   public function summaryTitle() {
-    $options = \Drupal::entityManager()->getViewModeOptions($this->entityTypeId);
+    $options = $this->buildViewModeOptions();
     if (isset($options[$this->options['view_mode']])) {
       return String::checkPlain($options[$this->options['view_mode']]);
     }
diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaEntityTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaEntityTest.php
index b1d766b..81374f7 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaEntityTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaEntityTest.php
@@ -8,7 +8,6 @@
 namespace Drupal\views\Tests\Handler;
 
 use Drupal\Core\Entity\EntityTypeInterface;
-use Drupal\Core\Language\Language;
 use Drupal\views\Tests\ViewTestBase;
 use Drupal\views\Views;
 
@@ -102,11 +101,6 @@ public function testEntityArea() {
     $this->assertTrue(strpos(trim((string) $result[0]), $entities[1]->label()) !== FALSE, 'The rendered entity appears in the footer of the view.');
     $this->assertTrue(strpos(trim((string) $result[0]), 'full') !== FALSE, 'The rendered entity appeared in the right view mode.');
 
-    // Mark entity_test test view_mode as customizable.
-    $view_mode = \Drupal::entityManager()->getStorageController('view_mode')->load('entity_test.test');
-    $view_mode->status = TRUE;
-    $view_mode->save();
-
     // Change the view mode of the area handler.
     $view = Views::getView('test_entity_area');
     $item = $view->getHandler('default', 'header', 'entity_entity_test');
@@ -132,6 +126,7 @@ public function testEntityArea() {
     $form_state = array();
     $form_state['type'] = 'header';
     $view->display_handler->getHandler('header', 'entity_entity_test')->buildOptionsForm($form, $form_state);
+    $this->assertTrue(isset($form['view_mode']['#options']['full']), 'Ensure that the full view mode is available.');
     $this->assertTrue(isset($form['view_mode']['#options']['test']), 'Ensure that the test view mode is available.');
     $this->assertTrue(isset($form['view_mode']['#options']['default']), 'Ensure that the default view mode is available.');
   }
diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php
index 5fa35b8..bb47904 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/RowEntityTest.php
@@ -78,6 +78,7 @@ public function testEntityRow() {
     $form_state['view'] = $view->storage;
     $view->rowPlugin->buildOptionsForm($form, $form_state);
 
+    $this->assertTrue(isset($form['view_mode']['#options']['full']), 'Ensure that the full view mode is available');
     $this->assertTrue(isset($form['view_mode']['#options']['default']), 'Ensure that the default view mode is available');
   }
 
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 1f09534..e5158b5 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -64,7 +64,7 @@
   exit;
 }
 
-$test_list = simpletest_script_get_test_list();
+$test_list = array_fill(0, 100, 'Drupal\image\Tests\ImageStylesPathAndUrlTest');
 
 // Try to allocate unlimited time to run the tests.
 drupal_set_time_limit(0);
diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
index 9deeaa6..a80fc64 100644
--- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
@@ -10,7 +10,6 @@
 use Drupal\Component\Plugin\ConfigurablePluginInterface;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\Component\Plugin\PluginBase;
-use Drupal\Core\Language\Language;
 use Drupal\Tests\UnitTestCase;
 
 /**
@@ -64,20 +63,6 @@ class ConfigEntityBaseUnitTest extends UnitTestCase {
   protected $provider;
 
   /**
-   * The language manager.
-   *
-   * @var \Drupal\Core\Language\LanguageManagerInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $languageManager;
-
-  /**
-   * The entity ID.
-   *
-   * @var string
-   */
-  protected $id;
-
-  /**
    * {@inheritdoc}
    */
   public static function getInfo() {
@@ -92,12 +77,7 @@ public static function getInfo() {
    * {@inheritdoc}
    */
   public function setUp() {
-    $this->id = $this->randomName();
-    $values = array(
-      'id' => $this->id,
-      'langcode' => 'en',
-      'uuid' => '3bb9ee60-bea5-4622-b89b-a63319d10b3a',
-    );
+    $values = array();
     $this->entityTypeId = $this->randomName();
     $this->provider = $this->randomName();
     $this->entityType = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
@@ -113,16 +93,9 @@ public function setUp() {
 
     $this->uuid = $this->getMock('\Drupal\Component\Uuid\UuidInterface');
 
-    $this->languageManager = $this->getMock('\Drupal\Core\Language\LanguageManagerInterface');
-    $this->languageManager->expects($this->any())
-      ->method('getLanguage')
-      ->with('en')
-      ->will($this->returnValue(new Language(array('id' => 'en'))));
-
     $container = new ContainerBuilder();
     $container->set('entity.manager', $this->entityManager);
     $container->set('uuid', $this->uuid);
-    $container->set('language_manager', $this->languageManager);
     \Drupal::setContainer($container);
 
     $this->entity = $this->getMockForAbstractClass('\Drupal\Core\Config\Entity\ConfigEntityBase', array($values, $this->entityTypeId));
@@ -263,158 +236,6 @@ public function testCalculateDependenciesWithPluginBagSameProviderAsEntityType()
     $this->assertEmpty($this->entity->calculateDependencies());
   }
 
-  /**
-   * @covers ::setOriginalId
-   * @covers ::getOriginalId
-   */
-  public function testGetOriginalId() {
-    $new_id = $this->randomName();
-    $this->entity->set('id', $new_id);
-    $this->assertSame($this->id, $this->entity->getOriginalId());
-    $this->assertSame($this->entity, $this->entity->setOriginalId($new_id));
-    $this->assertSame($new_id, $this->entity->getOriginalId());
-  }
-
-  /**
-   * @covers ::isNew
-   */
-  public function testIsNew() {
-    $this->assertFalse($this->entity->isNew());
-    $this->assertSame($this->entity, $this->entity->enforceIsNew());
-    $this->assertTrue($this->entity->isNew());
-    $this->entity->enforceIsNew(FALSE);
-    $this->assertFalse($this->entity->isNew());
-  }
-
-  /**
-   * @covers ::set
-   * @covers ::get
-   */
-  public function testGet() {
-    $name = 'id';
-    $value = $this->randomName();
-    $this->assertSame($this->id, $this->entity->get($name));
-    $this->assertSame($this->entity, $this->entity->set($name, $value));
-    $this->assertSame($value, $this->entity->get($name));
-  }
-
-  /**
-   * @covers ::setStatus
-   * @covers ::status
-   */
-  public function testSetStatus() {
-    $this->assertTrue($this->entity->status());
-    $this->assertSame($this->entity, $this->entity->setStatus(FALSE));
-    $this->assertFalse($this->entity->status());
-    $this->entity->setStatus(TRUE);
-    $this->assertTrue($this->entity->status());
-  }
-
-  /**
-   * @covers ::enable
-   * @depends testSetStatus
-   */
-  public function testEnable() {
-    $this->entity->setStatus(FALSE);
-    $this->assertSame($this->entity, $this->entity->enable());
-    $this->assertTrue($this->entity->status());
-  }
-
-  /**
-   * @covers ::disable
-   * @depends testSetStatus
-   */
-  public function testDisable() {
-    $this->entity->setStatus(TRUE);
-    $this->assertSame($this->entity, $this->entity->disable());
-    $this->assertFalse($this->entity->status());
-  }
-
-  /**
-   * @covers ::setSyncing
-   * @covers ::isSyncing
-   */
-  public function testIsSyncing() {
-    $this->assertFalse($this->entity->isSyncing());
-    $this->assertSame($this->entity, $this->entity->setSyncing(TRUE));
-    $this->assertTrue($this->entity->isSyncing());
-    $this->entity->setSyncing(FALSE);
-    $this->assertFalse($this->entity->isSyncing());
-  }
-
-  /**
-   * @covers ::createDuplicate
-   */
-  public function testCreateDuplicate() {
-    $this->entityType->expects($this->at(0))
-      ->method('getKey')
-      ->with('id')
-      ->will($this->returnValue('id'));
-
-    $this->entityType->expects($this->at(1))
-      ->method('hasKey')
-      ->with('uuid')
-      ->will($this->returnValue(TRUE));
-
-    $this->entityType->expects($this->at(2))
-      ->method('getKey')
-      ->with('uuid')
-      ->will($this->returnValue('uuid'));
-
-    $new_uuid = '8607ef21-42bc-4913-978f-8c06207b0395';
-    $this->uuid->expects($this->once())
-      ->method('generate')
-      ->will($this->returnValue($new_uuid));
-
-    $duplicate = $this->entity->createDuplicate();
-    $this->assertInstanceOf('\Drupal\Core\Entity\Entity', $duplicate);
-    $this->assertNotSame($this->entity, $duplicate);
-    $this->assertNull($duplicate->id());
-    $this->assertNull($duplicate->getOriginalId());
-    $this->assertNotEquals($this->entity->uuid(), $duplicate->uuid());
-    $this->assertSame($new_uuid, $duplicate->uuid());
-  }
-
-  /**
-   * @covers ::sort
-   */
-  public function testSort() {
-    $this->entityManager->expects($this->any())
-      ->method('getDefinition')
-      ->with($this->entityTypeId)
-      ->will($this->returnValue(array(
-        'entity_keys' => array(
-          'label' => 'label',
-        ),
-      )));
-    $entity_a = $this->entity;
-    $entity_a->label = 'foo';
-    $entity_b = clone $this->entity;
-    $entity_b->label = 'bar';
-    $list = array($entity_a, $entity_b);
-    // Suppress errors because of https://bugs.php.net/bug.php?id=50688.
-    @usort($list, '\Drupal\Core\Config\Entity\ConfigEntityBase::sort');
-    $this->assertSame($entity_b, $list[0]);
-    $entity_a->weight = 0;
-    $entity_b->weight = 1;
-    // Suppress errors because of https://bugs.php.net/bug.php?id=50688.
-    @usort($list, array($entity_a, 'sort'));
-    $this->assertSame($entity_a, $list[0]);
-  }
-
-  /**
-   * @covers ::toArray
-   */
-  public function testToArray() {
-    $properties = $this->entity->toArray();
-    $this->assertInternalType('array', $properties);
-    $class_info = new \ReflectionClass($this->entity);
-    foreach ($class_info->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
-      $name = $property->getName();
-      $this->assertArrayHasKey($name, $properties);
-      $this->assertSame($this->entity->get($name), $properties[$name]);
-    }
-  }
 }
 
 class TestConfigurablePlugin extends PluginBase implements ConfigurablePluginInterface {
@@ -439,4 +260,5 @@ public function setConfiguration(array $configuration) {
   public function defaultConfiguration() {
     return array();
   }
+
 }
diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
deleted file mode 100644
index 9eb55ae..0000000
--- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityBaseUnitTest.php
+++ /dev/null
@@ -1,351 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Tests\Core\Entity\ContentEntityBaseUnitTest.
- */
-
-namespace Drupal\Tests\Core\Entity;
-
-use Drupal\Core\DependencyInjection\ContainerBuilder;
-use Drupal\Tests\UnitTestCase;
-use Drupal\Core\Language\Language;
-
-/**
- * @coversDefaultClass \Drupal\Core\Entity\ContentEntityBase
- *
- * @group Drupal
- */
-class ContentEntityBaseUnitTest extends UnitTestCase {
-
-  /**
-   * The bundle of the entity under test.
-   *
-   * @var string
-   */
-  protected $bundle;
-
-  /**
-   * The entity under test.
-   *
-   * @var \Drupal\Core\Entity\ContentEntityBase|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $entity;
-
-  /**
-   * The entity type used for testing.
-   *
-   * @var \Drupal\Core\Entity\EntityTypeInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $entityType;
-
-  /**
-   * The entity manager used for testing.
-   *
-   * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $entityManager;
-
-  /**
-   * The type ID of the entity under test.
-   *
-   * @var string
-   */
-  protected $entityTypeId;
-
-  /**
-   * The typed data manager used for testing.
-   *
-   * @var \Drupal\Core\TypedData\TypedDataManager|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $typedDataManager;
-
-  /**
-   * The language manager.
-   *
-   * @var \Drupal\Core\Language\LanguageManagerInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $languageManager;
-
-  /**
-   * The UUID generator used for testing.
-   *
-   * @var \Drupal\Component\Uuid\UuidInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $uuid;
-
-  /**
-   * The entity ID.
-   *
-   * @var int
-   */
-  protected $id;
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'description' => '',
-      'name' => '\Drupal\Core\Entity\ContentEntityBase unit test',
-      'group' => 'Entity',
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setUp() {
-    $this->id = 1;
-    $values = array(
-      'id' => $this->id,
-      'langcode' => 'en',
-      'uuid' => '3bb9ee60-bea5-4622-b89b-a63319d10b3a',
-    );
-    $this->entityTypeId = $this->randomName();
-    $this->bundle = $this->randomName();
-
-    $this->entityType = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
-
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
-    $this->entityManager->expects($this->any())
-      ->method('getDefinition')
-      ->with($this->entityTypeId)
-      ->will($this->returnValue($this->entityType));
-    $this->entityManager->expects($this->any())
-      ->method('getFieldDefinitions')
-      ->with($this->entityTypeId, $this->bundle)
-      ->will($this->returnValue(array(
-        'id' => array(
-          'type' => 'integer_field',
-        ),
-      )));
-
-    $this->uuid = $this->getMock('\Drupal\Component\Uuid\UuidInterface');
-
-    $this->typedDataManager = $this->getMockBuilder('\Drupal\Core\TypedData\TypedDataManager')
-      ->disableOriginalConstructor()
-      ->getMock();
-
-    $language = new Language(array('id' => 'en'));
-    $this->languageManager = $this->getMock('\Drupal\Core\Language\LanguageManagerInterface');
-    $this->languageManager->expects($this->any())
-      ->method('getLanguages')
-      ->will($this->returnValue(array('en' => $language)));
-    $this->languageManager->expects($this->any())
-      ->method('getLanguage')
-      ->with('en')
-      ->will($this->returnValue($language));
-
-    $container = new ContainerBuilder();
-    $container->set('entity.manager', $this->entityManager);
-    $container->set('uuid', $this->uuid);
-    $container->set('typed_data_manager', $this->typedDataManager);
-    $container->set('language_manager', $this->languageManager);
-    \Drupal::setContainer($container);
-
-    $this->entity = $this->getMockForAbstractClass('\Drupal\Core\Entity\ContentEntityBase', array($values, $this->entityTypeId, $this->bundle));
-  }
-
-  /**
-   * @covers ::isNewRevision
-   * @covers ::setNewRevision
-   */
-  public function testIsNewRevision() {
-    // Set up the entity type so that on the first call there is no revision key
-    // and on the second call there is one.
-    $this->entityType->expects($this->at(0))
-      ->method('hasKey')
-      ->with('revision')
-      ->will($this->returnValue(FALSE));
-    $this->entityType->expects($this->at(1))
-      ->method('hasKey')
-      ->with('revision')
-      ->will($this->returnValue(TRUE));
-
-    $this->assertFalse($this->entity->isNewRevision());
-    $this->assertTrue($this->entity->isNewRevision());
-    $this->entity->setNewRevision(TRUE);
-    $this->assertTRUE($this->entity->isNewRevision());
-  }
-
-  /**
-   * @covers ::isDefaultRevision
-   */
-  public function testIsDefaultRevision() {
-    // The default value is TRUE.
-    $this->assertTrue($this->entity->isDefaultRevision());
-    // Change the default revision, verify that the old value is returned.
-    $this->assertTrue($this->entity->isDefaultRevision(FALSE));
-    // The last call changed the return value for this call.
-    $this->assertFalse($this->entity->isDefaultRevision());
-  }
-
-  /**
-   * @covers ::getRevisionId
-   */
-  public function testGetRevisionId() {
-    // The default getRevisionId() implementation returns NULL.
-    $this->assertNull($this->entity->getRevisionId());
-  }
-
-  /**
-   * @covers ::isTranslatable
-   */
-  public function testIsTranslatable() {
-    $this->entityManager->expects($this->at(0))
-      ->method('getBundleInfo')
-      ->with($this->entityTypeId)
-      ->will($this->returnValue(array(
-        $this->bundle => array(
-          'translatable' => TRUE,
-        ),
-      )));
-    $this->assertTrue($this->entity->isTranslatable());
-    $this->assertFalse($this->entity->isTranslatable());
-  }
-
-  /**
-   * @covers ::preSaveRevision
-   */
-  public function testPreSaveRevision() {
-    // This method is internal, so check for errors on calling it only.
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageControllerInterface');
-    $record = new \stdClass();
-    $this->entity->preSaveRevision($storage, $record);
-  }
-
-  /**
-   * @covers ::getString
-   */
-  public function testGetString() {
-    $label = $this->randomName();
-    /** @var \Drupal\Core\Entity\ContentEntityBase|\PHPUnit_Framework_MockObject_MockObject $entity */
-    $entity = $this->getMockBuilder('\Drupal\Core\Entity\ContentEntityBase')
-      ->setMethods(array('label'))
-      ->disableOriginalConstructor()
-      ->getMockForAbstractClass();
-    $entity->expects($this->once())
-      ->method('label')
-      ->will($this->returnValue($label));
-
-    $this->assertSame($label, $entity->getString());
-  }
-
-  /**
-   * @covers ::validate
-   */
-  public function testValidate() {
-    $validator = $this->getMock('\Symfony\Component\Validator\ValidatorInterface');
-    /** @var \Symfony\Component\Validator\ConstraintViolationList|\PHPUnit_Framework_MockObject_MockObject $empty_violation_list */
-    $empty_violation_list = $this->getMockBuilder('\Symfony\Component\Validator\ConstraintViolationList')
-      ->setMethods(NULL)
-      ->getMock();
-    $non_empty_violation_list = clone $empty_violation_list;
-    $violation = $this->getMock('\Symfony\Component\Validator\ConstraintViolationInterface');
-    $non_empty_violation_list->add($violation);
-    $validator->expects($this->at(0))
-      ->method('validate')
-      ->with($this->entity)
-      ->will($this->returnValue($empty_violation_list));
-    $validator->expects($this->at(1))
-      ->method('validate')
-      ->with($this->entity)
-      ->will($this->returnValue($non_empty_violation_list));
-    $this->typedDataManager->expects($this->exactly(2))
-      ->method('getValidator')
-      ->will($this->returnValue($validator));
-    $this->assertSame(0, count($this->entity->validate()));
-    $this->assertSame(1, count($this->entity->validate()));
-  }
-
-  /**
-   * @covers ::getConstraints
-   */
-  public function testGetConstraints() {
-    $this->assertInternalType('array', $this->entity->getConstraints());
-  }
-
-  /**
-   * @covers ::getName
-   */
-  public function testGetName() {
-    $this->assertNull($this->entity->getName());
-  }
-
-  /**
-   * @covers ::getRoot
-   */
-  public function testGetRoot() {
-    $this->assertSame(spl_object_hash($this->entity), spl_object_hash($this->entity->getRoot()));
-  }
-
-  /**
-   * @covers ::getPropertyPath
-   */
-  public function testGetPropertyPath() {
-    $this->assertSame('', $this->entity->getPropertyPath());
-  }
-
-  /**
-   * @covers ::getParent
-   */
-  public function testGetParent() {
-    $this->assertNull($this->entity->getParent());
-  }
-
-  /**
-   * @covers ::setContext
-   */
-  public function testSetContext() {
-    $name = $this->randomName();
-    $parent = $this->getMock('\Drupal\Core\TypedData\TypedDataInterface');
-    $this->entity->setContext($name, $parent);
-  }
-
-  /**
-   * @covers ::bundle
-   */
-  public function testBundle() {
-    $this->assertSame($this->bundle, $this->entity->bundle());
-  }
-
-  /**
-   * @covers ::access
-   */
-  public function testAccess() {
-    $access = $this->getMock('\Drupal\Core\Entity\EntityAccessControllerInterface');
-    $operation = $this->randomName();
-    $access->expects($this->at(0))
-      ->method('access')
-      ->with($this->entity, $operation)
-      ->will($this->returnValue(TRUE));
-    $access->expects($this->at(1))
-      ->method('createAccess')
-      ->will($this->returnValue(TRUE));
-    $this->entityManager->expects($this->exactly(2))
-      ->method('getAccessController')
-      ->will($this->returnValue($access));
-    $this->assertTrue($this->entity->access($operation));
-    $this->assertTrue($this->entity->access('create'));
-  }
-
-  /**
-   * @covers ::label
-   */
-  public function testLabel() {
-    // Make a mock with one method that we use as the entity's label callback.
-    // We check that it is called, and that the entity's label is the callback's
-    // return value.
-    $callback_label = $this->randomName();
-    $callback_container = $this->getMock(get_class());
-    $callback_container->expects($this->once())
-      ->method(__FUNCTION__)
-      ->will($this->returnValue($callback_label));
-    $this->entityType->expects($this->once())
-      ->method('getLabelCallback')
-      ->will($this->returnValue(array($callback_container, __FUNCTION__)));
-
-    $this->assertSame($callback_label, $this->entity->label());
-  }
-}
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
index 5c82343..4414904 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
@@ -553,41 +553,6 @@ public function testGetBaseFieldDefinitionsInvalidDefinition() {
   }
 
   /**
-   * Tests that getFieldDefinitions() method sets the 'provider' definition key.
-   *
-   * @covers ::getFieldDefinitions()
-   */
-  public function testGetFieldDefinitionsProvider() {
-    $this->setUpEntityWithFieldDefinition(TRUE);
-
-    $module = 'entity_manager_test_module';
-
-    // @todo Mock FieldDefinitionInterface once it exposes a proper provider
-    //   setter. See https://drupal.org/node/2225961.
-    $field_definition = $this->getMockBuilder('Drupal\Core\Field\FieldDefinition')
-      ->disableOriginalConstructor()
-      ->getMock();
-
-    // We expect two calls as the field definition will be returned from both
-    // base and bundle entity field info hook implementations.
-    $field_definition
-      ->expects($this->exactly(2))
-      ->method('setProvider')
-      ->with($this->matches($module));
-
-    $this->moduleHandler->expects($this->any())
-      ->method('getImplementations')
-      ->will($this->returnValue(array($module)));
-
-    $this->moduleHandler->expects($this->any())
-      ->method('invoke')
-      ->with($this->matches($module))
-      ->will($this->returnValue(array($field_definition)));
-
-    $this->entityManager->getFieldDefinitions('test_entity_type', 'test_bundle');
-  }
-
-  /**
    * Prepares an entity that defines a field definition.
    *
    * @param bool $custom_invoke_all
@@ -622,12 +587,11 @@ protected function setUpEntityWithFieldDefinition($custom_invoke_all = FALSE, $f
       ->method('bundleFieldDefinitions')
       ->will($this->returnValue(array()));
 
-    $this->moduleHandler = $this->getMock('Drupal\Core\Extension\ModuleHandlerInterface');
     $this->moduleHandler->expects($this->any())
       ->method('alter');
     if (!$custom_invoke_all) {
       $this->moduleHandler->expects($this->any())
-        ->method('getImplementations')
+        ->method('invokeAll')
         ->will($this->returnValue(array()));
     }
 
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
deleted file mode 100644
index be09ad8..0000000
--- a/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
+++ /dev/null
@@ -1,348 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Tests\Core\Entity\EntityUnitTest.
- */
-
-namespace Drupal\Tests\Core\Entity;
-
-use Drupal\Core\DependencyInjection\ContainerBuilder;
-use Drupal\Core\Language\Language;
-use Drupal\Tests\UnitTestCase;
-
-/**
- * @coversDefaultClass \Drupal\Core\Entity\Entity
- *
- * @group Drupal
- */
-class EntityUnitTest extends UnitTestCase {
-
-  /**
-   * The entity under test.
-   *
-   * @var \Drupal\Core\Entity\Entity|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $entity;
-
-  /**
-   * The entity type used for testing.
-   *
-   * @var \Drupal\Core\Entity\EntityTypeInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $entityType;
-
-  /**
-   * The entity manager used for testing.
-   *
-   * @var \Drupal\Core\Entity\EntityManagerInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $entityManager;
-
-  /**
-   * The ID of the type of the entity under test.
-   *
-   * @var string
-   */
-  protected $entityTypeId;
-
-  /**
-   * The route provider used for testing.
-   *
-   * @var \Drupal\Core\Routing\RouteProvider|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $routeProvider;
-
-  /**
-   * The UUID generator used for testing.
-   *
-   * @var \Drupal\Component\Uuid\UuidInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $uuid;
-
-  /**
-   * The language manager.
-   *
-   * @var \Drupal\Core\Language\LanguageManagerInterface|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $languageManager;
-
-  /**
-   * The entity values.
-   *
-   * @var array
-   */
-  protected $values;
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function getInfo() {
-    return array(
-      'description' => '',
-      'name' => '\Drupal\Core\Entity\Entity unit test',
-      'group' => 'Entity',
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setUp() {
-    $this->values = array(
-      'id' => 1,
-      'langcode' => 'en',
-      'uuid' => '3bb9ee60-bea5-4622-b89b-a63319d10b3a',
-    );
-    $this->entityTypeId = $this->randomName();
-
-    $this->entityType = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
-
-    $this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
-    $this->entityManager->expects($this->any())
-      ->method('getDefinition')
-      ->with($this->entityTypeId)
-      ->will($this->returnValue($this->entityType));
-
-    $this->uuid = $this->getMock('\Drupal\Component\Uuid\UuidInterface');
-
-    $this->languageManager = $this->getMock('\Drupal\Core\Language\LanguageManagerInterface');
-    $this->languageManager->expects($this->any())
-      ->method('getLanguage')
-      ->with('en')
-      ->will($this->returnValue(new Language(array('id' => 'en'))));
-
-    $container = new ContainerBuilder();
-    $container->set('entity.manager', $this->entityManager);
-    $container->set('uuid', $this->uuid);
-    $container->set('language_manager', $this->languageManager);
-
-    \Drupal::setContainer($container);
-
-    $this->entity = $this->getMockForAbstractClass('\Drupal\Core\Entity\Entity', array($this->values, $this->entityTypeId));
-  }
-
-  /**
-   * @covers ::id
-   */
-  public function testId() {
-    $this->assertSame($this->values['id'], $this->entity->id());
-  }
-
-  /**
-   * @covers ::uuid
-   */
-  public function testUuid() {
-    $this->assertSame($this->values['uuid'], $this->entity->uuid());
-  }
-
-  /**
-   * @covers ::isNew
-   * @covers ::enforceIsNew
-   */
-  public function testIsNew() {
-    // We provided an ID, so the entity is not new.
-    $this->assertFalse($this->entity->isNew());
-    // Force it to be new.
-    $this->assertSame($this->entity, $this->entity->enforceIsNew());
-    $this->assertTrue($this->entity->isNew());
-  }
-
-  /**
-   * @covers ::getEntityType
-   */
-  public function testGetEntityType() {
-    $this->assertSame($this->entityType, $this->entity->getEntityType());
-  }
-
-  /**
-   * @covers ::bundle
-   */
-  public function testBundle() {
-    $this->assertSame($this->entityTypeId, $this->entity->bundle());
-  }
-
-  /**
-   * @covers ::label
-   */
-  public function testLabel() {
-    // Make a mock with one method that we use as the entity's uri_callback. We
-    // check that it is called, and that the entity's label is the callback's
-    // return value.
-    $callback_label = $this->randomName();
-    $property_label = $this->randomName();
-    $callback_container = $this->getMock(get_class());
-    $callback_container->expects($this->once())
-      ->method(__FUNCTION__)
-      ->will($this->returnValue($callback_label));
-    $this->entityType->expects($this->at(0))
-      ->method('getLabelCallback')
-      ->will($this->returnValue(array($callback_container, __FUNCTION__)));
-    $this->entityType->expects($this->at(1))
-      ->method('getLabelCallback')
-      ->will($this->returnValue(NULL));
-    $this->entityType->expects($this->at(2))
-      ->method('getKey')
-      ->with('label')
-      ->will($this->returnValue('label'));
-
-    // Set a dummy property on the entity under test to test that the label can
-    // be returned form a property if there is no callback.
-    $this->entityManager->expects($this->at(1))
-      ->method('getDefinition')
-      ->with($this->entityTypeId)
-      ->will($this->returnValue(array(
-        'entity_keys' => array(
-          'label' => 'label',
-        ),
-      )));
-    $this->entity->label = $property_label;
-
-    $this->assertSame($callback_label, $this->entity->label());
-    $this->assertSame($property_label, $this->entity->label());
-  }
-
-  /**
-   * @covers ::access
-   */
-  public function testAccess() {
-    $access = $this->getMock('\Drupal\Core\Entity\EntityAccessControllerInterface');
-    $operation = $this->randomName();
-    $access->expects($this->at(0))
-      ->method('access')
-      ->with($this->entity, $operation)
-      ->will($this->returnValue(TRUE));
-    $access->expects($this->at(1))
-      ->method('createAccess')
-      ->will($this->returnValue(TRUE));
-    $this->entityManager->expects($this->exactly(2))
-      ->method('getAccessController')
-      ->will($this->returnValue($access));
-    $this->assertTrue($this->entity->access($operation));
-    $this->assertTrue($this->entity->access('create'));
-  }
-
-  /**
-   * @covers ::language
-   */
-  public function testLanguage() {
-    $this->assertSame('en', $this->entity->language()->id);
-  }
-
-  /**
-   * @covers ::save
-   */
-  public function testSave() {
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageControllerInterface');
-    $storage->expects($this->once())
-      ->method('save')
-      ->with($this->entity);
-    $this->entityManager->expects($this->once())
-      ->method('getStorageController')
-      ->with($this->entityTypeId)
-      ->will($this->returnValue($storage));
-    $this->entity->save();
-  }
-
-  /**
-   * @covers ::delete
-   */
-  public function testDelete() {
-    $this->entity->id = $this->randomName();
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageControllerInterface');
-    // Testing the argument of the delete() method consumes too much memory.
-    $storage->expects($this->once())
-      ->method('delete');
-    $this->entityManager->expects($this->once())
-      ->method('getStorageController')
-      ->with($this->entityTypeId)
-      ->will($this->returnValue($storage));
-    $this->entity->delete();
-  }
-
-  /**
-   * @covers ::getEntityTypeId
-   */
-  public function testGetEntityTypeId() {
-    $this->assertSame($this->entityTypeId, $this->entity->getEntityTypeId());
-  }
-
-  /**
-   * @covers ::preSave
-   */
-  public function testPreSave() {
-    // This method is internal, so check for errors on calling it only.
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageControllerInterface');
-    $this->entity->preSave($storage);
-  }
-
-  /**
-   * @covers ::postSave
-   */
-  public function testPostSave() {
-    // This method is internal, so check for errors on calling it only.
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageControllerInterface');
-    $this->entity->postSave($storage);
-  }
-
-  /**
-   * @covers ::preCreate
-   */
-  public function testPreCreate() {
-    // This method is internal, so check for errors on calling it only.
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageControllerInterface');
-    $values = array();
-    $this->entity->preCreate($storage, $values);
-  }
-
-  /**
-   * @covers ::postCreate
-   */
-  public function testPostCreate() {
-    // This method is internal, so check for errors on calling it only.
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageControllerInterface');
-    $this->entity->postCreate($storage);
-  }
-
-  /**
-   * @covers ::preDelete
-   */
-  public function testPreDelete() {
-    // This method is internal, so check for errors on calling it only.
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageControllerInterface');
-    $this->entity->preDelete($storage, array($this->entity));
-  }
-
-  /**
-   * @covers ::postDelete
-   */
-  public function testPostDelete() {
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageControllerInterface');
-
-    $entity = $this->getMockBuilder('\Drupal\Core\Entity\Entity')
-      ->setMethods(array('onSaveOrDelete'))
-      ->disableOriginalConstructor()
-      ->getMock();
-    $entity->expects($this->once())
-      ->method('onSaveOrDelete');
-
-    $this->entity->postDelete($storage, array($entity));
-  }
-
-  /**
-   * @covers ::postLoad
-   */
-  public function testPostLoad() {
-    // This method is internal, so check for errors on calling it only.
-    $storage = $this->getMock('\Drupal\Core\Entity\EntityStorageControllerInterface');
-    $entities = array($this->entity);
-    $this->entity->postLoad($storage, $entities);
-  }
-
-  /**
-   * @covers ::referencedEntities
-   */
-  public function testReferencedEntities() {
-    $this->assertSame(array(), $this->entity->referencedEntities());
-  }
-}
diff --git a/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php b/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php
index 9637ccb..a5e0f6f 100644
--- a/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/FieldDefinitionTest.php
@@ -206,26 +206,4 @@ public function testFieldRequired() {
     $this->assertFalse($definition->isRequired());
   }
 
-  /**
-   * Tests provider.
-   */
-  public function testFieldProvider() {
-    $definition = FieldDefinition::create($this->fieldType);
-    $provider = $this->randomName();
-    $definition->setProvider($provider);
-    $this->assertEquals($provider, $definition->getProvider());
-  }
-
-  /**
-   * Tests custom storage.
-   */
-  public function testCustomStorage() {
-    $definition = FieldDefinition::create($this->fieldType);
-    $this->assertFalse($definition->hasCustomStorage());
-    $definition->setCustomStorage(TRUE);
-    $this->assertTrue($definition->hasCustomStorage());
-    $definition->setCustomStorage(FALSE);
-    $this->assertFalse($definition->hasCustomStorage());
-  }
-
 }
