diff --git a/src/Form/MothermayiSettingsForm.php b/src/Form/MothermayiSettingsForm.php
index 710d696..e72793d 100644
--- a/src/Form/MothermayiSettingsForm.php
+++ b/src/Form/MothermayiSettingsForm.php
@@ -38,10 +38,6 @@ class MothermayiSettingsForm extends ConfigFormBase {
     }
     $config->save();
 
-    if (method_exists($this, '_submitForm')) {
-      $this->_submitForm($form, $form_state);
-    }
-
     parent::submitForm($form, $form_state);
   }
 
@@ -138,8 +134,6 @@ class MothermayiSettingsForm extends ConfigFormBase {
       '#default_value' => $w,
       '#description' => $this->t('Weight controls location of item on page'),
     ];
-    $form['#submit'][] = '_mothermayi_settings_form_submit';
-    $form['#validate'][] = '_mothermayi_settings_form_validate';
     return parent::buildForm($form, $form_state);
   }
   
@@ -158,13 +152,13 @@ class MothermayiSettingsForm extends ConfigFormBase {
     $up = $form_state->getValue('mothermayi_use_preg');
     if ($theword != '') {
       if ($up == 0 && !ctype_alnum($theword)) {
-        $form_State.setErrorByName('mothermayi_secret_word', $this->t('Secret word must be alphanumeric.'));
+        $form_State->setErrorByName('mothermayi_secret_word', $this->t('Secret word must be alphanumeric.'));
       }
 
       if ($up) {
         // Check that the regular expression is OK.
-        if (preg_match($theword, 'foo') === FALSE) {
-          $form_state.setErrorByName('mothermayi_secret_word', $this->t('Invalid preg.'));
+        if (@preg_match($theword, 'foo') === FALSE) {
+          $form_state->setErrorByName('mothermayi_secret_word', $this->t('Invalid preg.'));
           return;
         }
       }
