diff --git a/acquia_optimize.install b/acquia_optimize.install
index fd82351..9b2efe6 100644
--- a/acquia_optimize.install
+++ b/acquia_optimize.install
@@ -1,5 +1,12 @@
 <?php
 
+/**
+ * @file
+ */
+
+use Drupal\Component\Utility\DeprecationHelper;
+use Drupal\Core\Extension\Requirement\RequirementSeverity;
+
 /**
  * @file
  * Checking whether Acquia Web Governance library has been initiated correctly.
@@ -17,14 +24,14 @@ function acquia_optimize_requirements(string $phase): array {
       $requirements['acquia_optimize'] = [
         'title' => t('Acquia Web Governance'),
         'description' => t('The Acquia Web Governance library is installed and the API is reachable.'),
-        'severity' => REQUIREMENT_OK,
+        'severity' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => RequirementSeverity::OK, fn() => REQUIREMENT_OK),
       ];
     }
     else {
       $requirements['acquia_optimize'] = [
         'title' => t('Acquia Web Governance'),
         'description' => $response['error'],
-        'severity' => REQUIREMENT_ERROR,
+        'severity' => DeprecationHelper::backwardsCompatibleCall(\Drupal::VERSION, '11.2.0', fn() => RequirementSeverity::Error, fn() => REQUIREMENT_ERROR),
       ];
     }
   }
diff --git a/acquia_optimize.module b/acquia_optimize.module
index 0566465..93607ba 100644
--- a/acquia_optimize.module
+++ b/acquia_optimize.module
@@ -5,69 +5,31 @@
  * Defines common functions and hook implementations for Acquia Web Governance.
  */
 
-use Drupal\acquia_optimize\Form\AcquiaOptimizeFormAlter;
-use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\acquia_optimize\Hook\AcquiaOptimizeHooks;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
 
 /**
  * Implements hook_theme().
  */
+#[LegacyHook]
 function acquia_optimize_theme(): array {
-  return [
-    'acquia_optimize_modal' => [
-      'variables' => [
-        'stage' => 'initial',
-        'scan_id' => NULL,
-        'has_error' => FALSE,
-        'error_message' => NULL,
-        'config_url' => NULL,
-        'account_url' => NULL,
-        'account_text' => NULL,
-        'total_issues' => 0,
-        'scan_date' => NULL,
-        'accessibility_issues' => [],
-        'seo_issues' => [],
-        'readability_data' => [],
-        'data_protection_violations' => [],
-        'image_path' => NULL,
-        'scan_result' => [],
-        'status' => NULL,
-      ],
-      'template' => 'acquia-optimize-modal',
-    ],
-    // Individual section templates.
-    'accessibility_section' => [
-      'template' => 'accessibility-section',
-    ],
-    'seo_section' => [
-      'template' => 'seo-section',
-    ],
-    'readability_section' => [
-      'template' => 'readability-section',
-    ],
-    'data_privacy_section' => [
-      'template' => 'data-privacy-section',
-    ],
-  ];
+  return \Drupal::service(AcquiaOptimizeHooks::class)->theme();
 }
 
 /**
  * Implements hook_form_node_form_alter().
  */
+#[LegacyHook]
 function acquia_optimize_form_node_form_alter(&$form, FormStateInterface &$formState) {
-  Drupal::classResolver(AcquiaOptimizeFormAlter::class)->formAlter($form, $formState);
+  \Drupal::service(AcquiaOptimizeHooks::class)->formNodeFormAlter($form, $formState);
 }
 
 /**
  * Implements hook_metatag_route_entity().
  */
+#[LegacyHook]
 function acquia_optimize_metatag_route_entity(RouteMatchInterface $route_match) {
-  // Check if the route is for the node preview.
-  if ($route_match->getRouteName() === 'acquia_optimize.node_preview') {
-    $node_preview = $route_match->getParameter('node_preview');
-    if ($node_preview instanceof EntityInterface) {
-      return $node_preview;
-    }
-  }
+  return \Drupal::service(AcquiaOptimizeHooks::class)->metatagRouteEntity($route_match);
 }
diff --git a/acquia_optimize.services.yml b/acquia_optimize.services.yml
index a0d21a9..1afb7e6 100644
--- a/acquia_optimize.services.yml
+++ b/acquia_optimize.services.yml
@@ -16,3 +16,7 @@ services:
   acquia_optimize.api_client:
     class: Drupal\acquia_optimize\ApiClient
     factory: [ '@acquia_optimize.api_client_factory', 'create' ]
+
+  Drupal\acquia_optimize\Hook\AcquiaOptimizeHooks:
+    class: Drupal\acquia_optimize\Hook\AcquiaOptimizeHooks
+    autowire: true
diff --git a/src/Form/AcquiaOptimizeFormAlter.php b/src/Form/AcquiaOptimizeFormAlter.php
index ed949d1..fc1e9fc 100644
--- a/src/Form/AcquiaOptimizeFormAlter.php
+++ b/src/Form/AcquiaOptimizeFormAlter.php
@@ -310,9 +310,9 @@ class AcquiaOptimizeFormAlter implements ContainerInjectionInterface {
         'width' => 500,
         'height' => 'auto',
         'modal' => TRUE,
-        'dialogClass' => 'acquia-optimize-dialog',
         'resizable' => FALSE,
         'draggable' => TRUE,
+        'classes' => ['ui-dialog' => 'acquia-optimize-dialog'],
       ],
     ));
     return $response;
diff --git a/src/Hook/AcquiaOptimizeHooks.php b/src/Hook/AcquiaOptimizeHooks.php
new file mode 100644
index 0000000..4d97c28
--- /dev/null
+++ b/src/Hook/AcquiaOptimizeHooks.php
@@ -0,0 +1,81 @@
+<?php
+
+namespace Drupal\acquia_optimize\Hook;
+
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\acquia_optimize\Form\AcquiaOptimizeFormAlter;
+use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+
+/**
+ * Hook implementations for acquia_optimize.
+ */
+class AcquiaOptimizeHooks {
+
+  /**
+   * Implements hook_theme().
+   */
+  #[Hook('theme')]
+  public function theme(): array {
+    return [
+      'acquia_optimize_modal' => [
+        'variables' => [
+          'stage' => 'initial',
+          'scan_id' => NULL,
+          'has_error' => FALSE,
+          'error_message' => NULL,
+          'config_url' => NULL,
+          'account_url' => NULL,
+          'account_text' => NULL,
+          'total_issues' => 0,
+          'scan_date' => NULL,
+          'accessibility_issues' => [],
+          'seo_issues' => [],
+          'readability_data' => [],
+          'data_protection_violations' => [],
+          'image_path' => NULL,
+          'scan_result' => [],
+          'status' => NULL,
+        ],
+        'template' => 'acquia-optimize-modal',
+      ],
+          // Individual section templates.
+      'accessibility_section' => [
+        'template' => 'accessibility-section',
+      ],
+      'seo_section' => [
+        'template' => 'seo-section',
+      ],
+      'readability_section' => [
+        'template' => 'readability-section',
+      ],
+      'data_privacy_section' => [
+        'template' => 'data-privacy-section',
+      ],
+    ];
+  }
+
+  /**
+   * Implements hook_form_node_form_alter().
+   */
+  #[Hook('form_node_form_alter')]
+  public function formNodeFormAlter(&$form, FormStateInterface &$formState) {
+    \Drupal::classResolver(AcquiaOptimizeFormAlter::class)->formAlter($form, $formState);
+  }
+
+  /**
+   * Implements hook_metatag_route_entity().
+   */
+  #[Hook('metatag_route_entity')]
+  public function metatagRouteEntity(RouteMatchInterface $route_match) {
+    // Check if the route is for the node preview.
+    if ($route_match->getRouteName() === 'acquia_optimize.node_preview') {
+      $node_preview = $route_match->getParameter('node_preview');
+      if ($node_preview instanceof EntityInterface) {
+        return $node_preview;
+      }
+    }
+  }
+
+}
diff --git a/tests/src/Functional/AdminFormTest.php b/tests/src/Functional/AdminFormTest.php
index 1af0e65..9530577 100644
--- a/tests/src/Functional/AdminFormTest.php
+++ b/tests/src/Functional/AdminFormTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\acquia_optimize\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Tests\BrowserTestBase;
 
 /**
@@ -9,6 +11,8 @@ use Drupal\Tests\BrowserTestBase;
  *
  * @group acquia_optimize
  */
+#[Group('acquia_optimize')]
+#[RunTestsInSeparateProcesses]
 class AdminFormTest extends BrowserTestBase {
 
   /**
diff --git a/tests/src/Functional/CreatePageContentTest.php b/tests/src/Functional/CreatePageContentTest.php
index 1d326f2..2972510 100644
--- a/tests/src/Functional/CreatePageContentTest.php
+++ b/tests/src/Functional/CreatePageContentTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\acquia_optimize\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\Tests\BrowserTestBase;
 
 /**
@@ -9,6 +11,8 @@ use Drupal\Tests\BrowserTestBase;
  *
  * @group acquia_optimize
  */
+#[Group('acquia_optimize')]
+#[RunTestsInSeparateProcesses]
 class CreatePageContentTest extends BrowserTestBase {
 
   /**
diff --git a/tests/src/Functional/OptimizeResultsRenderTest.php b/tests/src/Functional/OptimizeResultsRenderTest.php
index 2b9ebcd..217736e 100644
--- a/tests/src/Functional/OptimizeResultsRenderTest.php
+++ b/tests/src/Functional/OptimizeResultsRenderTest.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Tests\acquia_optimize\Functional;
 
+use PHPUnit\Framework\Attributes\Group;
+use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
 use Drupal\acquia_optimize\Enum\ReadabilityData;
 use Drupal\acquia_optimize\Enum\SeoIssues;
 use Drupal\Core\Url;
@@ -12,6 +14,8 @@ use Drupal\Tests\BrowserTestBase;
  *
  * @group acquia_optimize
  */
+#[Group('acquia_optimize')]
+#[RunTestsInSeparateProcesses]
 class OptimizeResultsRenderTest extends BrowserTestBase {
 
   /**
