 jsonapi.services.yml                               |  8 ++--
 src/Configuration/ResourceConfig.php               | 31 ++++------------
 src/Configuration/ResourceConfigInterface.php      | 27 ++++++--------
 src/Configuration/ResourceManager.php              | 21 +----------
 src/Configuration/ResourceManagerInterface.php     | 19 ----------
 src/Context/CurrentContext.php                     |  4 +-
 src/Normalizer/ConfigEntityNormalizer.php          |  2 +-
 src/Normalizer/EntityNormalizer.php                | 43 +++++++++++++---------
 src/Normalizer/EntityReferenceFieldNormalizer.php  | 25 +++++++++----
 .../JsonApiDocumentTopLevelNormalizer.php          | 20 +++++++---
 src/Resource/EntityResource.php                    |  6 +--
 src/Routing/Routes.php                             | 20 +++++-----
 .../Kernel/Configuration/ResourceManagerTest.php   | 24 ++----------
 .../JsonApiDocumentTopLevelNormalizerTest.php      | 12 +++---
 tests/src/Kernel/Resource/EntityResourceTest.php   | 10 ++---
 .../Unit/Normalizer/ConfigEntityNormalizerTest.php |  4 +-
 .../EntityReferenceFieldNormalizerTest.php         | 16 +++-----
 .../JsonApiDocumentTopLevelNormalizerTest.php      |  4 +-
 tests/src/Unit/Routing/RoutesTest.php              |  1 -
 19 files changed, 124 insertions(+), 173 deletions(-)

diff --git a/jsonapi.services.yml b/jsonapi.services.yml
index 9f478ab..4811e3c 100644
--- a/jsonapi.services.yml
+++ b/jsonapi.services.yml
@@ -18,7 +18,7 @@ services:
       - { name: normalizer, priority: 21 }
   serializer.normalizer.entity_reference_field.jsonapi:
     class: Drupal\jsonapi\Normalizer\EntityReferenceFieldNormalizer
-    arguments: ['@jsonapi.link_manager', '@entity_field.manager', '@plugin.manager.field.field_type', '@jsonapi.resource.manager']
+    arguments: ['@jsonapi.link_manager', '@entity_field.manager', '@plugin.manager.field.field_type', '@jsonapi.resource.manager', '@entity.repository']
     tags:
       - { name: normalizer, priority: 31 }
   serializer.normalizer.relationship.jsonapi:
@@ -28,17 +28,17 @@ services:
       - { name: normalizer, priority: 21 }
   serializer.normalizer.entity.jsonapi:
     class: Drupal\jsonapi\Normalizer\ContentEntityNormalizer
-    arguments: ['@jsonapi.link_manager', '@jsonapi.current_context']
+    arguments: ['@jsonapi.link_manager', '@jsonapi.current_context', '@entity_type.manager']
     tags:
       - { name: normalizer, priority: 21 }
   serializer.normalizer.config_entity.jsonapi:
     class: Drupal\jsonapi\Normalizer\ConfigEntityNormalizer
-    arguments: ['@jsonapi.link_manager', '@jsonapi.current_context']
+    arguments: ['@jsonapi.link_manager', '@jsonapi.current_context', '@entity_type.manager']
     tags:
       - { name: normalizer, priority: 21 }
   serializer.normalizer.jsonapi_document_toplevel.jsonapi:
     class: Drupal\jsonapi\Normalizer\JsonApiDocumentTopLevelNormalizer
-    arguments: ['@jsonapi.link_manager', '@jsonapi.current_context']
+    arguments: ['@jsonapi.link_manager', '@jsonapi.current_context', '@entity_type.manager']
     tags:
       - { name: normalizer, priority: 22 }
   serializer.normalizer.htt_exception.jsonapi:
diff --git a/src/Configuration/ResourceConfig.php b/src/Configuration/ResourceConfig.php
index 8a02d8b..16118ce 100644
--- a/src/Configuration/ResourceConfig.php
+++ b/src/Configuration/ResourceConfig.php
@@ -27,7 +27,7 @@ class ResourceConfig implements ResourceConfigInterface {
    *
    * @var string
    */
-  protected $bundleId;
+  protected $bundle;
 
   /**
    * The type name.
@@ -37,13 +37,6 @@ class ResourceConfig implements ResourceConfigInterface {
   protected $typeName;
 
   /**
-   * The base resource path.
-   *
-   * @var string
-   */
-  protected $path;
-
-  /**
    * The class to which a payload converts to.
    *
    * @var string
@@ -67,15 +60,8 @@ class ResourceConfig implements ResourceConfigInterface {
   /**
    * {@inheritdoc}
    */
-  public function getPath() {
-    return $this->path;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getBundleId() {
-    return $this->bundleId;
+  public function getBundle() {
+    return $this->bundle;
   }
 
   /**
@@ -90,18 +76,17 @@ class ResourceConfig implements ResourceConfigInterface {
    *
    * @param string $entity_type_id
    *   An entity type ID.
-   * @param string $bundle_id
-   *   A bundle ID.
+   * @param string $bundle
+   *   A bundle.
    * @param string $deserialization_target_class
    *   The deserialization target class.
    */
-  public function __construct($entity_type_id, $bundle_id, $deserialization_target_class) {
+  public function __construct($entity_type_id, $bundle, $deserialization_target_class) {
     $this->entityTypeId = $entity_type_id;
-    $this->bundleId = $bundle_id;
+    $this->bundle = $bundle;
     $this->deserializationTargetClass = $deserialization_target_class;
 
-    $this->typeName = sprintf('%s--%s', $this->entityTypeId, $this->bundleId);
-    $this->path= sprintf('/%s/%s', $this->entityTypeId, $this->bundleId);
+    $this->typeName = sprintf('%s--%s', $this->entityTypeId, $this->bundle);
   }
 
 }
diff --git a/src/Configuration/ResourceConfigInterface.php b/src/Configuration/ResourceConfigInterface.php
index e2d816d..27a37cf 100644
--- a/src/Configuration/ResourceConfigInterface.php
+++ b/src/Configuration/ResourceConfigInterface.php
@@ -9,36 +9,33 @@ namespace Drupal\jsonapi\Configuration;
 interface ResourceConfigInterface {
 
   /**
-   * Gets the entity type id.
+   * Gets the entity type ID.
    *
    * @return string
-   *   The entity type id.
+   *   The entity type ID.
+   *
+   * @see \Drupal\Core\Entity\EntityInterface::getEntityTypeId
    */
   public function getEntityTypeId();
 
   /**
-   * Gets the type name.
+   * Gets the bundle.
    *
    * @return string
-   *   The type name.
-   */
-  public function getTypeName();
-
-  /**
-   * Gets the path.
+   *   The bundle. Is the same as the entity type ID if the entity type does not
+   *   make use of different bundles.
    *
-   * @return string
-   *   The path.
+   * @see \Drupal\Core\Entity\EntityInterface::bundle
    */
-  public function getPath();
+  public function getBundle();
 
   /**
-   * Gets the bundle ID.
+   * Gets the type name.
    *
    * @return string
-   *   The bundleId.
+   *   The type name.
    */
-  public function getBundleId();
+  public function getTypeName();
 
   /**
    * Gets the deserialization target class.
diff --git a/src/Configuration/ResourceManager.php b/src/Configuration/ResourceManager.php
index 983774a..fb18f60 100644
--- a/src/Configuration/ResourceManager.php
+++ b/src/Configuration/ResourceManager.php
@@ -73,33 +73,16 @@ class ResourceManager implements ResourceManagerInterface {
   /**
    * {@inheritdoc}
    */
-  public function get($entity_type_id, $bundle_id) {
+  public function get($entity_type_id, $bundle) {
     if (empty($entity_type_id)) {
       throw new PreconditionFailedHttpException('Server error. The current route is malformed.');
     }
     foreach ($this->all(TRUE) as $resource) {
-      if ($resource->getEntityTypeId() == $entity_type_id && $resource->getBundleId() == $bundle_id) {
+      if ($resource->getEntityTypeId() == $entity_type_id && $resource->getBundle() == $bundle) {
         return $resource;
       }
     }
     return NULL;
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function getEntityTypeManager() {
-    return $this->entityTypeManager;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function hasBundle($entity_type_id) {
-    return (bool) $this->getEntityTypeManager()
-      ->getDefinition($entity_type_id)
-      ->getBundleEntityType();
-  }
-
-
 }
diff --git a/src/Configuration/ResourceManagerInterface.php b/src/Configuration/ResourceManagerInterface.php
index 60dad9a..2d8e741 100644
--- a/src/Configuration/ResourceManagerInterface.php
+++ b/src/Configuration/ResourceManagerInterface.php
@@ -31,23 +31,4 @@ interface ResourceManagerInterface {
    */
   public function get($entity_type_id, $bundle_id);
 
-  /**
-   * Get the entity type manager.
-   *
-   * @return \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
-   *   The entity type manager.
-   */
-  public function getEntityTypeManager();
-
-  /**
-   * Entity type has a bundle.
-   *
-   * @param string $entity_type_id
-   *   The entity type ID.
-   *
-   * @return bool
-   *   TRUE if the provided entity type has a bundle.
-   */
-  public function hasBundle($entity_type_id);
-
 }
diff --git a/src/Context/CurrentContext.php b/src/Context/CurrentContext.php
index 4f8800c..299eac2 100644
--- a/src/Context/CurrentContext.php
+++ b/src/Context/CurrentContext.php
@@ -68,9 +68,9 @@ class CurrentContext implements CurrentContextInterface {
     if (!isset($this->resourceConfig)) {
       $route = $this->routeMatch->getRouteObject();
       $entity_type_id = $route->getRequirement('_entity_type');
-      $bundle_id = $route->getRequirement('_bundle');
+      $bundle = $route->getRequirement('_bundle');
       $this->resourceConfig = $this->resourceManager
-        ->get($entity_type_id, $bundle_id);
+        ->get($entity_type_id, $bundle);
     }
 
     return $this->resourceConfig;
diff --git a/src/Normalizer/ConfigEntityNormalizer.php b/src/Normalizer/ConfigEntityNormalizer.php
index 153ef98..1029fcc 100644
--- a/src/Normalizer/ConfigEntityNormalizer.php
+++ b/src/Normalizer/ConfigEntityNormalizer.php
@@ -23,7 +23,7 @@ class ConfigEntityNormalizer extends EntityNormalizer {
   /**
    * {@inheritdoc}
    */
-  protected function getFields($entity, $bundle_id) {
+  protected function getFields($entity, $bundle) {
     /* @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */
     return $entity->toArray();
   }
diff --git a/src/Normalizer/EntityNormalizer.php b/src/Normalizer/EntityNormalizer.php
index 0fba062..20eb3e1 100644
--- a/src/Normalizer/EntityNormalizer.php
+++ b/src/Normalizer/EntityNormalizer.php
@@ -5,6 +5,7 @@ namespace Drupal\jsonapi\Normalizer;
 use Drupal\Core\Access\AccessibleInterface;
 use Drupal\Core\Cache\RefinableCacheableDependencyInterface;
 use Drupal\Core\Entity\ContentEntityInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Field\EntityReferenceFieldItemList;
 use Drupal\jsonapi\Configuration\ResourceConfigInterface;
 use Drupal\jsonapi\Context\CurrentContextInterface;
@@ -54,17 +55,27 @@ class EntityNormalizer extends NormalizerBase implements DenormalizerInterface,
   protected $currentContext;
 
   /**
+   * The entity type manager.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
+   */
+  protected $entityTypeManager;
+
+  /**
    * Constructs an ContentEntityNormalizer object.
    *
    * @param \Drupal\jsonapi\LinkManager\LinkManagerInterface $link_manager
    *   The link manager.
    * @param \Drupal\jsonapi\Context\CurrentContextInterface $current_context
    *   The current context.
+   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
+   *   The entity type manager.
    */
-  public function __construct(LinkManagerInterface $link_manager, CurrentContextInterface $current_context) {
+  public function __construct(LinkManagerInterface $link_manager, CurrentContextInterface $current_context, EntityTypeManagerInterface $entity_type_manager) {
     $this->linkManager = $link_manager;
     $this->currentContext = $current_context;
     $this->resourceManager = $current_context->getResourceManager();
+    $this->entityTypeManager = $entity_type_manager;
   }
 
   /**
@@ -79,16 +90,16 @@ class EntityNormalizer extends NormalizerBase implements DenormalizerInterface,
     $resource_type = $context['resource_config']->getTypeName();
     // Get the bundle ID of the requested resource. This is used to determine if
     // this is a bundle level resource or an entity level resource.
-    $bundle_id = $context['resource_config']->getBundleId();
+    $bundle = $context['resource_config']->getBundle();
     if (!empty($context['sparse_fieldset'][$resource_type])) {
       $field_names = $context['sparse_fieldset'][$resource_type];
     }
     else {
-      $field_names = $this->getFieldNames($entity, $bundle_id);
+      $field_names = $this->getFieldNames($entity, $bundle);
     }
     /* @var Value\FieldNormalizerValueInterface[] $normalizer_values */
     $normalizer_values = [];
-    foreach ($this->getFields($entity, $bundle_id) as $field_name => $field) {
+    foreach ($this->getFields($entity, $bundle) as $field_name => $field) {
       if (!in_array($field_name, $field_names)) {
         continue;
       }
@@ -131,18 +142,16 @@ class EntityNormalizer extends NormalizerBase implements DenormalizerInterface,
     }
     /* @var \Drupal\jsonapi\Configuration\ResourceConfigInterface $resource_config */
     $resource_config = $context['resource_config'];
-    $bundle_id = $resource_config->getBundleId();
-    $bundle_key = $this->resourceManager
-      ->getEntityTypeManager()
-      ->getDefinition($resource_config->getEntityTypeId())
+    $entity_type_id = $resource_config->getEntityTypeId();
+    $bundle = $resource_config->getBundle();
+    $bundle_key = $this->entityTypeManager->getDefinition($entity_type_id)
       ->getKey('bundle');
-    if ($bundle_key && $bundle_id) {
-      $data[$bundle_key] = $bundle_id;
+    if ($bundle_key && $bundle) {
+      $data[$bundle_key] = $bundle;
     }
 
-    return $this->currentContext->getResourceManager()
-      ->getEntityTypeManager()
-      ->getStorage($resource_config->getEntityTypeId())->create($data);
+    return $this->entityTypeManager->getStorage($entity_type_id)
+      ->create($data);
   }
 
   /**
@@ -154,9 +163,9 @@ class EntityNormalizer extends NormalizerBase implements DenormalizerInterface,
    * @return string[]
    *   The field names.
    */
-  protected function getFieldNames($entity, $bundle_id) {
+  protected function getFieldNames($entity, $bundle) {
     /* @var \Drupal\Core\Entity\ContentEntityInterface $entity */
-    return array_keys($this->getFields($entity, $bundle_id));
+    return array_keys($this->getFields($entity, $bundle));
   }
 
   /**
@@ -164,13 +173,13 @@ class EntityNormalizer extends NormalizerBase implements DenormalizerInterface,
    *
    * @param mixed $entity
    *   The entity.
-   * @param string $bundle_id
+   * @param string $bundle
    *   The bundle id.
    *
    * @return array
    *   The fields.
    */
-  protected function getFields($entity, $bundle_id) {
+  protected function getFields($entity, $bundle) {
     /* @var \Drupal\Core\Entity\ContentEntityInterface $entity */
     return $entity->getFields();
   }
diff --git a/src/Normalizer/EntityReferenceFieldNormalizer.php b/src/Normalizer/EntityReferenceFieldNormalizer.php
index f8e0039..59c4cd1 100644
--- a/src/Normalizer/EntityReferenceFieldNormalizer.php
+++ b/src/Normalizer/EntityReferenceFieldNormalizer.php
@@ -3,6 +3,8 @@
 namespace Drupal\jsonapi\Normalizer;
 
 use Drupal\Core\Entity\EntityFieldManagerInterface;
+use Drupal\Core\Entity\EntityRepositoryInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Field\EntityReferenceFieldItemListInterface;
 use Drupal\Core\Field\FieldTypePluginManagerInterface;
 use Drupal\Core\Field\TypedData\FieldItemDataDefinition;
@@ -46,6 +48,13 @@ class EntityReferenceFieldNormalizer extends FieldNormalizer implements Denormal
   protected $pluginManager;
 
   /**
+   * The entity repository.
+   *
+   * @var \Drupal\Core\Entity\EntityRepositoryInterface
+   */
+  protected $entityRepository;
+
+  /**
    * Instantiates a EntityReferenceFieldNormalizer object.
    *
    * @param \Drupal\jsonapi\LinkManager\LinkManagerInterface $link_manager
@@ -56,12 +65,15 @@ class EntityReferenceFieldNormalizer extends FieldNormalizer implements Denormal
    *   The plugin manager for fields.
    * @param \Drupal\jsonapi\Configuration\ResourceManagerInterface $resource_manager
    *   The resource manager.
+   * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository
+   *   The entity repository.
    */
-  public function __construct(LinkManagerInterface $link_manager, EntityFieldManagerInterface $field_manager, FieldTypePluginManagerInterface $plugin_manager, ResourceManagerInterface $resource_manager) {
+  public function __construct(LinkManagerInterface $link_manager, EntityFieldManagerInterface $field_manager, FieldTypePluginManagerInterface $plugin_manager, ResourceManagerInterface $resource_manager, EntityRepositoryInterface $entity_repository) {
     $this->linkManager = $link_manager;
     $this->fieldManager = $field_manager;
     $this->pluginManager = $plugin_manager;
     $this->resourceManager = $resource_manager;
+    $this->entityRepository = $entity_repository;
   }
 
   /**
@@ -91,7 +103,7 @@ class EntityReferenceFieldNormalizer extends FieldNormalizer implements Denormal
     $entity_type_id = $context['resource_config']->getEntityTypeId();
     $field_definitions = $this->fieldManager->getFieldDefinitions(
       $entity_type_id,
-      $context['resource_config']->getBundleId()
+      $context['resource_config']->getBundle()
     );
     if (empty($context['related']) || empty($field_definitions[$context['related']])) {
       throw new SerializableHttpException(400, 'Invalid or missing related field.');
@@ -118,10 +130,7 @@ class EntityReferenceFieldNormalizer extends FieldNormalizer implements Denormal
 
       // Load the entity by UUID.
       list($entity_type_id,) = explode('--', $value['type']);
-      $entities = $this->resourceManager->getEntityTypeManager()
-        ->getStorage($entity_type_id)
-        ->loadByProperties(['uuid' => $value['id']]);
-      $entity = reset($entities);
+      $entity = $this->entityRepository->loadEntityByUuid($entity_type_id, $value['id']);
       $value['id'] = $entity ? $entity->id() : NULL;
 
       return [$property_key => $value['id']];
@@ -183,9 +192,9 @@ class EntityReferenceFieldNormalizer extends FieldNormalizer implements Denormal
     $target_bundles = empty($handler_settings['target_bundles']) ?
       [] :
       $handler_settings['target_bundles'];
-    return array_map(function ($target_bundle_id) use ($target_entity_id) {
+    return array_map(function ($target_bundle) use ($target_entity_id) {
       return $this->resourceManager
-        ->get($target_entity_id, $target_bundle_id)
+        ->get($target_entity_id, $target_bundle)
         ->getTypeName();
     }, $target_bundles);
   }
diff --git a/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php b/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php
index cf68130..71f362b 100644
--- a/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php
+++ b/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\jsonapi\Normalizer;
 
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Field\EntityReferenceFieldItemListInterface;
 use Drupal\jsonapi\Context\CurrentContextInterface;
 use Drupal\jsonapi\Resource\EntityCollectionInterface;
@@ -39,16 +40,26 @@ class JsonApiDocumentTopLevelNormalizer extends NormalizerBase implements Denorm
   protected $currentContext;
 
   /**
+   * The entity type manager.
+   *
+   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
+   */
+  protected $entityTypeManager;
+
+  /**
    * Constructs an ContentEntityNormalizer object.
    *
    * @param \Drupal\jsonapi\LinkManager\LinkManagerInterface $link_manager
    *   The link manager to get the links.
    * @param \Drupal\jsonapi\Context\CurrentContextInterface $current_context
    *   The current context.
+   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
+   *   The entity type manager.
    */
-  public function __construct(LinkManagerInterface $link_manager, CurrentContextInterface $current_context) {
+  public function __construct(LinkManagerInterface $link_manager, CurrentContextInterface $current_context, EntityTypeManagerInterface $entity_type_manager) {
     $this->linkManager = $link_manager;
     $this->currentContext = $current_context;
+    $this->entityTypeManager = $entity_type_manager;
   }
 
   /**
@@ -77,13 +88,10 @@ class JsonApiDocumentTopLevelNormalizer extends NormalizerBase implements Denorm
       $relationships = array_map(function ($relationship) {
         $id_list = array_column($relationship['data'], 'id');
         list($entity_type_id,) = explode('--', $relationship['data'][0]['type']);
-        $entity_storage = $this->currentContext->getResourceManager()
-          ->getEntityTypeManager()
-          ->getStorage($entity_type_id);
+        $entity_storage = $this->entityTypeManager->getStorage($entity_type_id);
         // In order to maintain the order ($delta) of the relationships, we need
         // to load the entities and explore the uuid value.
-        $related_entities = array_values($entity_storage
-          ->loadByProperties(['uuid' => $id_list]));
+        $related_entities = array_values($entity_storage->loadByProperties(['uuid' => $id_list]));
         $map = [];
         foreach ($related_entities as $related_entity) {
           $map[$related_entity->uuid()] = $related_entity->id();
diff --git a/src/Resource/EntityResource.php b/src/Resource/EntityResource.php
index d00a70e..5121c05 100644
--- a/src/Resource/EntityResource.php
+++ b/src/Resource/EntityResource.php
@@ -433,10 +433,10 @@ class EntityResource implements EntityResourceInterface {
     $query = $this->queryBuilder->newQuery($entity_type, $params);
 
     // Limit this query to the bundle type for this resource.
-    $bundle_id = $this->resourceConfig->getBundleId();
-    if ($bundle_id && ($bundle_key = $entity_type->getKey('bundle'))) {
+    $bundle = $this->resourceConfig->getBundle();
+    if ($bundle && ($bundle_key = $entity_type->getKey('bundle'))) {
       $query->condition(
-        $bundle_key, $bundle_id
+        $bundle_key, $bundle
       );
     }
 
diff --git a/src/Routing/Routes.php b/src/Routing/Routes.php
index 715e2a8..aa82a15 100644
--- a/src/Routing/Routes.php
+++ b/src/Routing/Routes.php
@@ -80,6 +80,7 @@ class Routes implements ContainerInjectionInterface {
   public function routes() {
     $collection = new RouteCollection();
     foreach ($this->resourceManager->all() as $resource_config) {
+      $route_base_path = sprintf('/jsonapi/%s/%s', $resource_config->getEntityTypeId(), $resource_config->getBundle());
       $build_route_name = function ($key) use ($resource_config) {
         return sprintf('jsonapi.%s.%s', $resource_config->getTypeName(), $key);
       };
@@ -94,10 +95,9 @@ class Routes implements ContainerInjectionInterface {
       ];
 
       // Collection endpoint, like /jsonapi/file/photo.
-      $route_collection = (new Route('/jsonapi' . $resource_config->getPath()))
-        ->addDefaults($defaults)
+      $route_collection = (new Route($route_base_path, $defaults))
         ->setRequirement('_entity_type', $resource_config->getEntityTypeId())
-        ->setRequirement('_bundle', $resource_config->getBundleId())
+        ->setRequirement('_bundle', $resource_config->getBundle())
         ->setRequirement('_permission', 'access content')
         ->setRequirement('_format', 'api_json')
         ->setRequirement('_custom_parameter_names', 'TRUE')
@@ -108,10 +108,10 @@ class Routes implements ContainerInjectionInterface {
 
       // Individual endpoint, like /jsonapi/file/photo/123.
       $parameters = [$resource_config->getEntityTypeId() => ['type' => 'entity:' . $resource_config->getEntityTypeId()]];
-      $route_individual = (new Route('/jsonapi' . sprintf('%s/{%s}', $resource_config->getPath(), $resource_config->getEntityTypeId())))
+      $route_individual = (new Route(sprintf('%s/{%s}', $route_base_path, $resource_config->getEntityTypeId())))
         ->addDefaults($defaults)
         ->setRequirement('_entity_type', $resource_config->getEntityTypeId())
-        ->setRequirement('_bundle', $resource_config->getBundleId())
+        ->setRequirement('_bundle', $resource_config->getBundle())
         ->setRequirement('_permission', 'access content')
         ->setRequirement('_format', 'api_json')
         ->setRequirement('_custom_parameter_names', 'TRUE')
@@ -123,10 +123,9 @@ class Routes implements ContainerInjectionInterface {
       $collection->add($build_route_name('individual'), $route_individual);
 
       // Related resource, like /jsonapi/file/photo/123/comments.
-      $route_related = (new Route('/jsonapi' . sprintf('%s/{%s}/{related}', $resource_config->getPath(), $resource_config->getEntityTypeId())))
-        ->addDefaults($defaults)
+      $route_related = (new Route(sprintf('%s/{%s}/{related}', $route_base_path, $resource_config->getEntityTypeId()), $defaults))
         ->setRequirement('_entity_type', $resource_config->getEntityTypeId())
-        ->setRequirement('_bundle', $resource_config->getBundleId())
+        ->setRequirement('_bundle', $resource_config->getBundle())
         ->setRequirement('_permission', 'access content')
         ->setRequirement('_format', 'api_json')
         ->setRequirement('_custom_parameter_names', 'TRUE')
@@ -137,10 +136,9 @@ class Routes implements ContainerInjectionInterface {
       $collection->add($build_route_name('related'), $route_related);
 
       // Related endpoint, like /jsonapi/file/photo/123/relationships/comments.
-      $route_relationship = (new Route('/jsonapi' . sprintf('%s/{%s}/relationships/{related}', $resource_config->getPath(), $resource_config->getEntityTypeId())))
-        ->addDefaults($defaults + ['_on_relationship' => TRUE])
+      $route_relationship = (new Route(sprintf('%s/{%s}/relationships/{related}', $route_base_path, $resource_config->getEntityTypeId()), $defaults + ['_on_relationship' => TRUE]))
         ->setRequirement('_entity_type', $resource_config->getEntityTypeId())
-        ->setRequirement('_bundle', $resource_config->getBundleId())
+        ->setRequirement('_bundle', $resource_config->getBundle())
         ->setRequirement('_permission', 'access content')
         ->setRequirement('_format', 'api_json')
         ->setRequirement('_custom_parameter_names', 'TRUE')
diff --git a/tests/src/Kernel/Configuration/ResourceManagerTest.php b/tests/src/Kernel/Configuration/ResourceManagerTest.php
index 000a8d7..5a8ae85 100644
--- a/tests/src/Kernel/Configuration/ResourceManagerTest.php
+++ b/tests/src/Kernel/Configuration/ResourceManagerTest.php
@@ -69,11 +69,6 @@ class ResourceManagerTest extends KernelTestBase {
       $this->assertNotEmpty($resource_config->getDeserializationTargetClass());
       $this->assertNotEmpty($resource_config->getEntityTypeId());
       $this->assertNotEmpty($resource_config->getTypeName());
-      $path = $resource_config->getPath();
-      if (!$resource_config->getBundleId()) {
-        $this->assertCount(1, explode('/', ltrim($path, '/')));
-      }
-      $this->assertNotEmpty($path);
     });
   }
 
@@ -81,15 +76,14 @@ class ResourceManagerTest extends KernelTestBase {
    * @covers ::get
    * @dataProvider getProvider
    */
-  public function testGet($entity_type_id, $bundle_id, $entity_class) {
+  public function testGet($entity_type_id, $bundle, $entity_class) {
     // Make sure that there are resources being created.
-    $resource_config = $this->resourceManager->get($entity_type_id, $bundle_id);
+    $resource_config = $this->resourceManager->get($entity_type_id, $bundle);
     $this->assertInstanceOf(ResourceConfigInterface::class, $resource_config);
     $this->assertSame($entity_class, $resource_config->getDeserializationTargetClass());
     $this->assertSame($entity_type_id, $resource_config->getEntityTypeId());
-    $this->assertSame($bundle_id, $resource_config->getBundleId());
-    $this->assertSame('/' . $entity_type_id . '/' . $bundle_id, $resource_config->getPath());
-    $this->assertSame($entity_type_id . '--' . $bundle_id, $resource_config->getTypeName());
+    $this->assertSame($bundle, $resource_config->getBundle());
+    $this->assertSame($entity_type_id . '--' . $bundle, $resource_config->getTypeName());
   }
 
   /**
@@ -106,14 +100,4 @@ class ResourceManagerTest extends KernelTestBase {
     ];
   }
 
-  /**
-   * @covers ::hasBundle
-   */
-  public function testHasBundle() {
-    $this->assertTrue($this->resourceManager->hasBundle('node'));
-    $this->assertFalse($this->resourceManager->hasBundle('node_type'));
-    $this->assertFalse($this->resourceManager->hasBundle('date_format'));
-    $this->assertFalse($this->resourceManager->hasBundle('user'));
-  }
-
 }
diff --git a/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
index 2834006..ee19d1a 100644
--- a/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
+++ b/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
@@ -537,14 +537,14 @@ class JsonApiDocumentTopLevelNormalizerTest extends JsonapiKernelTestBase {
    *
    * @param string $entity_type_id
    *   The ID of the entity type. Ex: node.
-   * @param string $bundle_id
-   *   The ID of the bundle. Ex: article.
+   * @param string $bundle
+   *   The bundle. Ex: article.
    *
    * @return array
    *   A numeric array containing the request and the resource config mocks.
    */
-  protected function generateProphecies($entity_type_id, $bundle_id, $related_property = NULL) {
-    $path = sprintf('/%s/%s', $entity_type_id, $bundle_id);
+  protected function generateProphecies($entity_type_id, $bundle, $related_property = NULL) {
+    $path = sprintf('/%s/%s', $entity_type_id, $bundle);
     $path = $related_property ?
       sprintf('%s/%s', $path, $related_property) :
       $path;
@@ -553,7 +553,7 @@ class JsonApiDocumentTopLevelNormalizerTest extends JsonapiKernelTestBase {
       '_on_relationship' => NULL,
     ], [
       '_entity_type' => $entity_type_id,
-      '_bundle' => $bundle_id,
+      '_bundle' => $bundle,
     ]);
     $request = new Request([], [], [
       RouteObjectInterface::ROUTE_OBJECT => $route,
@@ -563,7 +563,7 @@ class JsonApiDocumentTopLevelNormalizerTest extends JsonapiKernelTestBase {
 
     $resource_config = new ResourceConfig(
       $entity_type_id,
-      $bundle_id,
+      $bundle,
       $entity_type_manager->getDefinition($entity_type_id)->getClass()
     );
 
diff --git a/tests/src/Kernel/Resource/EntityResourceTest.php b/tests/src/Kernel/Resource/EntityResourceTest.php
index e2a393f..f97c7df 100644
--- a/tests/src/Kernel/Resource/EntityResourceTest.php
+++ b/tests/src/Kernel/Resource/EntityResourceTest.php
@@ -783,17 +783,17 @@ class EntityResourceTest extends JsonapiKernelTestBase {
    *
    * @param string $entity_type_id
    *   The entity type ID.
-   * @param string $bundle_id
-   *   The bundle ID.
+   * @param string $bundle
+   *   The bundle.
    *
    * @return \Drupal\jsonapi\Resource\EntityResourceInterface
    *   The resource.
    */
-  protected function buildEntityResource($entity_type_id, $bundle_id) {
+  protected function buildEntityResource($entity_type_id, $bundle) {
     // The fake route.
     $route = new Route(NULL, [], [
       '_entity_type' => $entity_type_id,
-      '_bundle' => $bundle_id,
+      '_bundle' => $bundle,
     ]);
     // The request.
     $request = new Request([], [], ['_route_object' => $route]);
@@ -808,7 +808,7 @@ class EntityResourceTest extends JsonapiKernelTestBase {
     $this->container->set('jsonapi.current_context', $current_context);
 
     return new EntityResource(
-      new ResourceConfig($entity_type_id, $bundle_id, NULL),
+      new ResourceConfig($entity_type_id, $bundle, NULL),
       $this->container->get('entity_type.manager'),
       $this->container->get('jsonapi.query_builder'),
       $this->container->get('entity_field.manager'),
diff --git a/tests/src/Unit/Normalizer/ConfigEntityNormalizerTest.php b/tests/src/Unit/Normalizer/ConfigEntityNormalizerTest.php
index 982d889..6420001 100644
--- a/tests/src/Unit/Normalizer/ConfigEntityNormalizerTest.php
+++ b/tests/src/Unit/Normalizer/ConfigEntityNormalizerTest.php
@@ -3,6 +3,7 @@
 namespace Drupal\Tests\jsonapi\Unit\Normalizer;
 
 use Drupal\Core\Config\Entity\ConfigEntityInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\jsonapi\Configuration\ResourceConfig;
 use Drupal\jsonapi\Configuration\ResourceManagerInterface;
 use Drupal\jsonapi\Normalizer\ConfigEntityNormalizer;
@@ -49,7 +50,8 @@ class ConfigEntityNormalizerTest extends UnitTestCase {
 
     $this->normalizer = new ConfigEntityNormalizer(
       $link_manager->reveal(),
-      $current_context_manager->reveal()
+      $current_context_manager->reveal(),
+      $this->prophesize(EntityTypeManagerInterface::class)->reveal()
     );
 
     $normalizers = [new ScalarNormalizer()];
diff --git a/tests/src/Unit/Normalizer/EntityReferenceFieldNormalizerTest.php b/tests/src/Unit/Normalizer/EntityReferenceFieldNormalizerTest.php
index 7324340..ae48073 100644
--- a/tests/src/Unit/Normalizer/EntityReferenceFieldNormalizerTest.php
+++ b/tests/src/Unit/Normalizer/EntityReferenceFieldNormalizerTest.php
@@ -4,8 +4,7 @@ namespace Drupal\Tests\jsonapi\Unit\Normalizer;
 
 use Drupal\Core\Entity\EntityFieldManagerInterface;
 use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityStorageInterface;
-use Drupal\Core\Entity\EntityTypeManagerInterface;
+use Drupal\Core\Entity\EntityRepositoryInterface;
 use Drupal\Core\Entity\FieldableEntityInterface;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
 use Drupal\Core\Field\FieldTypePluginManagerInterface;
@@ -77,22 +76,19 @@ class EntityReferenceFieldNormalizerTest extends UnitTestCase {
     $resource_manager->get('fake_entity_type', 'dummy_bundle')
       ->willReturn(new ResourceConfig('lorem', 'dummy_bundle', NULL));
 
-    $entity_storage = $this->prophesize(EntityStorageInterface::class);
     $entity = $this->prophesize(EntityInterface::class);
     $entity->uuid()->willReturn('4e6cb61d-4f04-437f-99fe-42c002393658');
     $entity->id()->willReturn(42);
-    $entity_storage->loadByProperties(Argument::type('array'))
-      ->willReturn([$entity->reveal()]);
-    $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
-    $entity_type_manager->getStorage('lorem')
-      ->willReturn($entity_storage->reveal());
-    $resource_manager->getEntityTypeManager()->willReturn($entity_type_manager->reveal());
+    $entity_repository = $this->prophesize(EntityRepositoryInterface::class);
+    $entity_repository->loadEntityByUuid('lorem', '4e6cb61d-4f04-437f-99fe-42c002393658')
+      ->willReturn($entity->reveal());
 
     $this->normalizer = new EntityReferenceFieldNormalizer(
       $link_manager->reveal(),
       $field_manager->reveal(),
       $plugin_manager->reveal(),
-      $resource_manager->reveal()
+      $resource_manager->reveal(),
+      $entity_repository->reveal()
     );
   }
 
diff --git a/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php b/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
index 541e549..e242867 100644
--- a/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
+++ b/tests/src/Unit/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php
@@ -65,7 +65,6 @@ class JsonApiDocumentTopLevelNormalizerTest extends UnitTestCase {
     $entity_type_manager->getStorage('node')
       ->willReturn($entity_storage->reveal());
     $resource_manager = $this->prophesize(ResourceManagerInterface::class);
-    $resource_manager->getEntityTypeManager()->willReturn($entity_type_manager->reveal());
     $current_context_manager->getResourceManager()->willReturn($resource_manager->reveal());
 
     $current_route = $this->prophesize(Route::class);
@@ -75,7 +74,8 @@ class JsonApiDocumentTopLevelNormalizerTest extends UnitTestCase {
 
     $this->normalizer = new JsonApiDocumentTopLevelNormalizer(
       $link_manager->reveal(),
-      $current_context_manager->reveal()
+      $current_context_manager->reveal(),
+      $entity_type_manager->reveal()
     );
 
     $serializer = $this->prophesize(DenormalizerInterface::class);
diff --git a/tests/src/Unit/Routing/RoutesTest.php b/tests/src/Unit/Routing/RoutesTest.php
index 0d0b1cb..1cd8c4b 100644
--- a/tests/src/Unit/Routing/RoutesTest.php
+++ b/tests/src/Unit/Routing/RoutesTest.php
@@ -36,7 +36,6 @@ class RoutesTest extends UnitTestCase {
     parent::setUp();
     // Mock the resource manager to have some resources available.
     $resource_manager = $this->prophesize(ResourceManagerInterface::class);
-    $resource_manager->hasBundle('entity_type_1')->willReturn(TRUE);
     $resource_manager->all()->willReturn([new ResourceConfig('entity_type_1', 'bundle_1_1', EntityInterface::class)]);
     $container = $this->prophesize(ContainerInterface::class);
     $container->get('jsonapi.resource.manager')->willReturn($resource_manager->reveal());
