diff --git a/bootstrap_simple_carousel.install b/bootstrap_simple_carousel.install
index 3121dcc..4ae9035 100644
--- a/bootstrap_simple_carousel.install
+++ b/bootstrap_simple_carousel.install
@@ -109,8 +109,7 @@ function bootstrap_simple_carousel_update_8400() {
   $image_fluid = $config->get('image_fluid');
   if ($image_fluid) {
     $config
-      ->set('image_type', SettingsForm::FLUID_IMAGE_TYPE_ID)
-      ->save(TRUE);
+      ->set('image_type', SettingsForm::FLUID_IMAGE_TYPE_ID)->save();
   }
 }
 
diff --git a/bootstrap_simple_carousel.module b/bootstrap_simple_carousel.module
index 9495739..e802284 100644
--- a/bootstrap_simple_carousel.module
+++ b/bootstrap_simple_carousel.module
@@ -4,59 +4,23 @@
  * @file
  * Defines bootstrap simple carousel.
  */
-
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\bootstrap_simple_carousel\Hook\BootstrapSimpleCarouselHooks;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Url;
 
 /**
  * Implements hook_help().
  */
+#[LegacyHook]
 function bootstrap_simple_carousel_help($route_name, RouteMatchInterface $route_match) {
-  switch ($route_name) {
-    case 'help.page.bootstrap_simple_carousel':
-      $output = '';
-      $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('The module provides the carousel block.  It uses the <a href="https://getbootstrap.com/docs/3.3/javascript/#carousel">bootstrap carousel</a>') . '</p>';
-      $output .= '<h3>' . t('Uses') . '</h3>';
-      $output .= '<dl>';
-      $output .= '<dt>' . t('Settings') . '</dt>';
-      $output .= '<dd>' . t('The <em>settings</em> of the carousel can be configured @carouselService', [
-        'carouselService ' => sprintf('<a href="%s">%s.</a>', Url::fromRoute('bootstrap_simple_carousel.admin_settings'), t('here')),
-      ]) . '</dd>';
-      $output .= '<dt>' . t('interval') . '</dt>';
-      $output .= '<dd>' . t('The amount of time (ms, 1000ms=1s) to delay between automatically cycling an item. If 0, carousel does not cycle automatically. If empty, carousel cycles in default time: 5s.') . '</dd>';
-      $output .= '<dt>' . t('pause') . '</dt>';
-      $output .= '<dd>' . t('If set to "hover", pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. If set to null, hovering over the carousel won\'t pause it.') . '</dd>';
-      $output .= '<dt>' . t('wrap') . '</dt>';
-      $output .= '<dd>' . t('Whether the carousel should cycle continuously or have hard stops.') . '</dd>';
-      $output .= '<dt>' . t('indicators') . '</dt>';
-      $output .= '<dd>' . t('Show indicators, that allow to switch on the separate carousel item') . '</dd>';
-      $output .= '<dt>' . t('controls') . '</dt>';
-      $output .= '<dd>' . t('Show controls, that allow to switch to the next/prev carousel item') . '</dd>';
-      $output .= '<dt>' . t('image_type') . '</dt>';
-      $output .= '<dt>' . t('Setting up the image type such as circle or fluid (bootstrap possibility)') . '</dt>';
-      $output .= '<dt>' . t('image_style') . '</dt>';
-      $output .= '<dd>' . t('Setting up the image style for carousel item') . '</dd>';
-      $output .= '<dt>' . t('assets') . '</dt>';
-      $output .= '<dd>' . t('If you using the non-bootstrap theme, check this setting to include bootstrap js/css files (v.4.6.x)') . '</dd>';
-      $output .= '<dd>' . t('if you will be use the image styles for bootstrap items, you need to set up the same width for the "bootstrap carousel" container') . '</dd>';
-      $output .= '</dl>';
-      return $output;
-  }
+  return \Drupal::service(BootstrapSimpleCarouselHooks::class)->help($route_name, $route_match);
 }
 
 /**
  * Implements hook_theme().
  */
+#[LegacyHook]
 function bootstrap_simple_carousel_theme($existing, $type, $theme, $path): array {
-  return [
-    'bootstrap_simple_carousel_block' => [
-      'variables' => [
-        'title' => '',
-        'items' => NULL,
-        'settings' => NULL,
-      ],
-      'template' => 'bootstrap--simple--carousel--block',
-    ],
-  ];
+  return \Drupal::service(BootstrapSimpleCarouselHooks::class)->theme($existing, $type, $theme, $path);
 }
diff --git a/bootstrap_simple_carousel.services.yml b/bootstrap_simple_carousel.services.yml
index 0363621..03ebde1 100644
--- a/bootstrap_simple_carousel.services.yml
+++ b/bootstrap_simple_carousel.services.yml
@@ -6,3 +6,7 @@ services:
   logger.channel.bootstrap_simple_carousel:
     parent: logger.channel_base
     arguments: [ 'bootstrap_simple_carousel' ]
+
+  Drupal\bootstrap_simple_carousel\Hook\BootstrapSimpleCarouselHooks:
+    class: Drupal\bootstrap_simple_carousel\Hook\BootstrapSimpleCarouselHooks
+    autowire: true
diff --git a/src/Hook/BootstrapSimpleCarouselHooks.php b/src/Hook/BootstrapSimpleCarouselHooks.php
new file mode 100644
index 0000000..2025428
--- /dev/null
+++ b/src/Hook/BootstrapSimpleCarouselHooks.php
@@ -0,0 +1,70 @@
+<?php
+
+namespace Drupal\bootstrap_simple_carousel\Hook;
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Url;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+/**
+ * Hook implementations for bootstrap_simple_carousel.
+ */
+class BootstrapSimpleCarouselHooks
+{
+    use StringTranslationTrait;
+    /**
+     * Implements hook_help().
+     */
+    #[Hook('help')]
+    public function help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match)
+    {
+        switch ($route_name) {
+            case 'help.page.bootstrap_simple_carousel':
+                $output = '';
+                $output .= '<h3>' . $this->t('About') . '</h3>';
+                $output .= '<p>' . $this->t('The module provides the carousel block.  It uses the <a href="https://getbootstrap.com/docs/3.3/javascript/#carousel">bootstrap carousel</a>') . '</p>';
+                $output .= '<h3>' . $this->t('Uses') . '</h3>';
+                $output .= '<dl>';
+                $output .= '<dt>' . $this->t('Settings') . '</dt>';
+                $output .= '<dd>' . $this->t('The <em>settings</em> of the carousel can be configured @carouselService', [
+                    'carouselService ' => sprintf('<a href="%s">%s.</a>', \Drupal\Core\Url::fromRoute('bootstrap_simple_carousel.admin_settings'), $this->t('here')),
+                ]) . '</dd>';
+                $output .= '<dt>' . $this->t('interval') . '</dt>';
+                $output .= '<dd>' . $this->t('The amount of time (ms, 1000ms=1s) to delay between automatically cycling an item. If 0, carousel does not cycle automatically. If empty, carousel cycles in default time: 5s.') . '</dd>';
+                $output .= '<dt>' . $this->t('pause') . '</dt>';
+                $output .= '<dd>' . $this->t('If set to "hover", pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. If set to null, hovering over the carousel won\'t pause it.') . '</dd>';
+                $output .= '<dt>' . $this->t('wrap') . '</dt>';
+                $output .= '<dd>' . $this->t('Whether the carousel should cycle continuously or have hard stops.') . '</dd>';
+                $output .= '<dt>' . $this->t('indicators') . '</dt>';
+                $output .= '<dd>' . $this->t('Show indicators, that allow to switch on the separate carousel item') . '</dd>';
+                $output .= '<dt>' . $this->t('controls') . '</dt>';
+                $output .= '<dd>' . $this->t('Show controls, that allow to switch to the next/prev carousel item') . '</dd>';
+                $output .= '<dt>' . $this->t('image_type') . '</dt>';
+                $output .= '<dt>' . $this->t('Setting up the image type such as circle or fluid (bootstrap possibility)') . '</dt>';
+                $output .= '<dt>' . $this->t('image_style') . '</dt>';
+                $output .= '<dd>' . $this->t('Setting up the image style for carousel item') . '</dd>';
+                $output .= '<dt>' . $this->t('assets') . '</dt>';
+                $output .= '<dd>' . $this->t('If you using the non-bootstrap theme, check this setting to include bootstrap js/css files (v.4.6.x)') . '</dd>';
+                $output .= '<dd>' . $this->t('if you will be use the image styles for bootstrap items, you need to set up the same width for the "bootstrap carousel" container') . '</dd>';
+                $output .= '</dl>';
+                return $output;
+        }
+    }
+    /**
+     * Implements hook_theme().
+     */
+    #[Hook('theme')]
+    public function theme($existing, $type, $theme, $path): array
+    {
+        return [
+            'bootstrap_simple_carousel_block' => [
+                'variables' => [
+                    'title' => '',
+                    'items' => NULL,
+                    'settings' => NULL,
+                ],
+                'template' => 'bootstrap--simple--carousel--block',
+            ],
+        ];
+    }
+}
