diff --git a/includes/mailchimp.drush.inc b/includes/mailchimp.drush.inc
index 42fa257..47bfc5b 100644
--- a/includes/mailchimp.drush.inc
+++ b/includes/mailchimp.drush.inc
@@ -25,7 +25,7 @@ function mailchimp_drush_command() {
 
 /**
  * Callback function to run cron.
- * 
+ *
  * @int null $temp_batchsize
  */
 function _mailchimp_cron_batch($temp_batchsize = NULL) {
diff --git a/lib/mailchimp-api-php/src/Mailchimp.php b/lib/mailchimp-api-php/src/Mailchimp.php
index bfc7928..5927d3f 100644
--- a/lib/mailchimp-api-php/src/Mailchimp.php
+++ b/lib/mailchimp-api-php/src/Mailchimp.php
@@ -30,6 +30,7 @@ class Mailchimp {
 
   /**
    * API version.
+   *
    * @var string
    */
   public $version = self::VERSION;
diff --git a/lib/mailchimp-api-php/tests/MailchimpTest.php b/lib/mailchimp-api-php/tests/MailchimpTest.php
index 08d6132..f7a0147 100644
--- a/lib/mailchimp-api-php/tests/MailchimpTest.php
+++ b/lib/mailchimp-api-php/tests/MailchimpTest.php
@@ -23,4 +23,5 @@ class MailchimpTest extends \PHPUnit_Framework_TestCase {
     $this->assertEquals($mc::VERSION, '1.0.3');
     $this->assertEquals(json_decode(file_get_contents('composer.json'))->version, $mc::VERSION);
   }
+
 }
diff --git a/mailchimp.info.yml b/mailchimp.info.yml
index 83035fc..da811b9 100644
--- a/mailchimp.info.yml
+++ b/mailchimp.info.yml
@@ -4,4 +4,3 @@ description: MailChimp email service integration.
 package: MailChimp
 core: 8.x
 configure: mailchimp.admin
-
diff --git a/modules/mailchimp_campaign/mailchimp_campaign.module b/modules/mailchimp_campaign/mailchimp_campaign.module
index 2aa3000..ba17ec8 100644
--- a/modules/mailchimp_campaign/mailchimp_campaign.module
+++ b/modules/mailchimp_campaign/mailchimp_campaign.module
@@ -1,4 +1,5 @@
 <?php
+
 /**
  * @file
  * Module file for mailchimp_campaign.
@@ -69,7 +70,7 @@ function mailchimp_campaign_theme($existing, $type, $theme, $path) {
  *   New or existing campaign ID.
  */
 function mailchimp_campaign_save_campaign($template, $recipients, $settings, $template_id, $campaign_id = NULL) {
-  // Allow alter of template and options used in campaign
+  // Allow alter of template and options used in campaign.
   \Drupal::moduleHandler()->alter('mailchimp_campaign', $recipients, $template, $campaign_id);
 
   // Convert template to content by running through formatter.
@@ -98,12 +99,11 @@ function mailchimp_campaign_save_campaign($template, $recipients, $settings, $te
       'id' => (int) $template_id,
       'sections' => (object) $content['sections'],
     );
-  } else if (isset($content['html'])) {
+  } elseif (isset($content['html'])) {
     // Use HTML as campaign content.
     $content_parameters['html'] = $content['html'];
   }
 
-
   /* @var \Mailchimp\MailchimpCampaigns $mc_campaigns */
   $mc_campaigns = mailchimp_get_api_object('MailchimpCampaigns');
 
@@ -414,7 +414,7 @@ function mailchimp_campaign_get_campaigns($mc_campaign_ids, $reset = FALSE) {
  * @param int $list_id
  *   The list ID.
  * @param string $type
- *   The segment type to get. "static" or "saved"
+ *   The segment type to get. "static" or "saved".
  *
  * @return array
  *   Array of MailChimp list segments.
diff --git a/modules/mailchimp_campaign/src/Controller/MailchimpCampaignController.php b/modules/mailchimp_campaign/src/Controller/MailchimpCampaignController.php
index 4405e07..6d03d3d 100644
--- a/modules/mailchimp_campaign/src/Controller/MailchimpCampaignController.php
+++ b/modules/mailchimp_campaign/src/Controller/MailchimpCampaignController.php
@@ -24,7 +24,7 @@ class MailchimpCampaignController extends ControllerBase {
 
     $content['campaigns_table'] = array(
       '#type' => 'table',
-      '#header' => array(t('Title'), t('Subject'), t('Status'), t('MailChimp List'), t('MailChimp Template'), t('Created'), t('Actions')),
+      '#header' => array($this->t('Title'), $this->t('Subject'), $this->t('Status'), $this->t('MailChimp List'), $this->t('MailChimp Template'), $this->t('Created'), $this->t('Actions')),
       '#empty' => '',
     );
 
@@ -41,17 +41,17 @@ class MailchimpCampaignController extends ControllerBase {
       $send_url = Url::fromRoute('entity.mailchimp_campaign.send', array('mailchimp_campaign' => $campaign_id));
 
       if ($campaign->mc_data->status === "save") {
-        $send_link = Link::fromTextAndUrl(t("Send"), $send_url)->toString();
+        $send_link = Link::fromTextAndUrl($this->t("Send"), $send_url)->toString();
       }
       // "Sent" campaigns were not being cached, so we needed to reload to get
       // the latest status.
       elseif ($campaign->mc_data->status === "sending") {
         $campaigns = mailchimp_campaign_load_multiple(array($campaign_id), TRUE);
         $campaign = $campaigns[$campaign_id];
-        $send_link = t("Sent");
+        $send_link = $this->t("Sent");
       }
       else {
-        $send_link = t("Sent");
+        $send_link = $this->t("Sent");
       }
 
 
@@ -88,7 +88,7 @@ class MailchimpCampaignController extends ControllerBase {
         // Templates are grouped into categories, so we go hunting for our
         // template ID in each category.
         $template_category = array();
-        foreach($templates as $category_name => $template_category) {
+        foreach ($templates as $category_name => $template_category) {
           if (isset($template_category[$campaign->mc_data->settings->template_id])) {
             $category = $category_name;
             break;
@@ -185,15 +185,15 @@ class MailchimpCampaignController extends ControllerBase {
       }
 
       $content['charts'] = array(
-        '#prefix' => '<h2>' . t('Hourly stats for the first 24 hours of the campaign') . '</h2>',
+        '#prefix' => '<h2>' . $this->t('Hourly stats for the first 24 hours of the campaign') . '</h2>',
         '#markup' => '<div id="mailchimp-campaign-chart"></div>',
       );
 
       $content['metrics_table'] = array(
         '#type' => 'table',
-        '#header' => array(t('Key'), t('Value')),
+        '#header' => array($this->t('Key'), $this->t('Value')),
         '#empty' => '',
-        '#prefix' => '<h2>' . t('Other campaign metrics') . '</h2>',
+        '#prefix' => '<h2>' . $this->t('Other campaign metrics') . '</h2>',
       );
 
       $stat_groups = array(
@@ -217,7 +217,7 @@ class MailchimpCampaignController extends ControllerBase {
 
         foreach ($response->{$group} as $key => $value) {
           if ($key == "last_open" && !empty($value)) {
-            $value = \Drupal::service('date.formatter')->format(strtotime($value) ,'custom','F j, Y - g:ia') ;
+            $value = \Drupal::service('date.formatter')->format(strtotime($value) ,'custom','F j, Y - g:ia');
           }
 
           $content['metrics_table'][] = array(
@@ -225,7 +225,7 @@ class MailchimpCampaignController extends ControllerBase {
               '#markup' => $key,
             ),
             'value' => array(
-              '#markup' => $value
+              '#markup' => $value,
             ),
           );
         }
diff --git a/modules/mailchimp_campaign/src/Form/MailchimpCampaignDeleteForm.php b/modules/mailchimp_campaign/src/Form/MailchimpCampaignDeleteForm.php
index c2382dc..18b22d8 100644
--- a/modules/mailchimp_campaign/src/Form/MailchimpCampaignDeleteForm.php
+++ b/modules/mailchimp_campaign/src/Form/MailchimpCampaignDeleteForm.php
@@ -65,4 +65,5 @@ class MailchimpCampaignDeleteForm extends EntityConfirmFormBase {
   public function afterBuild(array $element, FormStateInterface $form_state) {
     return $element;
   }
+
 }
diff --git a/modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php b/modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php
index 75318b1..0ec6092 100644
--- a/modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php
+++ b/modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php
@@ -66,4 +66,5 @@ class MailchimpCampaignSendForm extends EntityConfirmFormBase {
   public function afterBuild(array $element, FormStateInterface $form_state) {
     return $element;
   }
+
 }
diff --git a/modules/mailchimp_campaign/src/MailchimpCampaignAccessControlHandler.php b/modules/mailchimp_campaign/src/MailchimpCampaignAccessControlHandler.php
index 9470bc2..72310a3 100644
--- a/modules/mailchimp_campaign/src/MailchimpCampaignAccessControlHandler.php
+++ b/modules/mailchimp_campaign/src/MailchimpCampaignAccessControlHandler.php
@@ -5,7 +5,6 @@ namespace Drupal\mailchimp_campaign;
 use Drupal\Core\Access\AccessResult;
 use Drupal\Core\Entity\EntityAccessControlHandler;
 use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Language\LanguageInterface;
 use Drupal\Core\Session\AccountInterface;
 
 /**
@@ -25,8 +24,10 @@ class MailchimpCampaignAccessControlHandler extends EntityAccessControlHandler {
       case 'delete':
         return ($status == MAILCHIMP_STATUS_SENT) ? AccessResult::forbidden() : AccessResult::allowed();
         break;
+
       case 'stats':
         return ($status == MAILCHIMP_STATUS_SENT) ? AccessResult::allowed() : AccessResult::forbidden();
+
       default:
         return parent::access($entity, $operation, $account, $return_as_object);
     }
diff --git a/modules/mailchimp_campaign/src/MailchimpCampaignInterface.php b/modules/mailchimp_campaign/src/MailchimpCampaignInterface.php
index 6ca7914..e309545 100644
--- a/modules/mailchimp_campaign/src/MailchimpCampaignInterface.php
+++ b/modules/mailchimp_campaign/src/MailchimpCampaignInterface.php
@@ -10,5 +10,5 @@ use Drupal\Core\Entity\ContentEntityInterface;
  * @ingroup mailchimp_campaign
  */
 interface MailchimpCampaignInterface extends ContentEntityInterface {
-  
+
 }
diff --git a/modules/mailchimp_campaign/src/MailchimpCampaignUninstallValidator.php b/modules/mailchimp_campaign/src/MailchimpCampaignUninstallValidator.php
index 3643516..429fa7b 100644
--- a/modules/mailchimp_campaign/src/MailchimpCampaignUninstallValidator.php
+++ b/modules/mailchimp_campaign/src/MailchimpCampaignUninstallValidator.php
@@ -22,7 +22,6 @@ class MailChimpCampaignUninstallValidator extends FilterUninstallValidator {
 
   /**
    * Deletes config.
-   *
    */
   protected function removeFilterConfig() {
     $mailchimp_campaign_filter = \Drupal::configFactory()->getEditable('filter.format.mailchimp_campaign');
diff --git a/modules/mailchimp_lists/mailchimp_lists.module b/modules/mailchimp_lists/mailchimp_lists.module
index 59a69ec..9b0a6cb 100644
--- a/modules/mailchimp_lists/mailchimp_lists.module
+++ b/modules/mailchimp_lists/mailchimp_lists.module
@@ -204,7 +204,6 @@ function _mailchimp_lists_subscription_has_changed(MailchimpListsSubscription $i
     $original = $entity->original;
 
     // First compare Interest Group settings.
-
     if ($settings['show_interest_groups']) {
       $field_name = $instance->getFieldDefinition()->getName();
 
@@ -234,7 +233,6 @@ function _mailchimp_lists_subscription_has_changed(MailchimpListsSubscription $i
     }
 
     // Compare merge field settings.
-
     foreach ($settings['merge_fields'] as $property) {
       $elements = explode(':', $property);
 
diff --git a/modules/mailchimp_lists/mailchimp_lists.rules.inc b/modules/mailchimp_lists/mailchimp_lists.rules.inc
index fb49a20..2c5ebd7 100644
--- a/modules/mailchimp_lists/mailchimp_lists.rules.inc
+++ b/modules/mailchimp_lists/mailchimp_lists.rules.inc
@@ -1,4 +1,5 @@
 <?php
+
 /**
  * @file
  * Rules integration for the mailchimp lists module.
diff --git a/modules/mailchimp_lists/src/Controller/MailchimpFieldsController.php b/modules/mailchimp_lists/src/Controller/MailchimpFieldsController.php
index ce70a05..4198fd7 100644
--- a/modules/mailchimp_lists/src/Controller/MailchimpFieldsController.php
+++ b/modules/mailchimp_lists/src/Controller/MailchimpFieldsController.php
@@ -18,13 +18,13 @@ class MailchimpFieldsController extends ControllerBase {
     $content = array();
 
     $content['description'] = array(
-      '#markup' => t('This displays a list of all Mailchimp Subscription Fields
+      '#markup' => $this->t('This displays a list of all Mailchimp Subscription Fields
         configured on your system, with a row for each unique Instance of that field.
         To edit each field\'s settings, go to the Entity Bundle\'s configuration
         screen and use the Field UI.
         When entities with MailChimp Subscription Fields are updated,
-        the Merge Variables configured through Field UI are automatically updated if necessary.
-        However, if you have existing subscribers on MailChimp and matching Entities
+        the Merge Variables configured through Field UI are automatically updated
+         if necessary.However, if you have existing subscribers on MailChimp and matching Entities
         on Drupal when you configure your Merge Variables, the existing values
         are not synced automatically, as this could be a slow process.
         You can manually force updates of all existing Merge Values to existing
@@ -35,7 +35,7 @@ class MailchimpFieldsController extends ControllerBase {
 
     $content['fields_table'] = array(
       '#type' => 'table',
-      '#header' => array(t('Entity Type'), t('Bundle'), t('Field'), t('Batch Update'),),
+      '#header' => array($this->t('Entity Type'), $this->t('Bundle'), $this->t('Field'), $this->t('Batch Update'),),
       '#empty' => '',
     );
 
@@ -63,7 +63,7 @@ class MailchimpFieldsController extends ControllerBase {
               '#markup' => $field_name,
             );
             $content['fields_table'][$row_id]['batch_update'] = array(
-              '#markup' => Link::fromTextAndUrl(t('Update Mailchimp Mergevar Values'), $batch_update_url)->toString(),
+              '#markup' => Link::fromTextAndUrl($this->t('Update Mailchimp Mergevar Values'), $batch_update_url)->toString(),
             );
 
             $row_id++;
diff --git a/modules/mailchimp_lists/src/Controller/MailchimpListsController.php b/modules/mailchimp_lists/src/Controller/MailchimpListsController.php
index e9f112c..acb33c6 100644
--- a/modules/mailchimp_lists/src/Controller/MailchimpListsController.php
+++ b/modules/mailchimp_lists/src/Controller/MailchimpListsController.php
@@ -3,7 +3,6 @@
 namespace Drupal\mailchimp_lists\Controller;
 
 use Drupal\Core\Controller\ControllerBase;
-use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Link;
 use Drupal\Core\Url;
 
@@ -20,15 +19,15 @@ class MailchimpListsController extends ControllerBase {
 
     $lists_admin_url = Url::fromUri('https://admin.mailchimp.com/lists/', array('attributes' => array('target' => '_blank')));
 
-    $lists_empty_message = t('You don\'t have any lists configured in your
+    $lists_empty_message = $this->t('You don\'t have any lists configured in your
       MailChimp account, (or you haven\'t configured your API key correctly on
       the Global Settings tab). Head over to @link and create some lists, then
       come back here and click "Refresh lists from MailChimp"',
-      array('@link' => Link::fromTextAndUrl(t('MailChimp'), $lists_admin_url)->toString()));
+      array('@link' => Link::fromTextAndUrl($this->t('MailChimp'), $lists_admin_url)->toString()));
 
     $content['lists_table'] = array(
       '#type' => 'table',
-      '#header' => array(t('Name'), t('Members'), t('Webhook Status'),),
+      '#header' => array($this->t('Name'), $this->t('Members'), $this->t('Webhook Status'),),
       '#empty' => $lists_empty_message,
     );
 
diff --git a/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php b/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php
index 8dfbb5b..4d7965e 100644
--- a/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php
+++ b/modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\mailchimp_lists\Form;
 
-use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Url;
diff --git a/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php b/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php
index e0b8ff8..2233b5d 100644
--- a/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php
+++ b/modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php
@@ -111,7 +111,7 @@ class MailchimpListsSubscribeForm extends FormBase {
       if (is_array($mc_list['intgroups'])) {
         $form[$wrapper_key]['interest_groups'] = array(
           '#type' => 'fieldset',
-          '#title' => isset($settings['interest_groups_label']) ? $settings['interest_groups_label'] : t('Interest Groups'),
+          '#title' => isset($settings['interest_groups_label']) ? $settings['interest_groups_label'] : $this->t('Interest Groups'),
           '#weight' => 100,
           '#states' => array(
             'invisible' => array(
@@ -132,7 +132,7 @@ class MailchimpListsSubscribeForm extends FormBase {
 
     $form['submit'] = array(
       '#type' => 'submit',
-      '#value' => t('Save'),
+      '#value' => $this->t('Save'),
     );
 
     return $form;
diff --git a/modules/mailchimp_lists/src/Form/MailchimpListsUpdateMergevarsForm.php b/modules/mailchimp_lists/src/Form/MailchimpListsUpdateMergevarsForm.php
index 691ad08..079d231 100644
--- a/modules/mailchimp_lists/src/Form/MailchimpListsUpdateMergevarsForm.php
+++ b/modules/mailchimp_lists/src/Form/MailchimpListsUpdateMergevarsForm.php
@@ -2,7 +2,6 @@
 
 namespace Drupal\mailchimp_lists\Form;
 
-use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Url;
diff --git a/modules/mailchimp_lists/src/Form/MailchimpListsWebhookSettingsForm.php b/modules/mailchimp_lists/src/Form/MailchimpListsWebhookSettingsForm.php
index 0f785f9..2d01b53 100644
--- a/modules/mailchimp_lists/src/Form/MailchimpListsWebhookSettingsForm.php
+++ b/modules/mailchimp_lists/src/Form/MailchimpListsWebhookSettingsForm.php
@@ -39,7 +39,7 @@ class MailchimpListsWebhookSettingsForm extends ConfigFormBase {
 
     $form['webhook_events'] = array(
       '#type' => 'fieldset',
-      '#title' => t('Enabled webhook events for the @name list',
+      '#title' => $this->t('Enabled webhook events for the @name list',
         array(
           '@name' => $list->name,
         )),
@@ -111,14 +111,14 @@ class MailchimpListsWebhookSettingsForm extends ConfigFormBase {
     }
 
     if ($result) {
-      drupal_set_message(t('Webhooks for list "%name" have been updated.',
+      drupal_set_message($this->t('Webhooks for list "%name" have been updated.',
         array(
           '%name' => $list->name,
         )
       ));
     }
     else {
-      drupal_set_message(t('Unable to update webhooks for list "%name".',
+      drupal_set_message($this->t('Unable to update webhooks for list "%name".',
         array(
           '%name' => $list->name,
         )
diff --git a/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php b/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php
index c7ead23..222ebf6 100644
--- a/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php
+++ b/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php
@@ -5,6 +5,7 @@ namespace Drupal\mailchimp_lists\Plugin\Field\FieldFormatter;
 use Drupal\Core\Field\FieldItemListInterface;
 use Drupal\Core\Field\FormatterBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\mailchimp_lists\Form\MailchimpListsSubscribeForm;
 
 /**
  * Plugin implementation of the 'mailchimp_lists_field_subscribe' formatter.
@@ -77,7 +78,7 @@ class MailchimpListsFieldSubscribeFormatter extends FormatterBase {
 
     /* @var $item \Drupal\mailchimp_lists\Plugin\Field\FieldType\MailchimpListsSubscription */
     foreach ($items as $delta => $item) {
-      $form = new \Drupal\mailchimp_lists\Form\MailchimpListsSubscribeForm();
+      $form = new MailchimpListsSubscribeForm();
 
       $field_name = $item->getFieldDefinition()->getName();
 
diff --git a/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsSubscribeDefaultFormatter.php b/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsSubscribeDefaultFormatter.php
index f66bd19..2624231 100644
--- a/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsSubscribeDefaultFormatter.php
+++ b/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsSubscribeDefaultFormatter.php
@@ -137,4 +137,5 @@ class MailchimpListsSubscribeDefaultFormatter extends FormatterBase {
 
     return $elements;
   }
+
 }
diff --git a/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php b/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php
index 856644a..8e46f9f 100644
--- a/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php
+++ b/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php
@@ -141,7 +141,7 @@ class MailchimpListsSubscription extends FieldItemBase {
     $element['double_opt_in'] = array(
       '#type' => 'checkbox',
       '#title' => 'Require subscribers to Double Opt-in',
-      '#description' => 'New subscribers will be sent a link with an email they must follow to confirm their subscription.',
+      '#description' => $this->t('New subscribers will be sent a link with an email they must follow to confirm their subscription.'),
       '#default_value' => $this->getSetting('double_opt_in'),
       '#disabled' => $has_data,
     );
@@ -309,7 +309,8 @@ class MailchimpListsSubscription extends FieldItemBase {
     foreach ($properties as $key => $property) {
       $keypath = $prefix ? $prefix . ':' . $key : $key;
       $type = isset($property->type) ? entity_property_extract_innermost_type($property->type) : 'text';
-      $is_entity = ($type == 'entity');// || (bool) entity_get_info($type);
+      // || (bool) entity_get_info($type);
+      $is_entity = ($type == 'entity');
 
       $label = $property->getLabel();
       $bundle = $property->getTargetBundle();
@@ -335,4 +336,5 @@ class MailchimpListsSubscription extends FieldItemBase {
     }
     return $options;
   }
+
 }
diff --git a/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php b/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php
index 9045fc9..9a29370 100644
--- a/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php
+++ b/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php
@@ -48,7 +48,7 @@ class MailchimpListsSelectWidget extends WidgetBase {
     $element['subscribe'] = array(
       '#title' => t('Subscribe'),
       '#type' => 'checkbox',
-      '#default_value' => ($subscribe_default)? TRUE : $this->fieldDefinition->isRequired(),
+      '#default_value' => ($subscribe_default) ? TRUE : $this->fieldDefinition->isRequired(),
       '#required' => $this->fieldDefinition->isRequired(),
       '#disabled' => $this->fieldDefinition->isRequired(),
     );
diff --git a/modules/mailchimp_lists/src/Tests/MailchimpListsSubscriptionTest.php b/modules/mailchimp_lists/src/Tests/MailchimpListsSubscriptionTest.php
index 567bfbf..fad8174 100644
--- a/modules/mailchimp_lists/src/Tests/MailchimpListsSubscriptionTest.php
+++ b/modules/mailchimp_lists/src/Tests/MailchimpListsSubscriptionTest.php
@@ -94,4 +94,5 @@ class MailchimpListsSubscriptionTest extends MailchimpListsTestBase {
 
     $this->assertTrue($unsubscribed, 'Tested user unsubscription.');
   }
+
 }
diff --git a/modules/mailchimp_lists/src/Tests/MailchimpListsTest.php b/modules/mailchimp_lists/src/Tests/MailchimpListsTest.php
index 5ed35f5..c591d3e 100644
--- a/modules/mailchimp_lists/src/Tests/MailchimpListsTest.php
+++ b/modules/mailchimp_lists/src/Tests/MailchimpListsTest.php
@@ -19,7 +19,7 @@ class MailchimpListsTest extends MailchimpListsTestBase {
   /**
    * Tests that a list can be loaded.
    */
-  function testGetList() {
+  public function testGetList() {
     $list_id = '57afe96172';
 
     $list = mailchimp_get_list($list_id);
@@ -31,7 +31,7 @@ class MailchimpListsTest extends MailchimpListsTestBase {
   /**
    * Tests retrieval of a specific set of lists.
    */
-  function testMultiListRetrieval() {
+  public function testMultiListRetrieval() {
     $list_ids = array(
       '57afe96172',
       'f4b7b26b2e',
@@ -51,7 +51,7 @@ class MailchimpListsTest extends MailchimpListsTestBase {
   /**
    * Tests retrieval of mergevars for a set of lists.
    */
-  function testGetMergevars() {
+  public function testGetMergevars() {
     $list_ids = array(
       '57afe96172',
     );
diff --git a/modules/mailchimp_signup/src/Controller/MailchimpSignupController.php b/modules/mailchimp_signup/src/Controller/MailchimpSignupController.php
index bf9b0e8..2b1318e 100644
--- a/modules/mailchimp_signup/src/Controller/MailchimpSignupController.php
+++ b/modules/mailchimp_signup/src/Controller/MailchimpSignupController.php
@@ -3,7 +3,7 @@
 namespace Drupal\mailchimp_signup\Controller;
 
 use Drupal\Core\Controller\ControllerBase;
-use Drupal\mailchimp_signup\Entity\MailchimpSignup;
+use Drupal\mailchimp_signup\Form\MailchimpSignupPageForm;
 
 /**
  * MailChimp Signup controller.
@@ -24,7 +24,7 @@ class MailchimpSignupController extends ControllerBase {
 
     $signup = mailchimp_signup_load($signup_id);
 
-    $form = new \Drupal\mailchimp_signup\Form\MailchimpSignupPageForm();
+    $form = new MailchimpSignupPageForm();
 
     $form_id = 'mailchimp_signup_subscribe_page_' . $signup->id . '_form';
     $form->setFormID($form_id);
diff --git a/modules/mailchimp_signup/src/Controller/MailchimpSignupListBuilder.php b/modules/mailchimp_signup/src/Controller/MailchimpSignupListBuilder.php
index 24f1f50..d459f3f 100644
--- a/modules/mailchimp_signup/src/Controller/MailchimpSignupListBuilder.php
+++ b/modules/mailchimp_signup/src/Controller/MailchimpSignupListBuilder.php
@@ -5,7 +5,6 @@ namespace Drupal\mailchimp_signup\Controller;
 use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Url;
-use Drupal\Core\Link;
 
 /**
  * Provides a listing of MailchimpSignups.
@@ -37,13 +36,13 @@ class MailchimpSignupListBuilder extends ConfigEntityListBuilder {
     $block_mode = [
       '#title' => $this->t('Block'),
       '#type' => 'link',
-      '#url' => $block_url
+      '#url' => $block_url,
     ];
 
     $page_mode = [
       '#title' => $this->t('Page'),
       '#type' => 'link',
-      '#url' => $page_url
+      '#url' => $page_url,
     ];
 
     $modes = NULL;
@@ -53,9 +52,11 @@ class MailchimpSignupListBuilder extends ConfigEntityListBuilder {
       case MAILCHIMP_SIGNUP_BLOCK:
         $modes = $block_mode;
         break;
+
       case MAILCHIMP_SIGNUP_PAGE:
         $modes = $page_mode;
         break;
+
       case MAILCHIMP_SIGNUP_BOTH:
         $modes = array(
           'block_link' => $block_mode,
@@ -65,6 +66,7 @@ class MailchimpSignupListBuilder extends ConfigEntityListBuilder {
           'page_link' => $page_mode
         );
         break;
+
     }
 
     $list_labels = array();
@@ -72,9 +74,9 @@ class MailchimpSignupListBuilder extends ConfigEntityListBuilder {
       if (!empty($list_id)) {
         $list_url = Url::fromUri('https://admin.mailchimp.com/lists/dashboard/overview?id=' . $mc_lists[$list_id]->id, array('attributes' => array('target' => '_blank')));
         $list_link = [
-          '#title' => $this->t($mc_lists[$list_id]->name),
+          '#title' => $mc_lists[$list_id]->name,
           '#type' => 'link',
-          '#url' => $list_url
+          '#url' => $list_url,
         ];
         $list_labels[] = $list_link;
         $list_labels[] = array('#markup' => ', ');
diff --git a/modules/mailchimp_signup/src/Entity/MailchimpSignup.php b/modules/mailchimp_signup/src/Entity/MailchimpSignup.php
index f3f2003..34731c0 100644
--- a/modules/mailchimp_signup/src/Entity/MailchimpSignup.php
+++ b/modules/mailchimp_signup/src/Entity/MailchimpSignup.php
@@ -81,7 +81,7 @@ class MailchimpSignup extends ConfigEntityBase implements MailchimpSignupInterfa
   /**
    * The Signup Form Status.
    *
-   * @var boolean
+   * @var bool
    */
   public $status;
 
diff --git a/modules/mailchimp_signup/src/Form/MailchimpSignupDeleteForm.php b/modules/mailchimp_signup/src/Form/MailchimpSignupDeleteForm.php
index 0258312..7cfd5c5 100644
--- a/modules/mailchimp_signup/src/Form/MailchimpSignupDeleteForm.php
+++ b/modules/mailchimp_signup/src/Form/MailchimpSignupDeleteForm.php
@@ -46,4 +46,5 @@ class MailchimpSignupDeleteForm extends EntityConfirmFormBase {
 
     $form_state->setRedirectUrl($this->getCancelUrl());
   }
+
 }
diff --git a/modules/mailchimp_signup/src/Form/MailchimpSignupForm.php b/modules/mailchimp_signup/src/Form/MailchimpSignupForm.php
index 4cff128..5082efd 100644
--- a/modules/mailchimp_signup/src/Form/MailchimpSignupForm.php
+++ b/modules/mailchimp_signup/src/Form/MailchimpSignupForm.php
@@ -60,7 +60,7 @@ class MailchimpSignupForm extends EntityForm {
         'source' => array('title'),
         'exists' => 'mailchimp_signup_load',
       ),
-      '#description' => t('A unique machine-readable name for this list. It must only contain lowercase letters, numbers, and underscores.'),
+      '#description' => $this->t('A unique machine-readable name for this list. It must only contain lowercase letters, numbers, and underscores.'),
       '#disabled' => !$signup->isNew(),
     );
 
@@ -70,7 +70,7 @@ class MailchimpSignupForm extends EntityForm {
       '#default_value' => isset($signup->settings['description']) ? $signup->settings['description'] : '',
       '#rows' => 2,
       '#maxlength' => 500,
-      '#description' => t('This description will be shown on the signup form below the title. (500 characters or less)'),
+      '#description' => $this->t('This description will be shown on the signup form below the title. (500 characters or less)'),
     );
     $mode_defaults = array(
       MAILCHIMP_SIGNUP_BLOCK => array(MAILCHIMP_SIGNUP_BLOCK),
@@ -82,8 +82,8 @@ class MailchimpSignupForm extends EntityForm {
       '#title' => 'Display Mode',
       '#required' => TRUE,
       '#options' => array(
-        MAILCHIMP_SIGNUP_BLOCK => 'Block',
-        MAILCHIMP_SIGNUP_PAGE => 'Page',
+        MAILCHIMP_SIGNUP_BLOCK => $this->t('Block'),
+        MAILCHIMP_SIGNUP_PAGE => $this->t('Page'),
       ),
       '#default_value' => !empty($signup->mode) ? $mode_defaults[$signup->mode] : array(),
     );
@@ -98,7 +98,7 @@ class MailchimpSignupForm extends EntityForm {
     $form['settings']['path'] = array(
       '#type' => 'textfield',
       '#title' => 'Page URL',
-      '#description' => t('Path to the signup page. ie "newsletter/signup".'),
+      '#description' => $this->t('Path to the signup page. ie "newsletter/signup".'),
       '#default_value' => isset($signup->settings['path']) ? $signup->settings['path'] : NULL,
       '#states' => array(
         // Hide unless needed.
@@ -121,20 +121,20 @@ class MailchimpSignupForm extends EntityForm {
     $form['settings']['confirmation_message'] = array(
       '#type' => 'textfield',
       '#title' => 'Confirmation Message',
-      '#description' => 'This message will appear after a successful submission of this form. Leave blank for no message, but make sure you configure a destination in that case unless you really want to confuse your site visitors.',
+      '#description' => $this->t('This message will appear after a successful submission of this form. Leave blank for no message, but make sure you configure a destination in that case unless you really want to confuse your site visitors.'),
       '#default_value' => isset($signup->settings['confirmation_message']) ? $signup->settings['confirmation_message'] : 'You have been successfully subscribed.',
     );
 
     $form['settings']['destination'] = array(
       '#type' => 'textfield',
       '#title' => 'Form destination page',
-      '#description' => 'Leave blank to stay on the form page.',
+      '#description' => $this->t('Leave blank to stay on the form page.'),
       '#default_value' => isset($signup->settings['destination']) ? $signup->settings['destination'] : NULL,
     );
 
     $form['mc_lists_config'] = array(
       '#type' => 'details',
-      '#title' => t('MailChimp List Selection & Configuration'),
+      '#title' => $this->t('MailChimp List Selection & Configuration'),
       '#open' => TRUE,
     );
     $lists = mailchimp_get_lists();
@@ -145,8 +145,8 @@ class MailchimpSignupForm extends EntityForm {
     $mc_admin_url = Link::fromTextAndUrl('MailChimp', Url::fromUri('https://admin.mailchimp.com', array('attributes' => array('target' => '_blank'))));
     $form['mc_lists_config']['mc_lists'] = array(
       '#type' => 'checkboxes',
-      '#title' => t('MailChimp Lists'),
-      '#description' => t('Select which lists to show on your signup form. You can create additional lists at @MailChimp.',
+      '#title' => $this->t('MailChimp Lists'),
+      '#description' => $this->t('Select which lists to show on your signup form. You can create additional lists at @MailChimp.',
         array('@MailChimp' => $mc_admin_url->toString())),
       '#options' => $options,
       '#default_value' => is_array($signup->mc_lists) ? $signup->mc_lists : array(),
@@ -158,7 +158,7 @@ class MailchimpSignupForm extends EntityForm {
         'effect' => 'fade',
         'progress' => array(
           'type' => 'throbber',
-          'message' => t('Retrieving merge fields for this list.'),
+          'message' => $this->t('Retrieving merge fields for this list.'),
         ),
       ),
     );
@@ -172,8 +172,8 @@ class MailchimpSignupForm extends EntityForm {
     if ($form_state->getValue('mc_lists') || !$signup->isNew()) {
       $form['mc_lists_config']['mergefields'] = array(
         '#type' => 'fieldset',
-        '#title' => t('Merge Field Display'),
-        '#description' => t('Select the merge fields to show on registration forms. Required fields are automatically displayed.'),
+        '#title' => $this->t('Merge Field Display'),
+        '#description' => $this->t('Select the merge fields to show on registration forms. Required fields are automatically displayed.'),
         '#id' => 'mergefields-wrapper',
         '#tree' => TRUE,
         '#weight' => 20,
@@ -196,22 +196,22 @@ class MailchimpSignupForm extends EntityForm {
 
     $form['subscription_settings'] = array(
       '#type' => 'details',
-      '#title' => t('Subscription Settings'),
+      '#title' => $this->t('Subscription Settings'),
       '#open' => TRUE,
     );
 
     $form['subscription_settings']['doublein'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Require subscribers to Double Opt-in'),
-      '#description' => t('New subscribers will be sent a link with an email they must follow to confirm their subscription.'),
+      '#title' => $this->t('Require subscribers to Double Opt-in'),
+      '#description' => $this->t('New subscribers will be sent a link with an email they must follow to confirm their subscription.'),
       '#default_value' => isset($signup->settings['doublein']) ? $signup->settings['doublein'] : FALSE,
     );
 
     $form['subscription_settings']['include_interest_groups'] = array(
       '#type' => 'checkbox',
-      '#title' => t('Include interest groups on subscription form.'),
+      '#title' => $this->t('Include interest groups on subscription form.'),
       '#default_value' => isset($signup->settings['include_interest_groups']) ? $signup->settings['include_interest_groups'] : FALSE,
-      '#description' => t('If set, subscribers will be able to select applicable interest groups on the signup form.'),
+      '#description' => $this->t('If set, subscribers will be able to select applicable interest groups on the signup form.'),
     );
 
     return $form;
@@ -264,8 +264,6 @@ class MailchimpSignupForm extends EntityForm {
     $form_state->setRedirect('mailchimp_signup.admin');
   }
 
-
-
   public function exist($id) {
     $entity = $this->entityQuery->get('mailchimp_signup')
       ->condition('id', $id)
diff --git a/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php b/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php
index 6a8331f..f1259b4 100644
--- a/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php
+++ b/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php
@@ -68,7 +68,7 @@ class MailchimpSignupPageForm extends FormBase {
     $lists_count = (!empty($lists)) ? count($lists) : 0;
 
     if (empty($lists)) {
-      drupal_set_message('The subscription service is currently unavailable. Please try again later.', 'warning');
+      drupal_set_message($this->t('The subscription service is currently unavailable. Please try again later.', 'warning'));
     }
 
     $list = array();
@@ -92,7 +92,7 @@ class MailchimpSignupPageForm extends FormBase {
         if ($this->signup->settings['include_interest_groups'] && isset($list->intgroups)) {
           $form['mailchimp_lists'][$wrapper_key]['interest_groups'] = array(
             '#type' => 'fieldset',
-            '#title' => t('Interest Groups for %label', array('%label' => $list->name)),
+            '#title' => $this->t('Interest Groups for %label', array('%label' => $list->name)),
             '#states' => array(
               'invisible' => array(
                 ':input[name="mailchimp_lists[' . $wrapper_key . '][subscribe]"]' => array('checked' => FALSE),
@@ -147,14 +147,13 @@ class MailchimpSignupPageForm extends FormBase {
 
     // For forms that allow subscribing to multiple lists
     // ensure at least one list has been selected.
-
     // Get the enabled lists for this form.
     $enabled_lists = array_filter($signup->mc_lists);
     if (count($enabled_lists) > 1) {
 
       // Filter the selected lists out of the form values.
       $selected_lists = array_filter($form_state->getValue('mailchimp_lists'),
-        function($list){
+        function ($list) {
           return $list['subscribe'];
         }
       );
@@ -164,7 +163,7 @@ class MailchimpSignupPageForm extends FormBase {
         return;
       }
 
-      $form_state->setErrorByName('mailchimp_lists', t("Please select at least one list to subscribe to."));
+      $form_state->setErrorByName('mailchimp_lists', $this->t("Please select at least one list to subscribe to."));
     }
   }
 
@@ -211,7 +210,7 @@ class MailchimpSignupPageForm extends FormBase {
       $result = mailchimp_subscribe($list_id, $email, $mergevars, $interests, $this->signup->settings['doublein']);
 
       if (empty($result)) {
-        drupal_set_message(t('There was a problem with your newsletter signup to %list.', array(
+        drupal_set_message($this->t('There was a problem with your newsletter signup to %list.', array(
           '%list' => $list_details[$list_id]->name,
         )), 'warning');
       }
diff --git a/modules/mailchimp_signup/src/MailchimpSignupInterface.php b/modules/mailchimp_signup/src/MailchimpSignupInterface.php
index 0dbc357..ca8cdeb 100644
--- a/modules/mailchimp_signup/src/MailchimpSignupInterface.php
+++ b/modules/mailchimp_signup/src/MailchimpSignupInterface.php
@@ -10,5 +10,5 @@ use Drupal\Core\Config\Entity\ConfigEntityInterface;
  * @ingroup mailchimp_signup
  */
 interface MailchimpSignupInterface extends ConfigEntityInterface {
-  
+
 }
diff --git a/src/Controller/MailchimpWebhookController.php b/src/Controller/MailchimpWebhookController.php
index 8f7d748..a10c2a9 100644
--- a/src/Controller/MailchimpWebhookController.php
+++ b/src/Controller/MailchimpWebhookController.php
@@ -3,8 +3,6 @@
 namespace Drupal\mailchimp\Controller;
 
 use Drupal\Core\Controller\ControllerBase;
-use Drupal\Core\Routing\RouteMatchInterface;
-use Drupal\Core\Url;
 
 /**
  * MailChimp Webhook controller.
diff --git a/src/Form/MailchimpAdminSettingsForm.php b/src/Form/MailchimpAdminSettingsForm.php
index 689ca49..1b0ad9d 100644
--- a/src/Form/MailchimpAdminSettingsForm.php
+++ b/src/Form/MailchimpAdminSettingsForm.php
@@ -31,16 +31,16 @@ class MailchimpAdminSettingsForm extends ConfigFormBase {
     $mc_api_url = Url::fromUri('http://admin.mailchimp.com/account/api', array('attributes' => array('target' => '_blank')));
     $form['api_key'] = array(
       '#type' => 'textfield',
-      '#title' => t('Mailchimp API Key'),
+      '#title' => $this->t('Mailchimp API Key'),
       '#required' => TRUE,
       '#default_value' => $config->get('api_key'),
-      '#description' => t('The API key for your MailChimp account. Get or generate a valid API key at your @apilink.',
+      '#description' => $this->t('The API key for your MailChimp account. Get or generate a valid API key at your @apilink.',
         array('@apilink' => \Drupal::l(t('MailChimp API Dashboard'), $mc_api_url))),
     );
     $form['cron'] = array(
       '#type' => 'checkbox',
       '#title' => 'Use batch processing.',
-      '#description' => 'Puts all Mailchimp subscription operations into the cron queue. (Includes subscribe, update, and unsubscribe operations.) <i>Note: May cause confusion if caches are cleared, as requested changes will appear to have failed until cron is run.</i>',
+      '#description' => $this->t('Puts all Mailchimp subscription operations into the cron queue. (Includes subscribe, update, and unsubscribe operations.) <i>Note: May cause confusion if caches are cleared, as requested changes will appear to have failed until cron is run.</i>'),
       '#default_value' => $config->get('cron'),
     );
     $form['batch_limit'] = array(
@@ -62,7 +62,7 @@ class MailchimpAdminSettingsForm extends ConfigFormBase {
         '10000' => '10000',
       ),
       '#title' => t('Batch limit'),
-      '#description' => t('Maximum number of entities to process in a single cron run. Mailchimp suggest keeping this at 5000 or below. <i>This value is also used for batch Merge Variable updates on the Fields tab (part of mailchimp_lists).</i>'),
+      '#description' => $this->t('Maximum number of entities to process in a single cron run. Mailchimp suggest keeping this at 5000 or below. <i>This value is also used for batch Merge Variable updates on the Fields tab (part of mailchimp_lists).</i>'),
       '#default_value' => $config->get('batch_limit'),
     );
 
diff --git a/src/Tests/MailchimpAPITest.php b/src/Tests/MailchimpAPITest.php
index 6b5a24b..86d83a2 100644
--- a/src/Tests/MailchimpAPITest.php
+++ b/src/Tests/MailchimpAPITest.php
@@ -19,7 +19,7 @@ class MailchimpAPITest extends MailchimpTestBase {
   /**
    * Tests that the test API has been loaded.
    */
-  function testAPI() {
+  public function testAPI() {
     $mailchimp_api = mailchimp_get_api_object();
 
     $this->assertNotNull($mailchimp_api);
diff --git a/tests/modules/mailchimp_test/src/MailchimpConfigOverrider.php b/tests/modules/mailchimp_test/src/MailchimpConfigOverrider.php
index 06f577a..5b159bc 100644
--- a/tests/modules/mailchimp_test/src/MailchimpConfigOverrider.php
+++ b/tests/modules/mailchimp_test/src/MailchimpConfigOverrider.php
@@ -79,4 +79,5 @@ class MailchimpConfigOverrider extends ConfigFactoryOverrideBase implements Conf
   public function onConfigSave(ConfigCrudEvent $event) {
     // Not required for test case config.
   }
+
 }
