diff --git a/src/Form/ClassyParagraphsStyleDeleteForm.php b/src/Form/ClassyParagraphsStyleDeleteForm.php
index dd3ae68..b980653 100644
--- a/src/Form/ClassyParagraphsStyleDeleteForm.php
+++ b/src/Form/ClassyParagraphsStyleDeleteForm.php
@@ -37,7 +37,7 @@ class ClassyParagraphsStyleDeleteForm extends EntityConfirmFormBase {
   public function submitForm(array &$form, FormStateInterface $form_state) {
     $this->entity->delete();
 
-    drupal_set_message(
+    $this->messenger()->addMessage(
       $this->t('Deleted the %label style.',
         [
           '@type' => $this->entity->bundle(),
diff --git a/src/Form/ClassyParagraphsStyleForm.php b/src/Form/ClassyParagraphsStyleForm.php
index 3b3628d..4ef17c1 100644
--- a/src/Form/ClassyParagraphsStyleForm.php
+++ b/src/Form/ClassyParagraphsStyleForm.php
@@ -39,10 +39,10 @@ class ClassyParagraphsStyleForm extends EntityForm {
     );
     
     $form['classes'] = array(
-      '#title' => t('Classes'),
+      '#title' => $this->t('Classes'),
       '#type' => 'textarea',
       '#default_value' => $style->getClasses(),
-      '#description' => t('Enter the CSS classes you want applied. Enter one per-line.'),
+      '#description' => $this->t('Enter the CSS classes you want applied. Enter one per-line.'),
       '#required' => TRUE,
     );
 
@@ -58,13 +58,13 @@ class ClassyParagraphsStyleForm extends EntityForm {
 
     switch ($status) {
       case SAVED_NEW:
-        drupal_set_message($this->t('Created the %label style.', [
+        $this->messenger()->addMessage($this->t('Created the %label style.', [
           '%label' => $style->label(),
         ]));
         break;
 
       default:
-        drupal_set_message($this->t('Saved the %label style.', [
+        $this->messenger()->addMessage($this->t('Saved the %label style.', [
           '%label' => $style->label(),
         ]));
     }
