diff --git a/src/Form/IndexAddFieldsForm.php b/src/Form/IndexAddFieldsForm.php
index ac6e8e7..ad17bab 100644
--- a/src/Form/IndexAddFieldsForm.php
+++ b/src/Form/IndexAddFieldsForm.php
@@ -290,7 +290,7 @@ class IndexAddFieldsForm extends EntityForm {
           'field_item:file',
         );
         if ($inner_property instanceof FieldItemDataDefinition && in_array($inner_property->getDataType(), $allowed_properties)) {
-          $entity_type = $this->getEntityTypeManager()
+          $entity_type = $this->entityTypeManager
             ->getDefinition($inner_property->getSetting('target_type'));
           if (!$entity_type->isSubclassOf('Drupal\Core\Entity\ContentEntityInterface')) {
             unset($nested_properties['entity']);
diff --git a/src/Form/IndexFieldsForm.php b/src/Form/IndexFieldsForm.php
index e3235b6..7589678 100644
--- a/src/Form/IndexFieldsForm.php
+++ b/src/Form/IndexFieldsForm.php
@@ -400,7 +400,7 @@ class IndexFieldsForm extends EntityForm {
   public function save(array $form, FormStateInterface $form_state) {
     $index = $this->entity;
     if ($index instanceof UnsavedConfigurationInterface) {
-      $index->savePermanent($this->getEntityTypeManager());
+      $index->savePermanent($this->entityTypeManager);
     }
     else {
       $index->save();
diff --git a/src/Form/UnsavedConfigurationFormTrait.php b/src/Form/UnsavedConfigurationFormTrait.php
index eaeedc8..d4be3ff 100644
--- a/src/Form/UnsavedConfigurationFormTrait.php
+++ b/src/Form/UnsavedConfigurationFormTrait.php
@@ -10,13 +10,6 @@ use Drupal\search_api\UnsavedConfigurationInterface;
 trait UnsavedConfigurationFormTrait {
 
   /**
-   * The entity type manager.
-   *
-   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
-   */
-  protected $entityTypeManager;
-
-  /**
    * The renderer.
    *
    * @var \Drupal\Core\Render\RendererInterface
@@ -31,16 +24,6 @@ trait UnsavedConfigurationFormTrait {
   protected $dateFormatter;
 
   /**
-   * Retrieves the entity type manager.
-   *
-   * @return \Drupal\Core\Entity\EntityTypeManagerInterface
-   *   The entity type manager.
-   */
-  protected function getEntityTypeManager() {
-    return $this->entityTypeManager;
-  }
-
-  /**
    * Retrieves the renderer.
    *
    * @return \Drupal\Core\Render\RendererInterface
@@ -83,7 +66,7 @@ trait UnsavedConfigurationFormTrait {
         $form['#disabled'] = TRUE;
         $username = array(
           '#theme' => 'username',
-          '#account' => $entity->getLockOwner($this->entityTypeManager),
+          '#account' => $entity->getLockOwner(),
         );
         $lockMessageSubstitutions = array(
           '@user' => $this->renderer->render($username),
