diff --git a/dynamic_entity_reference.install b/dynamic_entity_reference.install
index 907208d..6fdd003 100644
--- a/dynamic_entity_reference.install
+++ b/dynamic_entity_reference.install
@@ -11,6 +11,25 @@ use Drupal\Core\Entity\Sql\SqlEntityStorageInterface;
 
 /**
  * Changes target_id column to string and creates target_id_int.
+ *
+ * This is an immensely complicated because
+ * \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::updateDedicatedTableSchema()
+ * throws a
+ * \Drupal\Core\Entity\Exception\FieldStorageDefinitionUpdateForbiddenException
+ * when there is a column change even if the change is doable without problem --
+ * like this update here which changes the int target_id column to string. So
+ * this routine needs to find all target_id columns and cast them manually.
+ * After that,
+ * \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::saveFieldSchemaData()
+ * is protected so the field storage schema needs to be saved into the key-value
+ * storage. On top of this, shared tables store the field definition objects in
+ * yet another key-value storage which also needs to be manually kept
+ * up-to-date.
+ *
+ * Finally
+ * \Drupal\dynamic_entity_reference\EventSubscriber\FieldStorageSubscriber::handleEntityType()
+ * is called to add the triggers.
+ *
  */
 function dynamic_entity_reference_update_8001() {
   /** @var \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager */
diff --git a/src/EventSubscriber/FieldStorageSubscriber.php b/src/EventSubscriber/FieldStorageSubscriber.php
index c6e43e6..d09023e 100644
--- a/src/EventSubscriber/FieldStorageSubscriber.php
+++ b/src/EventSubscriber/FieldStorageSubscriber.php
@@ -69,6 +69,13 @@ class FieldStorageSubscriber implements EventSubscriberInterface {
    * {@inheritdoc}
    */
   public static function getSubscribedEvents() {
+    // When enabling a module implementing an entity type,
+    // EntityTypeEvents::CREATE fires and FieldStorageDefinitionEvents::CREATE
+    // does not. On the other hand, when adding a field
+    // to an existing entity type, EntityTypeEvents::UPDATE does not fire but
+    // FieldStorageDefinitionEvents::CREATE does. This is true for saving a
+    // FieldStorageConfig object or enabling a module implementing
+    // hook_entity_base_field_info().
     $events[FieldStorageDefinitionEvents::CREATE][] = ['onFieldStorage', 100];
     $events[EntityTypeEvents::CREATE][] = ['onEntityType', 100];
     return $events;
@@ -113,7 +120,6 @@ class FieldStorageSubscriber implements EventSubscriberInterface {
    */
   public function handleEntityType($entity_type_id, FieldStorageDefinitionInterface $field_storage_definition = NULL) {
     $storage = $this->entityTypeManager->getStorage($entity_type_id);
-    $entity_type = $this->entityTypeManager->getDefinition($entity_type_id);
     $der_fields = $this->entityFieldManager->getFieldMapByFieldType('dynamic_entity_reference');
     if ($field_storage_definition) {
       $der_fields[$entity_type_id][$field_storage_definition->getName()] = TRUE;
diff --git a/src/Storage/IntColumnHandler.php b/src/Storage/IntColumnHandler.php
index 0aff189..925ce34 100644
--- a/src/Storage/IntColumnHandler.php
+++ b/src/Storage/IntColumnHandler.php
@@ -28,7 +28,7 @@ abstract class IntColumnHandler implements IntColumnHandlerInterface {
   }
 
   /**
-   * Check whether all columns exist.
+   * Checks whether all columns exist.
    *
    * @param \Drupal\Core\Database\Schema $schema
    *   The database Schema object for this connection.
@@ -103,9 +103,9 @@ abstract class IntColumnHandler implements IntColumnHandlerInterface {
   }
 
   /**
-   * Create the body of the trigger.
+   * Creates the body of the trigger.
    *
-   * Create a part of the statement to set the value of the integer column to
+   * Creates a part of the statement to set the value of the integer column to
    * the integer value of the string column.
    *
    * @param string $column_int
@@ -116,12 +116,12 @@ abstract class IntColumnHandler implements IntColumnHandlerInterface {
   abstract protected function createBody($column_int, $column);
 
   /**
-   * Actually create the trigger.
+   * Actually creates the trigger.
    *
    * @param string $trigger
    *   The name of the trigger.
    * @param string $op
-   *   Either UPDATE or INSSERT.
+   *   Either UPDATE or INSERT.
    * @param string $prefixed_name
    *   The already prefixed table table.
    * @param string $body
diff --git a/src/Storage/IntColumnHandlerInterface.php b/src/Storage/IntColumnHandlerInterface.php
index a56a73b..c91db36 100644
--- a/src/Storage/IntColumnHandlerInterface.php
+++ b/src/Storage/IntColumnHandlerInterface.php
@@ -8,7 +8,7 @@ namespace Drupal\dynamic_entity_reference\Storage;
 interface IntColumnHandlerInterface {
 
   /**
-   * Create the _int columns and the triggers for them.
+   * Creates the _int columns and the triggers for them.
    *
    * @param string $table
    *   The non-prefix table to operate on.
diff --git a/src/Storage/IntColumnHandlerPostgreSQL.php b/src/Storage/IntColumnHandlerPostgreSQL.php
index 6d36521..7ddb385 100644
--- a/src/Storage/IntColumnHandlerPostgreSQL.php
+++ b/src/Storage/IntColumnHandlerPostgreSQL.php
@@ -101,7 +101,7 @@ class IntColumnHandlerPostgreSQL implements IntColumnHandlerInterface {
   }
 
   /**
-   * Returns an appropriate plpgsql function name.
+   * Returns an appropriate pgsql function name.
    *
    * @param string $table
    *   The name of the table.
