diff --git a/flag.module b/flag.module
index d82c105..427ed09 100644
--- a/flag.module
+++ b/flag.module
@@ -332,85 +332,85 @@ function flag_build_entity_links(array &$links, EntityInterface $entity, array &
  *
  * Handles the 'show_in_links' and 'show_as_field' flag options.
  */
-function flag_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, ?string $view_mode = NULL) {
-  // Don't show on previews.
-  if ($entity->isNew()) {
-    return;
-  }
-
-  $build['#cache']['contexts'][] = 'user.permissions';
-
-  if (empty($build['#cache']['tags'])) {
-    $build['#cache']['tags'] = [];
-  }
-
-  // Get all possible flags for this entity type.
-  $flag_service = \Drupal::service('flag');
-  $flags = $flag_service->getAllFlags($entity->getEntityTypeID(), $entity->bundle());
-
-  foreach ($flags as $flag) {
-    $build['#cache']['tags'] = Cache::mergeTags($build['#cache']['tags'], $flag->getCacheTags());
-
-    // Do not display the flag if disabled.
-    if (!$flag->status()) {
-      continue;
-    }
-
-    /** @var \Drupal\flag\Plugin\Flag\EntityFlagType $flag_type_plugin */
-    $flag_type_plugin = $flag->getFlagTypePlugin();
-
-    // Only add cache key if flag link is displayed.
-    if (!$flag_type_plugin->showAsField() || !$display->getComponent('flag_' . $flag->id())) {
-      continue;
-    }
-
-    $build['flag_' . $flag->id()] = [
-      '#lazy_builder' => ['flag.link_builder:build', [
-        $entity->getEntityTypeId(),
-        $entity->id(),
-        $flag->id(),
-        $view_mode,
-      ],
-      ],
-      '#create_placeholder' => TRUE,
-    ];
-  }
-}
+// function flag_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, ?string $view_mode = NULL) {
+//   // Don't show on previews.
+//   if ($entity->isNew()) {
+//     return;
+//   }
+
+//   $build['#cache']['contexts'][] = 'user.permissions';
+
+//   if (empty($build['#cache']['tags'])) {
+//     $build['#cache']['tags'] = [];
+//   }
+
+//   // Get all possible flags for this entity type.
+//   $flag_service = \Drupal::service('flag');
+//   $flags = $flag_service->getAllFlags($entity->getEntityTypeID(), $entity->bundle());
+
+//   foreach ($flags as $flag) {
+//     $build['#cache']['tags'] = Cache::mergeTags($build['#cache']['tags'], $flag->getCacheTags());
+
+//     // Do not display the flag if disabled.
+//     if (!$flag->status()) {
+//       continue;
+//     }
+
+//     /** @var \Drupal\flag\Plugin\Flag\EntityFlagType $flag_type_plugin */
+//     $flag_type_plugin = $flag->getFlagTypePlugin();
+
+//     // Only add cache key if flag link is displayed.
+//     if (!$flag_type_plugin->showAsField() || !$display->getComponent('flag_' . $flag->id())) {
+//       continue;
+//     }
+
+//     $build['flag_' . $flag->id()] = [
+//       '#lazy_builder' => ['flag.link_builder:build', [
+//         $entity->getEntityTypeId(),
+//         $entity->id(),
+//         $flag->id(),
+//         $view_mode,
+//       ],
+//       ],
+//       '#create_placeholder' => TRUE,
+//     ];
+//   }
+// }
 
 /**
  * Implements hook_entity_build_defaults_alter().
  */
-function flag_entity_build_defaults_alter(array &$build, EntityInterface $entity, $view_mode = 'full', $langcode = NULL) {
-  /** @var \Drupal\flag\FlagService $flag_service */
-  $flag_service = \Drupal::service('flag');
+// function flag_entity_build_defaults_alter(array &$build, EntityInterface $entity, $view_mode = 'full', $langcode = NULL) {
+//   /** @var \Drupal\flag\FlagService $flag_service */
+//   $flag_service = \Drupal::service('flag');
 
-  // Get all possible flags for this entity type.
-  $flags = $flag_service->getAllFlags($entity->getEntityTypeId(), $entity->bundle());
+//   // Get all possible flags for this entity type.
+//   $flags = $flag_service->getAllFlags($entity->getEntityTypeId(), $entity->bundle());
 
-  $no_cache = FALSE;
-  foreach ($flags as $flag) {
-    $flag_type_plugin = $flag->getFlagTypePlugin();
+//   $no_cache = FALSE;
+//   foreach ($flags as $flag) {
+//     $flag_type_plugin = $flag->getFlagTypePlugin();
 
-    // Make sure we're dealing with an entity flag type.
-    if (!$flag_type_plugin instanceof EntityFlagType) {
-      continue;
-    }
+//     // Make sure we're dealing with an entity flag type.
+//     if (!$flag_type_plugin instanceof EntityFlagType) {
+//       continue;
+//     }
 
-    // Only add max-age to entity render array if contextual links flag
-    // display is enabled.
-    if (!$flag_type_plugin->showContextualLink()) {
-      continue;
-    }
+//     // Only add max-age to entity render array if contextual links flag
+//     // display is enabled.
+//     if (!$flag_type_plugin->showContextualLink()) {
+//       continue;
+//     }
 
-    $no_cache = TRUE;
-  }
+//     $no_cache = TRUE;
+//   }
 
-  if ($no_cache) {
-    $build['#cache']['max-age'] = 0;
-  }
+//   if ($no_cache) {
+//     $build['#cache']['max-age'] = 0;
+//   }
 
-  return $build;
-}
+//   return $build;
+// }
 
 /**
  * Implements hook_entity_view_alter().
@@ -418,48 +418,48 @@ function flag_entity_build_defaults_alter(array &$build, EntityInterface $entity
  * Alters node contextual links placeholder id to contain flag metadata, so that
  * contextual links cache considers flags granularity.
  */
-function flag_entity_view_alter(&$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
-  $entity_type = $entity->getEntityTypeId();
-  if (isset($build['#contextual_links'][$entity_type])) {
-    /** @var \Drupal\flag\FlagService $flag_service */
-    $flag_service = \Drupal::service('flag');
-
-    // Get all possible flags for this entity type.
-    $flags = $flag_service->getAllFlags($entity_type, $entity->bundle());
-
-    foreach ($flags as $flag) {
-      $flag_type_plugin = $flag->getFlagTypePlugin();
-
-      // Make sure we're dealing with an entity flag type.
-      if (!$flag_type_plugin instanceof EntityFlagType) {
-        continue;
-      }
-
-      // Only apply metadata to contextual links if plugin is enabled.
-      if (!$flag_type_plugin->showContextualLink()) {
-        continue;
-      }
-
-      $action = 'flag';
-      if ($flag->isFlagged($entity)) {
-        $action = 'unflag';
-      }
-
-      $flag_keys[] = $flag->id() . '-' . $action;
-    }
-
-    if (!empty($flag_keys)) {
-      $build['#contextual_links'][$entity_type]['route_parameters']['view_mode'] = $build['#view_mode'];
-      $build['#contextual_links'][$entity_type]['metadata']['flag_keys'] = implode(',', $flag_keys);
-    }
-  }
-
-  // Enable placeholder on entity links to avoid them being cached with the
-  // entity view mode.
-  if (isset($build['links']['#lazy_builder'])) {
-    $build['links']['#create_placeholder'] = TRUE;
-  }
-}
+// function flag_entity_view_alter(&$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
+//   $entity_type = $entity->getEntityTypeId();
+//   if (isset($build['#contextual_links'][$entity_type])) {
+//     /** @var \Drupal\flag\FlagService $flag_service */
+//     $flag_service = \Drupal::service('flag');
+
+//     // Get all possible flags for this entity type.
+//     $flags = $flag_service->getAllFlags($entity_type, $entity->bundle());
+
+//     foreach ($flags as $flag) {
+//       $flag_type_plugin = $flag->getFlagTypePlugin();
+
+//       // Make sure we're dealing with an entity flag type.
+//       if (!$flag_type_plugin instanceof EntityFlagType) {
+//         continue;
+//       }
+
+//       // Only apply metadata to contextual links if plugin is enabled.
+//       if (!$flag_type_plugin->showContextualLink()) {
+//         continue;
+//       }
+
+//       $action = 'flag';
+//       if ($flag->isFlagged($entity)) {
+//         $action = 'unflag';
+//       }
+
+//       $flag_keys[] = $flag->id() . '-' . $action;
+//     }
+
+//     if (!empty($flag_keys)) {
+//       $build['#contextual_links'][$entity_type]['route_parameters']['view_mode'] = $build['#view_mode'];
+//       $build['#contextual_links'][$entity_type]['metadata']['flag_keys'] = implode(',', $flag_keys);
+//     }
+//   }
+
+//   // Enable placeholder on entity links to avoid them being cached with the
+//   // entity view mode.
+//   if (isset($build['links']['#lazy_builder'])) {
+//     $build['links']['#create_placeholder'] = TRUE;
+//   }
+// }
 
 /**
  * Implements hook_contextual_links_alter().
