diff --git a/README.txt b/README.txt
index 7999028..e876fd9 100755
--- a/README.txt
+++ b/README.txt
@@ -14,24 +14,30 @@ CONTENTS
 
 1. INTRODUCTION
 ---------------
-* Show a message in a Responsive Popup for your first time users. The module doesn't require any JavaScript library but
+* Show a message in a Responsive Popup for your first time users.
+  The module doesn't require any JavaScript library but
   uses pure JavaScript to show a nice Popup.
-* The module stores the browser cookie information about the user so the popup is displayed only once, first time the
-  user visits your website.
+* The module stores the browser cookie information about the user
+  so the popup is displayed only once,first time the user visits your website.
 
 2. INSTALLATION
 ---------------
 * Install as you would normally install a contributed Drupal module. See:
-  https://www.drupal.org/docs/8/extending-drupal-8/installing-contributed-modules-find-import-enable-configure-drupal-8
+  https://www.drupal.org/docs/8/extending-drupal-8
+  /installing-contributed-modules-find-import-enable-configure-drupal-8
   for further information.
 
 3. Usage:
 ---------
-  * Once the module is installed, go to '/admin/config/popup_dialog/popupsettings'.
-  * When enable checkbox is checked, users will be getting the Popup based on cookie.
+  * Once the module is installed, go to
+  '/admin/config/popup_dialog/popupsettings'.
+  * When enable checkbox is checked,
+    users will be getting the Popup based on cookie.
   * Custom Content, Blocks, Views options is there in Category Settings.
-  * You can select existing blocks or views or can create custom content to show in the popup.
-  * Delay amount is the time lag after which the popup will be shown to the user.
+  * You can select existing blocks or views or can create custom content
+    to show in the popup.
+  * Delay amount is the time lag after which the popup will be shown
+    to the user.
   * Top Offset is the vertical spacing of the popup from top.
 
 4. CONFIGURATION
diff --git a/css/popup_dialog.css b/css/popup_dialog.css
index eff6353..1817d9a 100644
--- a/css/popup_dialog.css
+++ b/css/popup_dialog.css
@@ -18,9 +18,9 @@
 }
 
 /*@media all and (min-width: 768px) {*/
-  /*#popup-dialog-window {*/
-    /*width: 30%;*/
-  /*}*/
+/*#popup-dialog-window {*/
+/*width: 30%;*/
+/*}*/
 /*}*/
 
 #popup-header {
diff --git a/popup_dialog.module b/popup_dialog.module
index 197c1cb..8458f97 100644
--- a/popup_dialog.module
+++ b/popup_dialog.module
@@ -5,6 +5,7 @@
  * Contains popup_dialog.module..
  */
 
+use Drupal\block\BlockViewBuilder;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\block\Entity\Block;
 
@@ -16,7 +17,7 @@ function popup_dialog_help($route_name, RouteMatchInterface $route_match) {
     // Main module help for the popup_dialog module.
     case 'help.page.popup_dialog':
       $text = file_get_contents(dirname(__FILE__) . "/README.txt");
-      if (! \Drupal::moduleHandler()->moduleExists('markdown')) {
+      if (!\Drupal::moduleHandler()->moduleExists('markdown')) {
         return '<pre>' . $text . '</pre>';
       }
       else {
@@ -28,6 +29,7 @@ function popup_dialog_help($route_name, RouteMatchInterface $route_match) {
         return $filter->process($text, 'en');
       }
       break;
+
     default:
   }
 }
@@ -44,14 +46,14 @@ function popup_dialog_page_attachments(array &$attachments) {
   $mycookie = \Drupal::request()->cookies->get('FirstUser');
   if ($mycookie != 1 && $enabled == 1) {
     $category_settings = $config->get('category_settings');
-    if($category_settings == 1) {
+    if ($category_settings == 1) {
       $title = $config->get('popup_box_title');
       $body_raw = $config->get('popup_box_body');
       $body = $body_raw['value'];
       $attachments['#attached']['drupalSettings']['title'] = $title;
       $attachments['#attached']['drupalSettings']['body'] = $body;
     }
-    elseif($category_settings == 2) {
+    elseif ($category_settings == 2) {
       $get_plugin_id = $config->get('list_of_blocks');
       $split_get_plugin_id = explode("|", $get_plugin_id);
       $plugin_id = $split_get_plugin_id[0];
@@ -60,7 +62,7 @@ function popup_dialog_page_attachments(array &$attachments) {
       $entityQuery->condition('plugin', $plugin_id);
       $block_id = $entityQuery->execute();
       $theme = \Drupal::service('theme.manager')->getActiveTheme()->getName();
-      if(empty($block_id)) {
+      if (empty($block_id)) {
         $remove_space_title = str_replace(' ', '', $title);
         $title = preg_replace('/[^A-Za-z0-9]/', '', $remove_space_title);
         $block_id = $title . "_" . rand();
@@ -76,15 +78,15 @@ function popup_dialog_page_attachments(array &$attachments) {
         $block = Block::create($values);
         $block->save();
       }
-      if(is_array($block_id)) {
+      if (is_array($block_id)) {
         $block_id = array_keys($block_id)[0];
       }
-      $block_details = \Drupal\block\BlockViewBuilder::lazyBuilder($block_id, 'full');
+      $block_details = BlockViewBuilder::lazyBuilder($block_id, 'full');
       $render = \Drupal::service('renderer')->renderPlain($block_details);
       $attachments['#attached']['drupalSettings']['title'] = $render->__toString();
       $attachments['#attached']['drupalSettings']['body'] = '';
     }
-    elseif($category_settings == 3) {
+    elseif ($category_settings == 3) {
       $get_view = $config->get('list_of_views');
       $arg = $config->get('arguments');
       $exp_view = explode(":", $get_view);
diff --git a/src/Form/PopupSettingsForm.php b/src/Form/PopupSettingsForm.php
index 211acac..18cdf0a 100644
--- a/src/Form/PopupSettingsForm.php
+++ b/src/Form/PopupSettingsForm.php
@@ -50,9 +50,9 @@ class PopupSettingsForm extends ConfigFormBase {
       '#type' => 'radios',
       '#title' => 'Category Settings',
       '#options' => array(
-        '1' => 'Custom Content',
-        '2' => 'Blocks',
-        '3' => 'Views'
+        '1' => $this->t('Custom Content'),
+        '2' => $this->t('Blocks'),
+        '3' => $this->t('Views'),
       ),
       '#default_value' => $category_settings,
     );
@@ -81,16 +81,16 @@ class PopupSettingsForm extends ConfigFormBase {
       '#format' => $config->get('popup_box_body')['format'],
     ];
 
-    //List of blocks
+    // List of blocks.
     $blockManager = \Drupal::service('plugin.manager.block');
     $contextRepository = \Drupal::service('context.repository');
 
-    // Get blocks definition
+    // Get blocks definition.
     $definitions = $blockManager->getDefinitionsForContexts($contextRepository->getAvailableContexts());
     $definitions = $blockManager->getSortedDefinitions($definitions);
     foreach ($definitions as $plugin_id => $plugin_definition) {
       $title = (string) $plugin_definition['admin_label'];
-      $list_of_blocks[$plugin_id.'|'.$title] = (string) $title;
+      $list_of_blocks[$plugin_id . '|' . $title] = (string) $title;
     }
 
     $form['popup_settings']['blocks'] = array(
@@ -110,8 +110,7 @@ class PopupSettingsForm extends ConfigFormBase {
       '#default_value' => $config->get('list_of_blocks'),
     ];
 
-
-    //List of views
+    // List of views.
     $list_of_views = Views::getViewsAsOptions(FALSE, 'all', NULL, FALSE, TRUE);
     $form['popup_settings']['views'] = array(
       '#type' => 'details',
@@ -165,7 +164,7 @@ class PopupSettingsForm extends ConfigFormBase {
   public function submitForm(array &$form, FormStateInterface $form_state) {
 
     parent::submitForm($form, $form_state);
-    $config = \Drupal::config('popup_dialog.settings');
+    /*$config = \Drupal::config('popup_dialog.settings');*/
     $this->config('popup_dialog.settings')
       ->set('popup_enabled', $form_state->getValue('popup_enabled'))
       ->set('category_settings', $form_state->getValue('category_settings'))
@@ -179,4 +178,4 @@ class PopupSettingsForm extends ConfigFormBase {
       ->save();
   }
 
-}
\ No newline at end of file
+}
