diff --git a/modules/sms_track/sms_track.info.yml b/modules/sms_track/sms_track.info.yml
index 512a8c8..0ef4293 100644
--- a/modules/sms_track/sms_track.info.yml
+++ b/modules/sms_track/sms_track.info.yml
@@ -5,5 +5,4 @@ core: 8.x
 package: SMS Framework
 dependencies:
   - sms
-  - sms_user
   - views
diff --git a/modules/sms_track/sms_track.module b/modules/sms_track/sms_track.module
index 71cae66..24ef38a 100644
--- a/modules/sms_track/sms_track.module
+++ b/modules/sms_track/sms_track.module
@@ -28,7 +28,6 @@ function sms_track_help($path, $arg) {
   return $output;
 }
 
-
 /**
  * Implements hook_cron().
  */
@@ -120,12 +119,7 @@ function sms_track_archive_write($dir, $number, $message, array $options = array
   $user = \Drupal::currentUser();
   $archive_dir = \Drupal::config('sms_track.settings')->get('archive_dir');
   // Query the database for the uid of the user that owns the $number
-  if (\Drupal::moduleHandler()->moduleExists("sms_user")) {
-    $remote_user = sms_user_get_uid($number);
-  }
-  else {
-    $remote_user = false;
-  }
+  $remote_user = FALSE;
 
   $reference = $author = $recipient = $status = NULL;
   if ($dir == 0) {
diff --git a/modules/sms_track/src/Tests/SmsTrackArchiveTest.php b/modules/sms_track/src/Tests/SmsTrackArchiveTest.php
deleted file mode 100644
index 6804899..0000000
--- a/modules/sms_track/src/Tests/SmsTrackArchiveTest.php
+++ /dev/null
@@ -1,177 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\sms_track\Tests\SmsTrackArchiveTest.
- */
-
-namespace Drupal\sms_track\Tests;
-
-use Drupal\Component\Utility\Xss;
-use Drupal\sms\Tests\SmsFrameworkWebTestBase;
-
-/**
- * Integration tests for the SMS Framework Track Module.
- *
- * @group SMS Framework
- */
-class SmsTrackArchiveTest extends SmsFrameworkWebTestBase {
-
-  public static $modules = ['sms_track', 'sms_devel'];
-
-  /**
-   * {@inheritdoc}
-   */
-  public function setUp() {
-    parent::setUp();
-    $this->gateway = $this->createMemoryGateway(['skip_queue' => TRUE]);
-    $this->defaultSmsProvider
-      ->setDefaultGateway($this->gateway);
-  }
-
-  /**
-   * Tests recording a message sent from one site user to another.
-   */
-  public function testArchiveWriteForSentMessages() {
-
-    // Create Author User
-    $author = $this->drupalCreateUser(['administer smsframework', 'receive sms', 'edit own sms number', 'view own sms messages', 'view all sms messages']);
-    $this->drupalLogin($author);
-
-    $archiving_settings = array(
-      'archive_dir' => '4',
-    );
-    $this->drupalPostForm('admin/config/smsframework/sms_track', $archiving_settings, t('Save'));
-
-    // Confirm author number.
-    $edit = array('number' => '1234567890');
-    $this->drupalPostForm('user/' . $author->id() . '/mobile', $edit, t('Confirm number'));
-    $this->drupalPostForm(NULL, array(), t('Confirm without code'));
-    $this->assertText('Your mobile phone number has been confirmed.', 'Authors number is confirmed');
-
-    $this->drupalLogout();
-
-    // Create Recipient User
-    $recipient = $this->drupalCreateUser(['administer smsframework', 'receive sms', 'edit own sms number', 'view own sms messages']);
-    $this->drupalLogin($recipient);
-
-    // Confirm recipient number.
-    $edit = array('number' => '0987654321');
-    $this->drupalPostForm('user/' . $recipient->id() . '/mobile', $edit, t('Confirm number'));
-    $this->drupalPostForm(NULL, array(), t('Confirm without code'));
-    $this->assertText('Your mobile phone number has been confirmed.', 'Recipients number is confirmed');
-
-    $this->drupalLogout();
-
-    $this->drupalLogin($author);
-
-    $test_message = array(
-      'number' => '0987654321',
-      'message' => 'Test archiving messages from one registered number to another',
-    );
-
-   $this->drupalPostForm('admin/config/smsframework/devel', $test_message, t('Send Message'));
-   $this->assertResponse(200);
-   $this->assertText('Form submitted ok for number ' . $test_message['number'] . ' and message: ' . $test_message['message'], 'Successfully sent message to recipient with registered number');
-
-    // Test whether author and recipient uids were recorded properly.
-    $this->drupalGet('user/' . $author->id() . '/my-messages');
-    $this->assertTextInXPath('//tbody/tr[1]/td[1]', $test_message['message'],
-      'Message recorded and displayed properly on Author\'s My Messages page.');
-    $this->assertTextInXPath('//tbody/tr[1]/td[2]', $author->getUsername(),
-      'Author\'s name recorded and displayed properly on Author\'s My Messages page.');
-    $this->assertTextInXPath('//tbody/tr[1]/td[3]', $recipient->getUsername(),
-      'Recipient\'s name recorded and displayed properly on Author\'s My Messages page.');
-
-    $this->drupalLogout();
-    $this->drupalLogin($recipient);
-
-    // Test whether author and recipient uids were recorded properly.
-    $this->drupalGet('user/' . $recipient->id() . '/my-messages');
-    $this->assertTextInXPath('//tbody/tr[1]/td[1]', $test_message['message'],
-      'Message recorded and displayed properly on Recipient\'s My Messages page.');
-    $this->assertTextInXPath('//tbody/tr[1]/td[2]', $author->getUsername(),
-      'Author\'s name recorded and displayed properly on Recipient\'s My Messages page.');
-    $this->assertTextInXPath('//tbody/tr[1]/td[3]', $recipient->getUsername(),
-      'Recipient\'s name recorded and displayed properly on Recipient\'s My Messages page.');
-
-    // Test sending messages to unknown number.
-    $test_message = array(
-      'number' => '23456789103',
-      'message' => 'Test archive of message sent to unknown recipient',
-    );
-    $this->drupalPostForm('admin/config/smsframework/devel', $test_message, t('Send Message'));
-    $this->assertResponse(200);
-    $this->assertText('Form submitted ok for number ' . $test_message['number'] . ' and message: ' . $test_message['message'], 'Successfully sent message to unknown recipient');
-
-    $this->drupalGet('user/' . $recipient->id() . '/my-messages');
-    $this->assertTextInXPath('//tbody/tr[1]/td[1]', $test_message['message'],
-      'Message recorded and displayed properly on Author\'s My Messages page.');
-    $this->assertTextInXPath('//tbody/tr[1]/td[2]', $recipient->getUsername(),
-      'Author\'s name recorded and displayed properly on Author\'s My Messages page.');
-    $this->assertTextInXPath('//tbody/tr[1]/td[3]', 'Anonymous (not verified)',
-      'Recipient\'s name recorded and displayed properly on Author\'s My Messages page.');
-
-    // Test receiving messages from unknown number.
-    $test_message = array(
-      'number' => '23456789103',
-      'message' => 'Test archive of message received from unknown recipient',
-    );
-    $this->drupalPostForm('admin/config/smsframework/devel', $test_message, t('Receive Message'));
-    $this->assertResponse(200);
-    $this->assertText('Message received from number ' . $test_message['number'] . ' and message: ' . $test_message['message'], 'Successfully received message from unknown sender');
-
-    $this->drupalGet('user/' . $recipient->id() . '/my-messages');
-    $this->assertTextInXPath('//tbody/tr[1]/td[1]', $test_message['message'],
-      'Message recorded and displayed properly on Recipient\'s My Messages page.');
-    $this->assertTextInXPath('//tbody/tr[1]/td[2]', 'Anonymous (not verified)',
-      'Author\'s name recorded and displayed properly on Recipient\'s My Messages page.');
-    $this->assertTextInXPath('//tbody/tr[1]/td[3]', $recipient->getUsername(),
-      'Recipient\'s name recorded and displayed properly on Recipient\'s My Messages page.');
-
-    // Test that a user can only view their own messages.
-    $this->drupalLogout();
-    $this->drupalGet('user/' . $author->id() . '/my-messages');
-    $this->assertResponse(403, 'Access denied from anonymous user to My Messages page.');
-    $user = $this->drupalCreateUser();
-    $this->drupalLogin($user);
-    $this->drupalGet('user/' . $author->id() . '/my-messages');
-    $this->assertResponse(403, 'Access denied from authenticated user to another user\'s My Messages page.');
-
-    // Test that all messages are available on administrative interface.
-    $this->drupalLogin($author);
-    $this->drupalGet('admin/config/smsframework/sms_track/view');
-    $this->assertEqual(count($this->xpath('//tbody/tr')), 5, 'All messages captured in admin sms_track view');
-  }
-
-  /**
-   * Asserts that some text exists in the current page following the given XPath.
-   *
-   * @param string $xpath
-   *   XPath used to find the text.
-   * @param string $text
-   *   The text that is to be checked.
-   * @param string $message
-   *   (optional) Message to display.
-   * @param string $group
-   *   (optional) The group this message belongs to.
-   *
-   * @return bool
-   *   TRUE on pass, FALSE on fail.
-   */
-  protected function assertTextInXPath($xpath, $text, $message = NULL, $group = 'Other') {
-    if (!$message) {
-      $message = t('"@text" found', array('@text' => $text));
-    }
-    /** @var \SimpleXMLElement $xml_node */
-    foreach ($this->xpath($xpath) as $xml_node) {
-      $xml = Xss::filter($xml_node->asXML(), array());
-      if (strpos($xml, $text) !== FALSE) {
-        return $this->pass($message, $group);
-      }
-    };
-
-    return $this->fail($message, $group);
-  }
-
-}
diff --git a/modules/sms_user/config/install/sms_user.settings.yml b/modules/sms_user/config/install/sms_user.settings.yml
index 34fdaf7..ffa858e 100644
--- a/modules/sms_user/config/install/sms_user.settings.yml
+++ b/modules/sms_user/config/install/sms_user.settings.yml
@@ -1,5 +1,3 @@
-registration_form: 0
-confirmation_message: '[site:name] confirmation code: '
 active_hours:
   status: false
   ranges: []
@@ -20,3 +18,4 @@ account_registration:
       status: false
       message: 'Hi [user:account-name], you will receive an activation email shortly - [site:name]'
       message_failure: 'There was a problem creating your account: [error]'
+
diff --git a/modules/sms_user/config/optional/views.view.sms_user_admin.yml b/modules/sms_user/config/optional/views.view.sms_user_admin.yml
deleted file mode 100644
index ee4d82b..0000000
--- a/modules/sms_user/config/optional/views.view.sms_user_admin.yml
+++ /dev/null
@@ -1,422 +0,0 @@
-langcode: en
-status: false
-dependencies:
-  enforced:
-    module:
-      - sms_user
-  module:
-    - user
-id: sms_user_admin
-label: 'SMS User Admin'
-module: sms_user
-description: 'SMS User Administration'
-tag: 'SMS User'
-base_table: users
-base_field: uid
-core: 8.x
-display:
-  page_1:
-    display_plugin: page
-    id: page_1
-    display_title: Page
-    position: 1
-    display_options:
-      path: admin/config/smsframework/sms_user/admin
-      menu:
-        type: 'default tab'
-        title: 'SMS User Admin'
-        description: ''
-        name: admin
-        weight: '0'
-        context: 0
-      tab_options:
-        type: normal
-        title: 'SMS User'
-        description: ''
-        name: main
-        weight: '0'
-  default:
-    display_plugin: default
-    id: default
-    display_title: Master
-    position: 0
-    display_options:
-      access:
-        type: perm
-        options:
-          perm: 'administer sms user'
-      cache:
-        type: none
-      query:
-        type: views_query
-        options:
-          disable_sql_rewrite: false
-          distinct: false
-          replica: false
-          query_comment: false
-          query_tags: {  }
-      exposed_form:
-        type: basic
-        options:
-          submit_button: Filter
-          reset_button: true
-          reset_button_label: Reset
-          exposed_sorts_label: 'Sort by'
-          expose_sort_order: 1
-          sort_asc_label: Asc
-          sort_desc_label: Desc
-      pager:
-        type: full
-        options:
-          items_per_page: 50
-          offset: 0
-          id: 0
-          total_pages: 0
-          tags:
-            previous: '‹ previous'
-            next: 'next ›'
-            first: '« first'
-            last: 'last »'
-          expose:
-            items_per_page: false
-            items_per_page_label: 'Items per page'
-            items_per_page_options: '5, 10, 25, 50'
-            items_per_page_options_all: false
-            items_per_page_options_all_label: '- All -'
-            offset: false
-            offset_label: Offset
-          quantity: 9
-      style:
-        type: table
-      row:
-        type: fields
-      fields:
-        uid:
-          id: uid
-          table: users
-          field: uid
-          relationship: none
-          group_type: group
-          admin_label: ''
-          label: Uid
-          exclude: 0
-          alter:
-            alter_text: 0
-            text: ''
-            make_link: 0
-            path: ''
-            absolute: 0
-            external: 0
-            replace_spaces: 0
-            path_case: none
-            trim_whitespace: 0
-            alt: ''
-            rel: ''
-            link_class: ''
-            prefix: ''
-            suffix: ''
-            target: ''
-            nl2br: 0
-            max_length: ''
-            word_boundary: 1
-            ellipsis: 1
-            more_link: 0
-            more_link_text: ''
-            more_link_path: ''
-            strip_tags: 0
-            trim: 0
-            preserve_tags: ''
-            html: 0
-          element_type: ''
-          element_class: ''
-          element_label_type: ''
-          element_label_class: ''
-          element_label_colon: 1
-          element_wrapper_type: ''
-          element_wrapper_class: ''
-          element_default_classes: 1
-          empty: ''
-          hide_empty: 0
-          empty_zero: 0
-          hide_alter_empty: 1
-          link_to_user: 0
-          plugin_id: user
-          entity_type: user
-        name:
-          id: name
-          table: users
-          field: name
-          relationship: none
-          group_type: group
-          admin_label: ''
-          label: Username
-          exclude: false
-          alter:
-            alter_text: 0
-            text: ''
-            make_link: 0
-            path: ''
-            absolute: 0
-            external: 0
-            replace_spaces: 0
-            path_case: none
-            trim_whitespace: 0
-            alt: ''
-            rel: ''
-            link_class: ''
-            prefix: ''
-            suffix: ''
-            target: ''
-            nl2br: 0
-            max_length: ''
-            word_boundary: 0
-            ellipsis: 0
-            more_link: 0
-            more_link_text: ''
-            more_link_path: ''
-            strip_tags: 0
-            trim: 0
-            preserve_tags: ''
-            html: 0
-          element_type: ''
-          element_class: ''
-          element_label_type: ''
-          element_label_class: ''
-          element_label_colon: 1
-          element_wrapper_type: ''
-          element_wrapper_class: ''
-          element_default_classes: 1
-          empty: ''
-          hide_empty: 0
-          empty_zero: 0
-          hide_alter_empty: 1
-          link_to_user: 1
-          overwrite_anonymous: 0
-          anonymous_text: ''
-          format_username: true
-          plugin_id: user_name
-          entity_type: user
-          entity_field: name
-        number:
-          id: number
-          table: sms_user
-          field: number
-          relationship: none
-          group_type: group
-          admin_label: ''
-          label: Mobile
-          exclude: 0
-          alter:
-            alter_text: 0
-            text: ''
-            make_link: 0
-            path: ''
-            absolute: 0
-            external: 0
-            replace_spaces: 0
-            path_case: none
-            trim_whitespace: 0
-            alt: ''
-            rel: ''
-            link_class: ''
-            prefix: ''
-            suffix: ''
-            target: ''
-            nl2br: 0
-            max_length: ''
-            word_boundary: 1
-            ellipsis: 1
-            more_link: 0
-            more_link_text: ''
-            more_link_path: ''
-            strip_tags: 0
-            trim: 0
-            preserve_tags: ''
-            html: 0
-          element_type: ''
-          element_class: ''
-          element_label_type: ''
-          element_label_class: ''
-          element_label_colon: 1
-          element_wrapper_type: ''
-          element_wrapper_class: ''
-          element_default_classes: 1
-          empty: ''
-          hide_empty: 0
-          empty_zero: 0
-          hide_alter_empty: 1
-          plugin_id: sms_number
-        status:
-          id: status
-          table: sms_user
-          field: status
-          relationship: none
-          group_type: group
-          admin_label: ''
-          label: 'Mobile Status'
-          exclude: 0
-          alter:
-            alter_text: 0
-            text: ''
-            make_link: 0
-            path: ''
-            absolute: 0
-            external: 0
-            replace_spaces: 0
-            path_case: none
-            trim_whitespace: 0
-            alt: ''
-            rel: ''
-            link_class: ''
-            prefix: ''
-            suffix: ''
-            target: ''
-            nl2br: 0
-            max_length: ''
-            word_boundary: 1
-            ellipsis: 1
-            more_link: 0
-            more_link_text: ''
-            more_link_path: ''
-            strip_tags: 0
-            trim: 0
-            preserve_tags: ''
-            html: 0
-          element_type: ''
-          element_class: ''
-          element_label_type: ''
-          element_label_class: ''
-          element_label_colon: 1
-          element_wrapper_type: ''
-          element_wrapper_class: ''
-          element_default_classes: 1
-          empty: ''
-          hide_empty: 0
-          empty_zero: 0
-          hide_alter_empty: 1
-          plugin_id: sms_status
-        user_bulk_form:
-          id: user_bulk_form
-          table: users
-          field: user_bulk_form
-          relationship: none
-          group_type: group
-          admin_label: ''
-          label: 'Bulk update'
-          exclude: false
-          alter:
-            alter_text: false
-            text: ''
-            make_link: false
-            path: ''
-            absolute: false
-            external: false
-            replace_spaces: false
-            path_case: none
-            trim_whitespace: false
-            alt: ''
-            rel: ''
-            link_class: ''
-            prefix: ''
-            suffix: ''
-            target: ''
-            nl2br: false
-            max_length: ''
-            word_boundary: true
-            ellipsis: true
-            more_link: false
-            more_link_text: ''
-            more_link_path: ''
-            strip_tags: false
-            trim: false
-            preserve_tags: ''
-            html: false
-          element_type: ''
-          element_class: ''
-          element_label_type: ''
-          element_label_class: ''
-          element_label_colon: true
-          element_wrapper_type: ''
-          element_wrapper_class: ''
-          element_default_classes: true
-          empty: ''
-          hide_empty: false
-          empty_zero: false
-          hide_alter_empty: true
-          action_title: 'With selection'
-          include_exclude: exclude
-          selected_actions: {  }
-          entity_type: user
-          plugin_id: user_bulk_form
-      filters:
-        status_1:
-          id: status_1
-          table: sms_user
-          field: status
-          relationship: none
-          group_type: group
-          admin_label: ''
-          operator: in
-          value:
-            2: '2'
-          group: 1
-          exposed: false
-          expose:
-            operator_id: false
-            label: ''
-            description: ''
-            use_operator: false
-            operator: ''
-            identifier: ''
-            required: false
-            remember: false
-            multiple: false
-            remember_roles:
-              authenticated: authenticated
-            reduce: false
-          is_grouped: false
-          group_info:
-            label: ''
-            description: ''
-            identifier: ''
-            optional: true
-            widget: select
-            multiple: false
-            remember: 0
-            default_group: All
-            default_group_multiple: {  }
-            group_items: {  }
-          plugin_id: sms_status
-      sorts: {  }
-      title: ''
-      header: {  }
-      footer: {  }
-      empty: {  }
-      relationships: {  }
-      arguments: {  }
-      filter_groups:
-        operator: AND
-        groups:
-          1: AND
-      display_extenders: {  }
-  page_1:
-    display_plugin: page
-    id: page_1
-    display_title: Page
-    position: 1
-    display_options:
-      path: admin/config/smsframework/sms_user/admin
-      menu:
-        type: 'default tab'
-        title: 'SMS User Admin'
-        description: ''
-        menu_name: admin
-        weight: 0
-        context: '0'
-      tab_options:
-        type: normal
-        title: 'SMS User'
-        description: ''
-        menu_name: main
-        weight: 0
-      display_extenders: {  }
diff --git a/modules/sms_user/config/schema/sms_user.schema.yml b/modules/sms_user/config/schema/sms_user.schema.yml
index 20def7f..ce46c64 100644
--- a/modules/sms_user/config/schema/sms_user.schema.yml
+++ b/modules/sms_user/config/schema/sms_user.schema.yml
@@ -4,12 +4,6 @@ sms_user.settings:
   type: config_object
   label: 'SMS User settings'
   mapping:
-    registration_form:
-      type: integer
-      label: 'Show mobile fields during user registration'
-    confirmation_message:
-      type: string
-      label: 'Confirmation message format'
     active_hours:
       type: mapping
       mapping:
diff --git a/modules/sms_user/config/schema/sms_user.views.schema.yml b/modules/sms_user/config/schema/sms_user.views.schema.yml
deleted file mode 100644
index 2410089..0000000
--- a/modules/sms_user/config/schema/sms_user.views.schema.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-views.field.sms_number:
-  type: views_field
-  label: "The user's registered sms number"
-
-views.field.sms_status:
-  type: views_field
-  label: 'The confirmation status of the number'
-
-views.filter.sms_status:
-  type: views.filter.in_operator
-  label: 'The confirmation status of the number'
diff --git a/modules/sms_user/sms_user.actions.inc b/modules/sms_user/sms_user.actions.inc
deleted file mode 100644
index 6c4afb6..0000000
--- a/modules/sms_user/sms_user.actions.inc
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-/**
- * @file
- * SMS User Action Implementation.
- *
- */
-
-use Drupal\sms\Message\SmsMessage;
-
-/**
- * Implements hook_action_info().
- */
-function sms_user_action_info() {
-  $info['sms_user_send_sms_action'] = array(
-    'type' => 'user',
-    'label' => t('Send SMS to Users'),
-    'configurable' => TRUE,
-  );
-  return $info;
-}
-
-/**
- * @todo Please document this function.
- * @see http://drupal.org/node/1354
- */
-function sms_user_send_sms_action(&$user, $context) {
-  $message = $context['sms_text'];
-  /** @var \Drupal\sms\Provider\PhoneNumberProviderInterface $phone_number_provider */
-  $phone_number_provider = \Drupal::service('sms.phone_number');
-  $sms_message = new SmsMessage();
-  $sms_message->setMessage($message);
-  $phone_number_provider->sendMessage($user, $sms_message);
-}
-
-/**
- * Form for 'send sms' action.
- *
- * @param array $context
- * @return $form
- */
-function sms_user_send_sms_action_form($context) {
-  $limit = variable_get('sms_user_max_chars', SMS_USER_MAX_CHARS);
-  drupal_add_js(drupal_get_path('module', 'sms_user') . '/sms_user.js');
-
-  $form['sms_text'] = array(
-    '#type' => 'textarea',
-    '#title' => 'SMS Text',
-    '#required' => TRUE,
-  );
-  $form['sms_limit'] = array(
-    '#type' => 'markup',
-    '#prefix' => '<div id="keystrokes" class="description" limit="' . $limit . '"><span></span>',
-    '#value' => t('@max chars max', array('@max' => $limit)),
-    '#suffix' => '</div>',
-  );
-
-  return $form;
-}
-
-/**
- * @todo Please document this function.
- * @see http://drupal.org/node/1354
- */
-function sms_user_send_sms_action_validate($form, $form_state) {
-  $sms_text = $form_state['values']['sms_text'];
-  if (empty($sms_text)) {
-    form_set_error('sms_text', t('This field is required'));
-  }
-  $length = drupal_strlen($sms_text);
-  if ($length > variable_get('sms_user_max_chars', SMS_USER_MAX_CHARS)) {
-    $error = t('SMS too long: (@text) [length=@len]',
-        array('@text' => $sms_text, '@len' => $length));
-    form_set_error('sms_text', $error);
-  }
-}
-
-/**
- * Custom submit handler when creating a new action for sending an sms.
- *
- * @param array $form
- * @param array $form_state
- * @return array
- */
-function sms_user_send_sms_action_submit($form, $form_state) {
-  $context['sms_text'] = $form_state['values']['sms_text'];
-  return $context;
-}
diff --git a/modules/sms_user/sms_user.install b/modules/sms_user/sms_user.install
deleted file mode 100644
index 27302f1..0000000
--- a/modules/sms_user/sms_user.install
+++ /dev/null
@@ -1,145 +0,0 @@
-<?php
-/**
- * @file
- * Install, update and uninstall functions for the sms_user module.
- *
- */
-
-/**
- * Implements hook_schema().
- */
-function sms_user_schema() {
-  $schema['sms_user'] = array(
-    'fields' => array(
-      'uid' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-      ),
-      'number' => array(
-        'type' => 'varchar',
-        'not null' => TRUE,
-        'length' => 32,
-      ),
-      'status' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-      ),
-      'code' => array(
-        'type' => 'varchar',
-        'not null' => FALSE,
-        'length' => 16,
-        'default' => ''
-      ),
-      'gateway' => array(
-        'type' => 'text',
-        'serialize' => TRUE,
-      ),
-      'sleep_enabled' => array(
-        'type' => 'int',
-        'size' => 'tiny',
-        'unsigned' => TRUE,
-        'default' => 0,
-        'not null' => TRUE,
-      ),
-      'sleep_start_time' => array(
-        'type' => 'int',
-        'size' => 'tiny',
-        'unsigned' => TRUE,
-        'default' => 0,
-        'not null' => FALSE,
-      ),
-      'sleep_end_time' => array(
-        'type' => 'int',
-        'size' => 'tiny',
-        'unsigned' => TRUE,
-        'default' => 0,
-        'not null' => FALSE,
-      ),
-      'opted_out' => array(
-        'type' => 'int',
-        'size' => 'tiny',
-        'unsigned' => TRUE,
-        'default' => 0,
-        'not null' => TRUE,
-      ),
-    ),
-    'primary key' => array('number'),
-    'indexes' => array('uid' => array('uid')),
-  );
-
-  return $schema;
-}
-
-/**
- * Implements hook_update().
- *
- * Drop the now dead delta field, and change primary key to number.
- */
-function sms_user_update_1() {
-  $ret = array();
-  db_drop_primary_key('sms_user');
-  db_add_primary_key('sms_user', array('number'));
-  db_add_index('sms_user', 'uid', array('uid'));
-  db_drop_field('sms_user', 'delta');
-  // hook_update_N() no longer returns a $ret array. Instead, return
-  // nothing or a translated string indicating the update ran successfully.
-  // See http://drupal.org/node/224333#update_sql.
-  return t('TODO Add a descriptive string here to show in the UI.') /* $ret */;
-}
-
-function sms_user_update_7000() {
-  // update code field to NOT NULL
-}
-
-/**
- * Add sleep_enabled, sleep_start_time, sleep_end_time fields to {sms_user}
- * table.
- */
-function sms_user_update_7003() {
-  $spec = array(
-      'sleep_enabled' => array(
-        'type' => 'int',
-        'size' => 'tiny',
-        'unsigned' => TRUE,
-        'default' => 0,
-        'not null' => TRUE,
-      ),
-      'sleep_start_time' => array(
-        'type' => 'int',
-        'size' => 'tiny',
-        'unsigned' => TRUE,
-        'default' => 0,
-        'not null' => FALSE,
-      ),
-      'sleep_end_time' => array(
-        'type' => 'int',
-        'size' => 'tiny',
-        'unsigned' => TRUE,
-        'default' => 0,
-        'not null' => FALSE,
-      ),
-    );
-  foreach ($spec as $key => $value) {
-    db_add_field('sms_user', $key, $value);
-  }
-}
-
-/**
- * Add sms_user_opt_out field to {sms_user} table.
- */
-function sms_user_update_7004() {
-  $spec = array(
-    'sms_user_opt_out' => array(
-      'type' => 'int',
-      'size' => 'tiny',
-      'unsigned' => TRUE,
-      'default' => 0,
-      'not null' => TRUE,
-    ),
-  );
-  foreach ($spec as $key=>$value) {
-    db_add_field('sms_user', $key, $value);
-  }
-}
diff --git a/modules/sms_user/sms_user.js b/modules/sms_user/sms_user.js
deleted file mode 100644
index f6d9a08..0000000
--- a/modules/sms_user/sms_user.js
+++ /dev/null
@@ -1,12 +0,0 @@
-(function ($) {
-  Drupal.behaviors.smsUser = {
-    attach: function($context) {
-      var $smstext = $('#edit-sms-text');
-      var $keystrokes = $('#keystrokes span').eq(0).text('0 / ');
-      $smstext.bind('keyup', function(e) {
-        var chars = $smstext.val().length;
-        $keystrokes.text(chars + ' / ');
-      });
-    }
-  };
-}(jQuery));
\ No newline at end of file
diff --git a/modules/sms_user/sms_user.links.task.yml b/modules/sms_user/sms_user.links.task.yml
deleted file mode 100644
index eeb4e27..0000000
--- a/modules/sms_user/sms_user.links.task.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-sms_user.user_edit:
-  route_name: sms_user.user_edit
-  base_route: entity.user.canonical
-  title: Mobile
diff --git a/modules/sms_user/sms_user.module b/modules/sms_user/sms_user.module
index b210800..01793df 100644
--- a/modules/sms_user/sms_user.module
+++ b/modules/sms_user/sms_user.module
@@ -7,26 +7,8 @@
 
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\sms\Entity\SmsMessageInterface as SmsMessageEntityInterface;
-use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Session\AccountInterface;
-use Drupal\Core\Url;
-use Drupal\sms\Plugin\SmsGatewayPluginInterface;
 use Drupal\sms\Message\SmsMessageInterface;
-use Drupal\sms\Entity\SmsGatewayInterface;
-use Drupal\user\Entity\User;
-use Drupal\user\UserInterface;
-use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
 use Drupal\sms\Entity\SmsMessage as SmsMessageEntity;
-use Drupal\sms\Message\SmsMessage;
-
-define('SMS_USER_BLOCKED', 0);
-define('SMS_USER_PENDING', 1);
-define('SMS_USER_CONFIRMED', 2);
-define('SMS_USER_SMS_REGISTERED', 3);
-define('SMS_USER_MAX_CHARS', 140);
-
-// require_once 'sms_user.actions.inc';
-// require_once 'sms_user.rules.inc';
 
 /**
  * Implements hook_entity_presave().
@@ -41,506 +23,7 @@ function sms_user_entity_presave(EntityInterface $entity) {
 }
 
 /**
- * Returns the uid of the owner of a number.
- *
- * @param string $number
- *   The phone number whose owner is sought.
- * @param int $status
- *   The verification status of the number.
- *
- * @return int
- *   The uid of the owner of the number.
- */
-function sms_user_get_uid($number, $status = NULL) {
-  $query = db_select('sms_user', 'u')
-    ->fields('u', array('uid'))
-    ->condition('number', $number);
-
-  if (isset($status)) {
-    $query->condition('status', $status);
-  }
-
-  return $query->execute()->fetchField();
-}
-
-/**
- * Implements hook_sms_send_process().
- *
- * Aborts sending if the user has opted out or is in sleep mode.
- */
-function sms_user_sms_send_process($step, SmsMessageInterface $sms, \Drupal\sms\Message\SmsMessageResultInterface $result = NULL) {
-  if ($step == 'pre process') {
-    if (\Drupal::config('sms_user.settings')->get('enable_sleep', 1) && $uid = sms_user_get_uid($sms->getRecipients()[0])) {
-      $account = User::load($uid);
-
-      if (_sms_user_opted_out($account)) {
-        \Drupal::logger('sms_user')
-          ->info('Message was not sent to @user because user opted out.', array('@user' => $account->getUsername()));
-        return FALSE;
-      }
-      else {
-        if (_sms_user_sleep_active($account)) {
-          \Drupal::logger('sms_user')
-            ->info('Message was not sent to @user due to sleep settings.', array('@user' => $account->getUsername()));
-          return FALSE;
-        }
-      }
-    }
-  }
-}
-
-/**
- * Returns the user's sleep status.
- *
- * @param \Drupal\Core\Session\AccountInterface $account
- *   The user account object.
- *
- * @return bool
- *   TRUE if its currently the user's sleep time.
- */
-function _sms_user_sleep_active(AccountInterface $account) {
-  // If the user has a timezone set in his account get the time in that timezone.
-  $config = \Drupal::config('system.date');
-  if ($config->get('timezone.user.configurable') && (!empty($account->timezone_name))) {
-    $timezone = new DateTimeZone($account->timezone);
-  }
-  else {
-    $default = $config->get('timezone.default');
-    $timezonestring = empty($default) ? 'UTC' : $default;
-    $timezone = new DateTimeZone($timezonestring);
-  }
-  $date = new DateTime();
-  $date->setTimezone( $timezone );
-  $current_hour = date('G');
-
-  // User has individual settings, which will always override globals
-  if (!empty($account->sms_user['sleep_enabled'])) {
-    $start = $account->sms_user['sleep_start_time'];
-    $end = $account->sms_user['sleep_end_time'];
-  }
-  else {
-    $config = \Drupal::config('sms_user.settings');
-    $start = $config->get('sleep_start_time');
-    $end = $config->get('sleep_end_time');
-  }
-
-  // If values are not set, send the message
-  if (($start == 0) && ($end == 0)) {
-    return FALSE;
-  }
-
-  // Do 2 checks: one is where start < end
-  // two is where end < start (like from 22 to 7)
-
-  if ($start < $end) {
-    if ($start <= $current_hour && $end > $current_hour) {
-      return TRUE;
-    }
-  }
-  if ($end < $start) {
-    // Current time is between start and midnight.
-    if ($start <= $current_hour) {
-      return TRUE;
-    }
-    // Current time is between midnight and end.
-    if ($current_hour < $end) {
-      return TRUE;
-    }
-  }
-
-  return FALSE;
-}
-
-/**
- * Checks if user opted out of sms messages from the site.
- *
- * @param \Drupal\Core\Session\AccountInterface $account
- *   The user account object.
- *
- * @return bool
- *   TRUE if the user chose to opt out of messages from the site indefinitely.
- */
-function _sms_user_opted_out(AccountInterface $account) {
-  // If the users sms_user_opt_out field is set, return true.
-  if (\Drupal::config('sms_user.settings')->get('allow_opt_out') && !empty($account->sms_user['opted_out'])) {
-    return TRUE;
-  }
-  return FALSE;
-
-}
-
-/**
- * Menu callback for user profile settings form.
- *
- * Provides the forms for adding and confirming a user's mobile number.
- *
- * @param \Drupal\Core\Session\AccountInterface $user
- *   The users whose settings are to be configured.
- *
- * @return string
- *   Rendered HTML for the account settings form.
- */
-function sms_user_settings(AccountInterface $user) {
-  // We have to use the argument $user so that 'user.update' access check
-  // will load the correct user entity for checking.
-  $output = array();
-  switch (isset($user->sms_user) ? $user->sms_user['status'] : 0) {
-    case 0:
-      $output = \Drupal::formBuilder()->getForm('\Drupal\sms_user\Form\SettingsAddForm', $user);
-      break;
-    case SMS_USER_PENDING:
-      $output = \Drupal::formBuilder()->getForm('\Drupal\sms_user\Form\SettingsConfirmForm', $user);
-      break;
-    case SMS_USER_CONFIRMED:
-    case SMS_USER_SMS_REGISTERED:
-      $output = \Drupal::formBuilder()->getForm('\Drupal\sms_user\Form\SettingsResetForm', $user);
-      break;
-  }
-
-  if (\Drupal::config('sms_user.settings')->get('enable_sleep') && $user->sms_user['number'] && $user->sms_user['status'] == SMS_USER_CONFIRMED) {
-    $output2 = array();
-    $output2['phoneform'] = $output;
-    $output2['sleepform'] = \Drupal::formBuilder()->getForm('\Drupal\sms_user\Form\SettingsSleepForm', $user);
-    $output = $output2;
-  }
-
-  if (\Drupal::config('sms_user.settings')->get('allow_opt_out') && $user->sms_user['number'] && $user->sms_user['status'] == SMS_USER_CONFIRMED) {
-    $output['opt_out_form'] = \Drupal::formBuilder()->getForm('\Drupal\sms_user\Form\SettingsOptOutForm', $user);
-  }
-
-  return $output;
-}
-
-/**
- * Sends confirmation code to user for number verification.
- *
- * @param object $account
- *   The user account object.
- * @param string $number
- *   The number to which to send the confirmation code.
- * @param array $options
- *   An array of options.
- *
- * @see \Drupal\sms_user\Form\SettingsAddForm::submitForm()
- */
-function sms_user_send_confirmation($account, $number, array $options) {
-  $code = rand(1000, 9999);
-  $number = sms_formatter($number);
-  $data = array(
-    'number' => $number,
-    'status' => SMS_USER_PENDING,
-    'code' => $code,
-    // @todo change 'gateway' key to options.
-    'gateway' => $options,
-  );
-
-  $account->sms_user = $data;
-  $account->save();
-
-  $sms_message = (new SmsMessage())
-    ->addRecipient($number)
-    ->setMessage(_sms_user_confirm_message($code));
-
-  /** @var \Drupal\sms\Provider\SmsProviderInterface $provider */
-  $provider = \Drupal::service('sms_provider');
-  $provider->queueOut($sms_message);
-}
-
-/**
- * Form element validation callback.
- *
- * Validates that the phone number is valid for the system, and is not in use
- * by another user.
- */
-function sms_user_validate_number_element($element, FormStateInterface $form_state, array $form) {
-  $number = $element['#value'];
-
-  if ($error = sms_validate_number($number)) {
-    foreach ($error as $lerror) {
-      $form_state->setError($element, $lerror);
-    }
-  }
-  elseif (sms_user_get_uid($number)) {
-    $form_state->setError($element, t('This phone number is already registered to another user.'));
-  }
-}
-
-/**
- * Implements hook_user_insert().
- */
-function sms_user_user_insert($account) {
-  return sms_user_save($account);
-}
-
-/**
- * Implements hook_user_update().
- */
-function sms_user_user_update($account) {
-  return sms_user_save($account);
-}
-
-/**
- * Implements hook_user_view().
- */
-function sms_user_user_view(array &$build, UserInterface $account, EntityViewDisplayInterface $display, $view_mode) {
-  $account = \Drupal::currentUser();
-  if ($account->hasPermission('receive sms') && ($account->id() == $account->id() || $account->hasPermission('administer smsframework'))) {
-    if (isset($account->sms_user['status']) && $account->sms_user['status'] == SMS_USER_PENDING) {
-      drupal_set_message(t('You need to confirm your mobile number, <a href="@mobile_url">enter the confirmation code sent to your mobile</a>.', array('@mobile_url' => url('user/' . $account->id() . '/edit/mobile'))));
-    }
-    $build['sms'] = array(
-      '#type' => 'user_profile_category',
-      '#title' => t('Mobile'),
-    );
-    $build['sms']['number'] = array(
-      '#type' => 'user_profile_item',
-      '#title' => '',
-      '#markup' => isset($account->sms_user['number']) ? $account->sms_user['number'] : '',
-    );
-    if (\Drupal::config('sms_user.settings')->get('enable_sleep') && !empty($account->sms_user['sleep_enabled'])) {
-      $build['sms']['sleep'] = array(
-        '#type' => 'user_profile_item',
-        '#title' => '',
-        '#markup' => t('You will not receive messages between ' . $account->sms_user['sleep_start_time'] . ':00 and ' .$account->sms_user['sleep_end_time'] . ':00'),
-      );
-    }
-    if (\Drupal::config('sms_user.settings')->get('allow_opt_out') && !empty($account->sms_user['opted_out'])) {
-      $build['sms']['opted_out'] = array(
-        '#type' => 'user_profile_item',
-        '#title' => '',
-        '#markup' => t('You will not receive any messages from the site.'),
-      );
-    }
-  }
-}
-
-/**
- * Implements hook_form_alter().
- */
-function sms_user_form_alter(&$form, FormStateInterface $form_state, $form_id) {
-  if ($form_id == "user_register_form") {
-    $config = \Drupal::config('sms_user.settings');
-    if ($config->get('registration_form')) {
-      $form['sms_user'] = array(
-        '#type' => 'fieldset',
-        '#title' => t('Mobile settings'),
-        '#description' => t('You will receive a message to confirm your mobile information upon login.'),
-        '#collapsible' => TRUE,
-        '#tree' => TRUE,
-      );
-
-      $required = FALSE;
-      if ($config->get('registration_form') == 2) {
-        $required = TRUE;
-      }
-
-      $form['sms_user'] += sms_send_form($required);
-      $form['sms_user']['number']['#element_validate'] = array('sms_user_validate_number_element');
-
-      return $form;
-    }
-  }
-  return $form;
-}
-
-/**
- * Implements hook_user_cancel().
- */
-function sms_user_user_cancel($edit, $account, $method) {
-  return sms_user_delete($account->id());
-}
-
-/**
- * Implements hook_user_login().
- */
-function sms_user_user_login(AccountInterface $account) {
-  // Check if it's the user's first time logging in.
-  if (!$account->getLastAccessedTime() && !empty($account->sms_user['number']) && $account->sms_user['status'] <= SMS_USER_CONFIRMED) {
-    sms_user_send_confirmation($account, $account->sms_user['number'], (array) $account->sms_user['gateway']);
-    drupal_set_message(t('A confirmation message has been sent to your mobile phone. Please @link.', array('@link' => l(t('confirm your number'), 'user/' . $account->id() . '/edit/mobile'))), 'status');
-  }
-}
-
-/**
- * Implements hook_user_categories().
-function sms_user_user_categories() {
-  $categories['mobile'] = array(
-    'name' => 'mobile',
-    'title' => 'Mobile',
-    'weight' => 10,
-  );
-  return $categories;
-}
- * hook_user_categories() doesn't exist in D8
- */
-
-/**
- * Implements hook_user_load().
- *
- * Loads user mobile data into the user object.
- *
- * @param \Drupal\Core\Session\AccountInterface[] $accounts
- *   The user objects to be augmented with sms_user information.
- *
- * @todo the sms_user appendage to $account object can be implemented as extra data.
- */
-function sms_user_user_load(array $accounts) {
-  $result = db_select('sms_user', 'u')
-    ->fields('u', array('uid', 'number', 'status', 'code', 'gateway', 'sleep_enabled', 'sleep_start_time', 'sleep_end_time', 'opted_out'))
-    ->condition('uid', array_keys($accounts), 'IN')
-    ->execute();
-
-  foreach ($result as $record) {
-    if (!empty($record->uid)) {
-      $record->gateway = unserialize($record->gateway);
-      $accounts[$record->uid]->sms_user = (array)$record;
-
-      // @todo: the following is to support messaging that expect account details
-      // with a delta of 0
-      $accounts[$record->uid]->sms_user[0] = (array)$record;
-    }
-  }
-
-  // Initialize users without records with an empty info array.
-  foreach ($accounts as $id => $account) {
-    if (!isset($account->sms_user)) {
-      $accounts[$id]->sms_user = array(
-        'uid' => $id,
-        'number' => '',
-        'status' => 0,
-        'code' => 0,
-        'gateway' => '',
-        'sleep_enabled' => 0,
-        'sleep_start_time' => 0,
-        'sleep_end_time' => 0,
-        'opted_out' => 0,
-      );
-
-      // @todo The following is a BC-shim to support code that expects account
-      // details with a delta of 0.
-      $accounts[$id]->sms_user[0] = $accounts[$id]->sms_user;
-    }
-  }
-}
-
-/**
- * Saves user module data.
- *
- * @param \Drupal\Core\Session\AccountInterface $account
- *   The account whose sms_user data is being saved.
- *
- * @return bool
- *   true if the operation is successful.
- */
-function sms_user_save(AccountInterface $account) {
-  if (isset($account->sms_user) && $account->sms_user['number'] && $account->id() != 0) {
-    $info = (array) $account->sms_user;
-    $info['uid'] = $account->id();
-    if (!isset($info['status'])) {
-      $info['status'] = 0;
-    }
-
-    // Remove BC-shim before save.
-    unset($info[0]);
-
-    $info['gateway'] = isset($info['gateway']) ? serialize($info['gateway']) : '';
-    return db_merge('sms_user')
-      ->key('uid', $info['uid'])
-      ->fields($info)
-      ->execute();
-  }
-  return FALSE;
-}
-
-/**
- * Deletes a user's mobile information from the database.
- *
- * @param int|object $uid
- *   The uid of the user who's data is to be removed.
- * @param string|bool $number
- *   The number to delete. Defaults to FALSE which will delete all numbers.
- *
- * @return bool|int
- *
- * @see sms_user_user_cancel()
- */
-function sms_user_delete($uid, $number = FALSE) {
-  if (is_object($uid)) {
-    $uid = $uid->uid;
-  }
-
-  $query = db_delete('sms_user')
-    ->condition('uid', $uid);
-  if ($number) {
-    $query->condition('number', $number);
-  }
-  $num_deleted = $query->execute();
-  return $num_deleted;
-}
-
-/**
- * Creates a confirmation message sent to a user.
- *
- * This message contains a code which is used to confirm that the number is
- * actually correct. Message may be tokenized.
- *
- * @param string $code
- *   Random code to send to user.
- *
- * @return string
- *   Created message, ready to send to user.
- */
-function _sms_user_confirm_message($code) {
-  $text_format = \Drupal::config('sms_user.settings')->get('confirmation_message') . $code;
-  $text = \Drupal::token()->replace($text_format, array('confirm-code' => $code));
-  return $text;
-}
-
-/**
- * Implements hook_tokens().
- */
-function sms_user_tokens($type, $tokens, array $data = array(), array $options = array()) {
-  $replacements = array();
-
-  if ($type == 'sms_user') {
-    foreach ($tokens as $name => $original) {
-      switch ($name) {
-        case 'confirm-code':
-            $replacements[$original] = $data['confirm-code'];
-          break;
-        case 'mobile-url':
-            $replacements[$original] = Url::fromRoute('sms_user.user_edit', array('user' => \Drupal::currentUser()))->setAbsolute()->toString();
-          break;
-      }
-    }
-  }
-  return $replacements;
-}
-
-/**
- * Implements hook_token_info().
- */
-function sms_user_token_info() {
-  $info['types']['sms_user'] = array(
-    'name' => t('SMS User'),
-    'description' => t('Tokens related to a users\' sms settings.'),
-    'needs-data' => 'user',
-  );
-  $info['tokens']['sms_user']['confirm-code'] = array(
-    'name' => t('Confirmation code'),
-    'description' => t('The mobile confirmation code for the user.'),
-    'type' => 'sms_user',
-  );
-  $info['tokens']['sms_user']['mobile-url'] = array(
-    'name' => t('Mobile URL'),
-    'description' => t('The URL for the user\'s mobile settings page.'),
-    'type' => 'sms_user',
-  );
-  return $info;
-}
-
-/**
- * Implements hook_sms_incoming_preprocess().
+ * Implements hook_sms_incoming().
  */
 function sms_user_sms_incoming_preprocess(SmsMessageInterface $sms_message) {
   /** @var \Drupal\sms_user\AccountRegistrationInterface $account_registration */
@@ -553,354 +36,3 @@ function sms_user_sms_incoming_preprocess(SmsMessageInterface $sms_message) {
 
   $account_registration->createAccount($sms_message);
 }
-
-/**
- * Stores metadata related to SMS users registering/logging in.
- *
- * Drupal core does not really provide a way to pass user metadata around that's
- * related to a user registering (meaning during the registration cycle), so we
- * provide a storage mechanism here.
- *
- * Since it seems sloppy to handle registration cycles with one method and
- * logins with another, this function handles all SMS-related metadata related
- * to logging in and registering.
- *
- * The data is placed in this storage mechansim for the duration of the page
- * load, and is placed here before the user hooks are invoked by sms_user,
- * therefore it should be available to all modules that need it.
- *
- * @param int $uid
- *   (optional) The uid of the user to store/fetch.  Defaults to null, in which
- *   case returns all cached accounts.
- * @param array $metadata
- *   (optional) The metadata to store, or the metadata to fetch if NULL or not
- *   supplied. The metadata is stored/retrieved as an associative array with the
- *   following key/value pairs:
- *     - register: bool Indicates that the user is just registering.
- *     - login: bool Indicates that the user is logging in.
- *     - number: string The SMS number the message was sent from.
- *     - message: string The SMS message sent with the registration/login.
- *     - options: array The SMS message metadata passed from the gateway.
- *
- * @param bool $reset
- *   If true, reset the accounts cache.
- *
- * @return mixed
- *   No uid set: An array, key = uid, value = An associative array of account
- *    metadata.
- *   uid set, no metadata set: An associative array of account metadata.
- *   uid set, metadata set: Cache the metadata for the user, return TRUE.
- */
-function sms_user_login_metadata($uid = NULL, $metadata = NULL, $reset = FALSE) {
-  static $accounts = array();
-
-  if ($reset) {
-    $accounts = array();
-  }
-
-  if (!isset($uid)) {
-    return $accounts;
-  }
-
-  if (isset($metadata)) {
-    $accounts[$uid] = $metadata;
-    return TRUE;
-  }
-  elseif (isset($accounts[$uid])) {
-    return $accounts[$uid];
-  }
-  else {
-    return FALSE;
-  }
-}
-
-/**
- * Internal function to swap user.
- *
- * Safely Impersonating Another User.
- * https://drupal.org/node/218104
- * Called once to login, and once to logout. Does not nest.
- *
- * @param object $account
- *  The account object of the user to log in; or none to log out and restore
- *  the previous user and session.
- */
-function _sms_user_switch(AccountInterface $account = NULL) {
-  if ($account) {
-    \Drupal::service('account_switcher')->switchTo($account);
-    \Drupal::moduleHandler()->invokeAll('user_login', [$account]);
-    \Drupal::logger('sms_user')->info('%name was logged in using SMS.', array('%name' => $account->getUsername()));
-  }
-  else {
-    \Drupal::service('account_switcher')->switchBack();
-    $account = \Drupal::currentUser();
-    \Drupal::logger('sms_user')->info('%name was restored as logged in using SMS.', array('%name' => $account->getUsername()));
-  }
-}
-
-/**
- * Registers a new user via SMS
- *
- * @param string $number
- *   The user's mobile number.
- * @param string $message
- *   Body of the SMS message.
- * @param array $options
- *   An associative array of metadata passed from the incoming gateway.
- *
- * @return object|bool
- *   The user object of the created user, false if registration failed.
- */
-function sms_user_register_new_user($number, $message, $options) {
-  $edit = array();
-
-  // If we have a from address from the e-mail gateway, use it, otherwise
-  // leave the e-mail fields blank.
-  $mail = isset($options['sms_email_gateway_from']) ? $options['sms_email_gateway_from'] : '';
-
-  // Pass in sms_user specific data for saving.
-  $edit['sms_user'] = array(
-    'number' => $number,
-    'status' => SMS_USER_SMS_REGISTERED,
-    'code' => '',
-    'gateway' => array(),
-  );
-
-  $edit['timezone'] = '';
-  // If by chance there's already a user with the same email address, then use
-  // it instead of creating a new user.
-  $ids = \Drupal::entityQuery('user')
-    ->condition('mail', $mail)
-    ->execute();
-  if (!empty($mail) && ($account = array_shift(User::loadMultiple($ids)))) {
-    $account = User::create($edit);
-  }
-  else {
-    $edit['mail'] = $edit['init'] = $mail;
-
-    $config = \Drupal::config('sms_user.settings');
-    // Add password if enabled.
-    if ($config->get('allow_password')) {
-      $lines = explode("\n", $message);
-      $words = explode(" ", $lines[0]);
-      foreach ($words as $word) {
-        if (trim($word)) {
-          $edit['pass'] = preg_replace('/\s+/', '-', $word);
-          break;
-        }
-      }
-    }
-    // Auto-generated password.
-    if (!isset($edit['pass']) || !$edit['pass']) {
-      $edit['pass'] = user_password();
-    }
-
-    // Pick a pseudo-random name for the user -- using the email
-    // address would be a privacy violation.
-    $edit['name'] = substr(md5($number . strval(REQUEST_TIME)), 0, 10);
-
-    // Save the user.
-    $edit['status'] = \Drupal::config('user.settings')->get('register') == USER_REGISTER_VISITORS;
-    $account = User::create($edit);
-    $account->save();
-    \Drupal::logger('sms_user')->info('%name was created using SMS.', array('%name' => $account->getUsername()));
-  }
-
-  // Verify that the account was created.
-  if (is_object($account)) {
-    $metadata = array(
-      'register' => TRUE,
-      'number' => $number,
-      'message' => $message,
-      'options' => $options,
-    );
-    sms_user_login_metadata($account->id(), $metadata);
-    if ($account->isActive()) {
-      // User account is directly enabled.
-      _sms_user_switch($account);
-    }
-    \Drupal::moduleHandler()->invokeAll('user_login', $edit, $account);
-
-    return $account;
-  }
-
-  return FALSE;
-
-}
-
-/**
- * Authenticates a user based on mobile number.
- *
- * @param string $number
- *   The number to authenticate against. For security, this should only be
- *   provided by incoming messages, not through user input.
- *
- * @return object|false
- *   The account that was authenticated or false if none.
- */
-function sms_user_authenticate($number) {
-  if ($uid = sms_user_get_uid($number)) {
-    $ids = \Drupal::entityQuery('user')
-      ->condition('uid', $uid)
-      ->condition('status', 1)
-      ->execute();
-    $account = User::loadMultiple($ids);
-    $account = reset($account);
-    if (!empty($account)) {
-      \Drupal::logger('sms_user')->info('%name was authenticated using SMS.', array('%name' => $account->getUserName()));
-      return $account;
-    }
-    else {
-      return false;
-    }
-  }
-  else {
-    return false;
-  }
-}
-
-/**
- * Implements hook_feeds_processor_targets_alter()
- *
- * Allows for setting Phonenumber, Status and Gateway using feeds.
- *
- * @param array $targets
- *   The targets for the feeds processor
- * @param string $entity_type
- *   The entity type identifier.
- * @param string $bundle
- *   The entity bundle identifier.
- */
-function sms_user_feeds_processor_targets_alter(&$targets, $entity_type, $bundle) {
-  $targets['sms_user_phonenumber'] = array(
-      'name' => t('SMS User Phonenumber'),
-      'description' => t('The Phone number for the user to be used in the SMS Framework.'),
-      'optional_unique' => TRUE,
-      'callback' => '_sms_user_feedsprocess_set_value'
-  );
-  $targets['sms_user_status'] = array(
-      'name' => t('SMS User Status'),
-      'description' => t('The Phone number for the user to be used in the SMS Framework.'),
-      'optional_unique' => TRUE,
-      'callback' => '_sms_user_feedsprocess_set_value'
-  );
-  $targets['sms_user_gateway'] = array(
-      'name' => t('SMS User Gateway'),
-      'description' => t('The Phone number for the user to be used in the SMS Framework.'),
-      'optional_unique' => TRUE,
-      'callback' => '_sms_user_feedsprocess_set_value'
-  );
-}
-
-/**
- * Sets the values for the three fields supported for feeds.
- *
- * Callback function for hook_feeds_processor_targets_alter.
- *
- * @param object $source
- * @param object $target_item
- * @param object $target
- * @param string $value
- * @param array $mapping
- */
-function _sms_user_feedsprocess_set_value($source, $target_item, $target, $value, $mapping) {
-  switch($target) {
-    case 'sms_user_phonenumber':
-      $target_item->sms_user['number'] = $value;
-      break;
-    case 'sms_user_status':
-      $target_item->sms_user['status'] = $value;
-      break;
-    case 'sms_user_gateway':
-      $target_item->sms_user['gateway'] = $value;
-      break;
-  }
-}
-
-/**
- * Implements hook_entity_property_info_alter().
- */
-function sms_user_entity_property_info_alter(&$info) {
-  $properties = &$info['user']['properties'];
-  $properties['sms_user_phone_number'] = array(
-      'label' => t("Phone Number"),
-      'description' => t("The users mobile phone number."),
-      'type' => 'text',
-      'getter callback' => 'entity_property_sms_user_get_properties',
-      'computed' => TRUE,
-      'required' => FALSE,
-  );
-  $properties['sms_user_status'] = array(
-      'label' => t("SMS Status"),
-      'description' => t("The users status of the Mobile Phone number."),
-      'type' => 'text',
-      'getter callback' => 'entity_property_sms_user_get_properties',
-      'computed' => TRUE,
-      'required' => TRUE,
-  );
-  $properties['sms_user_gateway'] = array(
-      'label' => t("SMS Gateway"),
-      'description' => t("The SMS Gateway for this user."),
-      'type' => 'text',
-      'getter callback' => 'entity_property_sms_user_get_properties',
-      'computed' => TRUE,
-      'required' => FALSE,
-  );
-
-}
-
-/**
- * Gets properties for the sms_user_entity_property_info_alter() function.
- *
- * @param array $data
- *   The associated entity for which the property is sought.
- * @param array $options
- *   An array of options.
- * @param string $name
- *   The name of the property to be returned.
- * @param string $type
- *   The entity type.
- * @param array $info
- *   The entity info.
- *
- * @return string|null
- *   A translated string describing the sms_user entity property.
- *
- * @todo the sms_user appendage to $account object needs to be implemented in a
- * data table in D8
- */
-function entity_property_sms_user_get_properties($data, array $options, $name, $type, $info) {
-  if (isset($data->uid) && ($data->uid > 0)) {
-    $account = User::load($data->uid);
-    if (isset($account->sms_user)) {
-      switch ($name) {
-        case "sms_user_phone_number":
-          return isset($account->sms_user['number']) ? $account->sms_user['number'] : '';
-
-        case "sms_user_status":
-          if (!isset($account->sms_user['status'])) return t('Blocked');
-          switch ($account->sms_user['status']) {
-            case SMS_USER_BLOCKED:
-              return t('Blocked');
-
-            case SMS_USER_PENDING:
-              return t('Pending');
-
-            case SMS_USER_CONFIRMED:
-              return t('Active');
-
-            case SMS_USER_SMS_REGISTERED:
-              return t('SMS Registered');
-
-          }
-
-        case "sms_user_gateway" :
-          if (is_string($account->sms_user['gateway'])) {
-            return $account->sms_user['gateway'];
-          }
-          break;
-      }
-    }
-  }
-  return NULL;
-}
diff --git a/modules/sms_user/sms_user.permissions.yml b/modules/sms_user/sms_user.permissions.yml
deleted file mode 100644
index 923e310..0000000
--- a/modules/sms_user/sms_user.permissions.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-receive sms:
-  title: 'receive sms'
-  description: 'Receive SMS from the site.'
-
-edit own sms number:
-  title: 'edit own sms number'
-  description: 'Edit own SMS number.'
diff --git a/modules/sms_user/sms_user.routing.yml b/modules/sms_user/sms_user.routing.yml
index c7bfa4c..649ffaa 100644
--- a/modules/sms_user/sms_user.routing.yml
+++ b/modules/sms_user/sms_user.routing.yml
@@ -5,11 +5,3 @@ sms_user.options:
     _title: 'SMS User Options'
   requirements:
     _permission: 'administer smsframework'
-
-sms_user.user_edit:
-  path: '/user/{user}/mobile'
-  defaults:
-    _controller: 'sms_user_settings'
-  requirements:
-    _permission: 'receive sms'
-    _entity_access: 'user.update'
diff --git a/modules/sms_user/sms_user.rules.inc b/modules/sms_user/sms_user.rules.inc
deleted file mode 100644
index 38c54ef..0000000
--- a/modules/sms_user/sms_user.rules.inc
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-
-/**
- * @file
- * SMS User Rules Implementation.
- *
- */
-
-use Drupal\sms\Message\SmsMessage;
-
-/*
- * Implements hook_rules_event_info().
- * @ingroup rules
- */
-function sms_user_rules_event_info() {
-  return array(
-    'sms_user_validated' => array(
-      'label' => t('User validated SMS code'),
-      'module' => 'SMS',
-      'arguments' => array(
-        'user' => array(
-          'type' => 'user',
-          'label' => t('User validated SMS code'),
-        ),
-      ),
-    ),
-    'sms_user_removed' => array(
-      'label' => t('User removed mobile phone number'),
-      'module' => 'SMS',
-      'arguments' => array(
-        'user' => array(
-          'type' => 'user',
-          'label' => t('User removed mobile phone number'),
-        ),
-      ),
-    ),
-  );
-}
-
-/**
- * Implements hook_rules_action_info().
- */
-function sms_user_rules_action_info() {
-  return array(
-    'sms_action_user_send' => array(
-      'label' => t('Send SMS message to user'),
-      'arguments' => array(
-        'user' => array(
-          'type' => 'user',
-          'label' => t('User'),
-        ),
-        'message' => array(
-          'type' => 'string',
-          'label' => t('Message'),
-        ),
-      ),
-      'module' => 'SMS Framework',
-    ),
-    'sms_action_match_user' => array(
-      'label' => t('Match mobile number to user'),
-      'arguments' => array(
-        'number' => array(
-          'type' => 'string',
-          'label' => t('Mobile number'),
-        ),
-      ),
-      'new variables' => array(
-        'user_loaded' => array(
-          'type' => 'user',
-          'label' => t('Loaded user'),
-          // 'label callback' => 'rules_action_load_node_variable_label',
-        ),
-      ),
-      'module' => 'SMS Framework',
-    ),
-  );
-}
-
-/**
- * Rules action callback to send sms message to user.
- */
-function sms_action_user_send($user, $message) {
-  /** @var \Drupal\sms\Provider\PhoneNumberProviderInterface $phone_number_provider */
-  $phone_number_provider = \Drupal::service('sms.phone_number');
-  $sms_message = new SmsMessage();
-  $sms_message->setMessage($message);
-  $phone_number_provider->sendMessage($user, $sms_message);
-}
-
-/**
- * Rules action callback to match number to user.
- */
-function sms_action_match_user($number) {
-  $uid = sms_user_get_uid($number);
-  return array('user_loaded' => user_load($user->uid));
-}
-
diff --git a/modules/sms_user/sms_user.views.inc b/modules/sms_user/sms_user.views.inc
deleted file mode 100644
index 8c6d950..0000000
--- a/modules/sms_user/sms_user.views.inc
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-
-/**
- * @file
- * The basic views fields available for sms_user.
- */
-
-/**
- * Implements hook_views_data()
- */
-function sms_user_views_data() {
-  $data['sms_user']['table']['group'] = t('SMS User');
-  $data['sms_user']['table']['join'] = array(
-    'users' => array(
-      'left_field' => 'uid',
-      'field' => 'uid',
-    ),
-  );
-  $data['sms_user']['number'] = array(
-    'title' => t('Mobile Number'),
-    'help' => t('Display the user\'s mobile number.'),
-    'field' => array(
-      'id' => 'sms_number',
-      'click sortable' => TRUE,
-    ),
-    'filter' => array(
-      'id' => 'standard',
-    ),
-    'sort' => array(
-      'id' => 'standard',
-    ),
-  );
-  $data['sms_user']['status'] = array(
-    'title' => t('Mobile Status'),
-    'help' => t('Display the status of the user\'s mobile number confirmation.'),
-    'field' => array(
-      'id' => 'sms_status',
-      'click sortable' => TRUE,
-    ),
-    'filter' => array(
-      'id' => 'sms_status',
-    ),
-    'sort' => array(
-      'id' => 'standard',
-    ),
-  );
-  return $data;
-}
diff --git a/modules/sms_user/src/AccountRegistration.php b/modules/sms_user/src/AccountRegistration.php
index df37161..68e32a0 100644
--- a/modules/sms_user/src/AccountRegistration.php
+++ b/modules/sms_user/src/AccountRegistration.php
@@ -10,9 +10,9 @@ namespace Drupal\sms_user;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Utility\Token;
 use Drupal\sms\Provider\SmsProviderInterface;
+use Drupal\sms\Entity\PhoneNumberSettings;
 use Drupal\sms\Provider\PhoneNumberProviderInterface;
-use Drupal\sms\Message\SmsMessageInterface;
-use Drupal\sms\Entity\SmsMessageInterface as SmsMessageEntityInterface;
+use Drupal\sms\Entity\SmsMessageInterface;
 use Drupal\user\Entity\User;
 use Drupal\Component\Utility\Random;
 use Drupal\sms\Entity\SmsMessage;
@@ -109,7 +109,7 @@ class AccountRegistration implements AccountRegistrationInterface {
    * Process an incoming message and create a user if the phone number is
    * unrecognised.
    *
-   * @param \Drupal\sms\Message\SmsMessageInterface $sms_message
+   * @param \Drupal\sms\Entity\SmsMessageInterface $sms_message
    *   An incoming SMS message.
    */
   protected function allUnknownNumbers(SmsMessageInterface $sms_message) {
@@ -244,10 +244,11 @@ class AccountRegistration implements AccountRegistrationInterface {
    *   Message to send as a reply.
    */
   protected function sendReply($sender_number, $user, $message) {
+    /** @var \Drupal\sms\Entity\SmsMessageInterface $sms_message */
     $sms_message = SmsMessage::create();
     $sms_message
       ->addRecipient($sender_number)
-      ->setDirection(SmsMessageEntityInterface::DIRECTION_OUTGOING);
+      ->setDirection(SmsMessageInterface::DIRECTION_OUTGOING);
 
     $data['sms-message'] = $sms_message;
     $data['user'] = $user;
diff --git a/modules/sms_user/src/AccountRegistrationInterface.php b/modules/sms_user/src/AccountRegistrationInterface.php
index 448d0cc..a675c68 100644
--- a/modules/sms_user/src/AccountRegistrationInterface.php
+++ b/modules/sms_user/src/AccountRegistrationInterface.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\sms_user;
 
-use Drupal\sms\Message\SmsMessageInterface;
+use Drupal\sms\Entity\SmsMessageInterface;
 
 /**
  * Defines interface for the account registration service.
@@ -17,8 +17,10 @@ interface AccountRegistrationInterface {
   /**
    * Process an incoming SMS to see if a new account should be created.
    *
-   * @param \Drupal\sms\Message\SmsMessageInterface $sms_message
+   * @param \Drupal\sms\Entity\SmsMessageInterface $sms_message
    *   An incoming SMS message.
+   *   @todo change this to standard sms message entity once the sender method
+   *   is repurposed / or new method added, for sender number.
    */
   public function createAccount(SmsMessageInterface $sms_message);
 
diff --git a/modules/sms_user/src/Form/AdminSettingsForm.php b/modules/sms_user/src/Form/AdminSettingsForm.php
index d772a91..ea80105 100644
--- a/modules/sms_user/src/Form/AdminSettingsForm.php
+++ b/modules/sms_user/src/Form/AdminSettingsForm.php
@@ -29,48 +29,6 @@ class AdminSettingsForm extends ConfigFormBase {
   public function buildForm(array $form, FormStateInterface $form_state, $op = NULL, $domain = NULL) {
     $form['#attached']['library'][] = 'sms_user/admin';
     $config = $this->config('sms_user.settings');
-    $form['registration_form'] = array(
-      '#type' => 'radios',
-      '#title' => $this->t('Show mobile fields during user registration'),
-      '#description' => $this->t('Specify if the site should collect mobile information during registration.'),
-      '#options' => array(
-        $this->t('Disabled'),
-        $this->t('Optional'),
-        $this->t('Required')
-      ),
-      '#default_value' => $config->get('registration_form'),
-    );
-  
-    $form['confirmation_message'] = array(
-      '#type' => 'textfield',
-      '#title' => $this->t('Confirmation message format'),
-      '#default_value' => $config->get('confirmation_message'),
-      '#description' => $this->t('Specify the format for confirmation messages. Keep this as short as possible.'),
-      '#size' => 140,
-      '#maxlength' => 255,
-    );
-  
-    // Add the token help to a collapsed fieldset at the end of the configuration page.
-    $form['tokens']['token_help'] = array(
-      '#type' => 'fieldset',
-      '#title' => $this->t('Available Tokens List'),
-      '#collapsible' => TRUE,
-      '#collapsed' => TRUE,
-    );
-    $form['tokens']['token_help']['content'] = array(
-      '#theme' => 'token_tree',
-      '#token_types' => array('sms_user'),
-    );
-    /*
-    $form['tokens'] = array(
-      '#type' => 'fieldset',
-      '#title' => t('Available replacement patterns'),
-      '#collapsible' => TRUE,
-      '#collapsed' => TRUE,
-    );
-  
-    $form['tokens']['content']['#value'] = theme('token_tree', array('token_types' => array('sms_user')));
-    */
 
     // Active hours.
     $form['active_hours'] = [
diff --git a/modules/sms_user/src/Form/SettingsAddForm.php b/modules/sms_user/src/Form/SettingsAddForm.php
deleted file mode 100644
index dcabde9..0000000
--- a/modules/sms_user/src/Form/SettingsAddForm.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains SettingsAddForm class
- */
-
-/**
- * Provides a form for user mobile settings
- */
-namespace Drupal\sms_user\Form;
-
-use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Form\ConfigFormBase;
-use Drupal\Core\Session\AccountInterface;
-use Drupal\user\Entity\User;
-
-/**
- * @todo the sms_user appendage to $user object needs to be implemented as a
- * field in D8
- */
-class SettingsAddForm extends ConfigFormBase {
-  /**
-   * {@inheritdoc}
-   */
-  public function getFormID() {
-    return 'sms_user_settings_add_form';
-  }
-  
-  /**
-   * {@inheritdoc}
-   */
-  public function buildForm(array $form, FormStateInterface $form_state, AccountInterface $account = NULL) {
-    if (!isset($account)) {
-      $account = $this->currentUser();
-    }
-
-    // Use SMS Send form for 'number' and 'gateway' fields.
-    if ($send_form = sms_send_form(TRUE)) {
-      $form = parent::buildForm($send_form, $form_state);
-    }
-
-    // Add element validation for number.
-    $form['number']['#element_validate'][] = 'sms_user_validate_number_element';
-    $form['uid'] = array(
-      '#type' => 'hidden',
-      '#value' => $account->id(),
-    );
-    $form['actions']['submit'] = array(
-      '#type' => 'submit',
-      '#value' => t('Confirm number'),
-    );
-    
-    return $form;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function submitForm(array &$form, FormStateInterface $form_state) {
-    $account = User::load($form_state->getValue('uid'));
-    sms_user_send_confirmation($account, $form_state->getValue('number'), (array) $form_state->getValue('gateway'));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getEditableConfigNames() {
-    return [];
-  }
-
-}
diff --git a/modules/sms_user/src/Form/SettingsConfirmForm.php b/modules/sms_user/src/Form/SettingsConfirmForm.php
deleted file mode 100644
index ba4cbba..0000000
--- a/modules/sms_user/src/Form/SettingsConfirmForm.php
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains SettingsConfirmForm class
- */
-
-/**
- * Provides a form for user mobile settings
- */
-namespace Drupal\sms_user\Form;
-
-use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Form\ConfigFormBase;
-use Drupal\Core\Session\AccountInterface;
-use Drupal\user\Entity\User;
-
-/**
- * @todo the sms_user appendage to $user object needs to be implemented as a
- * field in D8
- */
-class SettingsConfirmForm extends ConfigFormBase {
-  /**
-   * {@inheritdoc}
-   */
-  public function getFormID() {
-    return 'sms_user_settings_confirm_form';
-  }
-  
-  /**
-   * {@inheritdoc}
-   */
-  public function buildForm(array $form, FormStateInterface $form_state, AccountInterface $account = NULL) {
-    if (!isset($account)) {
-      $account = $this->currentUser();
-    }
-    $form = parent::buildForm($form, $form_state);
-    $form['uid'] = array(
-      '#type' => 'hidden',
-      '#value' => $account->id(),
-    );
-    $form['number'] = array(
-      '#type' => 'item',
-      '#title' => t('Mobile phone number'),
-      '#markup' => $account->sms_user['number'],
-    );
-    $form['confirm_code'] = array(
-      '#type' => 'textfield',
-      '#title' => t('Confirmation code'),
-      '#description' => t('Enter the confirmation code sent by SMS to your mobile phone.'),
-      '#size' => 4,
-      '#maxlength' => 4,
-    );
-    $form['actions']['submit'] = array(
-      '#type' => 'submit',
-      '#value' => t('Confirm number'),
-    );
-    $form['actions']['reset'] = array(
-      '#type' => 'submit',
-      '#value' => t('Delete & start over'),
-      '#access' => $account->hasPermission('edit own sms number'),
-    );
-    $form['actions']['confirm'] = array(
-      '#type' => 'submit',
-      '#value' => t('Confirm without code'),
-      '#access' => $account->hasPermission('administer smsframework'),
-    );
-  
-    return $form;
-  }
-  
-  /**
-   * {@inheritdoc}
-   */
-  public function validateForm(array &$form, FormStateInterface $form_state) {
-    if ($form_state->getTriggeringElement()['#value'] == $form_state->getValue('submit')) {
-      $account = User::load($form_state->getValue('uid'));
-      if ($form_state->getValue('confirm_code') != $account->sms_user['code']) {
-        $form_state->setErrorByName('confirm_code', t('The confirmation code is invalid.'));
-      }
-    }
-  }
-  
-  /**
-   * {@inheritdoc}
-   */
-  public function submitForm(array &$form, FormStateInterface $form_state) {
-    $account = User::load($form_state->getValue('uid'));
-    if ($form_state->getTriggeringElement()['#value'] == $form_state->getValue('reset')) {
-      sms_user_delete($account->id());
-    }
-    else {
-      $account->sms_user['status'] = SMS_USER_CONFIRMED;
-      $account->save();
-      // If rules module is installed, fire the number validated rules event.
-      if (\Drupal::moduleHandler()->moduleExists('rules')) {
-        rules_invoke_event('sms_user_validated', $account);
-      }
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getEditableConfigNames() {
-    return [];
-  }
-
-}
diff --git a/modules/sms_user/src/Form/SettingsOptOutForm.php b/modules/sms_user/src/Form/SettingsOptOutForm.php
deleted file mode 100644
index 2a4bd61..0000000
--- a/modules/sms_user/src/Form/SettingsOptOutForm.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains SettingsSleepForm class
- */
-
-/**
- * Provides a form for user sms opt out settings.
- */
-namespace Drupal\sms_user\Form;
-
-use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Form\ConfigFormBase;
-use Drupal\Core\Session\AccountInterface;
-use Drupal\user\Entity\User;
-
-/**
- * @todo the sms_user appendage to $user object needs to be implemented as a
- * field in D8
- * Form constructor for the user opt out form.
- *
- * @param object $account
- *   The user account object.
- *
- * @see sms_user_opt_out_form_submit()
- *
- * @ingroup forms
- */
-class SettingsOptOutForm extends ConfigFormBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getFormID() {
-    return 'sms_user_opt_out_form';
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function buildForm(array $form, FormStateInterface $form_state, AccountInterface $account = NULL) {
-    if (!isset($account)) {
-      $account = $this->currentUser();
-    }
-    $form['uid'] = array(
-      '#type' => 'hidden',
-      '#value' => $account->id(),
-    );
-
-    $form['opt_out'] = array(
-      '#type' => 'fieldset',
-      '#title' => t('Opt Out'),
-      '#collapsible' => TRUE,
-    );
-
-    $form['opt_out']['opted_out'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Opt out of sms messages from this site.'),
-      '#description' => t('If enabled, you will not receive messages from this site.'),
-      '#default_value' => isset($account->sms_user['opted_out']) ? $account->sms_user['opted_out'] : NULL,
-    );
-
-    $form['opt_out']['set'] = array(
-      '#type' => 'submit',
-      '#value' => t('Set'),
-    );
-
-    return $form;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function submitForm(array &$form, FormStateInterface $form_state) {
-    $account = User::load($form_state->getValue('uid'));
-    $account->sms_user['opted_out'] = $form_state->getValue('opted_out');
-    $account->save();
-    drupal_set_message(t('The changes have been saved.'), 'status');
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getEditableConfigNames() {
-    return [];
-  }
-
-}
diff --git a/modules/sms_user/src/Form/SettingsResetForm.php b/modules/sms_user/src/Form/SettingsResetForm.php
deleted file mode 100644
index 7c0969e..0000000
--- a/modules/sms_user/src/Form/SettingsResetForm.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains SettingsResetForm class
- */
-
-/**
- * Provides a form for user mobile settings
- */
-namespace Drupal\sms_user\Form;
-
-use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Form\ConfigFormBase;
-use Drupal\Core\Session\AccountInterface;
-use Drupal\user\Entity\User;
-
-/**
- * @todo the sms_user appendage to $user object needs to be implemented as a
- * field in D8
- */
-class SettingsResetForm extends ConfigFormBase {
-  /**
-   * {@inheritdoc}
-   */
-  public function getFormID() {
-    return 'sms_user_settings_reset_form';
-  }
-  
-  /**
-   * {@inheritdoc}
-   */
-  public function buildForm(array $form, FormStateInterface $form_state, AccountInterface $account = NULL) {
-    if (!isset($account)) {
-      $account = $this->currentUser();
-    }
-    $form['uid'] = array(
-      '#type' => 'hidden',
-      '#value' => $account->id(),
-    );
-    $form['sms_user']['number'] = array(
-      '#type' => 'item',
-      '#title' => t('Your mobile phone number'),
-      '#markup' => $account->sms_user['number'],
-      '#description' => t('Your mobile phone number has been confirmed.'),
-    );
-  
-    $form['reset'] = array(
-      '#type' => 'submit',
-      '#value' => t('Delete & start over'),
-      '#access' => $account->hasPermission('edit own sms number'),
-    );
-  
-    return $form;
-  }
-  
-  /**
-   * {@inheritdoc}
-   */
-  public function submitForm(array &$form, FormStateInterface $form_state) {
-    $account = User::load($form_state->getValue('uid'));
-    if (sms_user_delete($account->id())) {
-      if (\Drupal::moduleHandler()->moduleExists('rules')) {
-        rules_invoke_event('sms_user_removed', $account);
-      }
-      // Save account changes to trigger reload.
-      unset($account->sms_user);
-      $account->save();
-      drupal_set_message(t('Your mobile information has been removed'), 'status');
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getEditableConfigNames() {
-    return [];
-  }
-
-}
diff --git a/modules/sms_user/src/Form/SettingsSleepForm.php b/modules/sms_user/src/Form/SettingsSleepForm.php
deleted file mode 100644
index 83927db..0000000
--- a/modules/sms_user/src/Form/SettingsSleepForm.php
+++ /dev/null
@@ -1,110 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains SettingsSleepForm class
- */
-
-/**
- * Provides a form for user mobile settings
- */
-namespace Drupal\sms_user\Form;
-
-use Drupal\Core\Datetime\Entity\DateFormat;
-use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Form\ConfigFormBase;
-use Drupal\Core\Session\AccountInterface;
-use Drupal\user\Entity\User;
-
-/**
- * @todo the sms_user appendage to $user object needs to be implemented as a
- * field in D8
- */
-class SettingsSleepForm extends ConfigFormBase {
-  /**
-   * {@inheritdoc}
-   */
-  public function getFormID() {
-    return 'sms_user_settings_sleep_form';
-  }
-  
-  /**
-   * {@inheritdoc}
-   */
-  public function buildForm(array $form, FormStateInterface $form_state, AccountInterface $account = NULL) {
-    if (!isset($account)) {
-      $account = $this->currentUser();
-    }
-    $form['uid'] = array(
-      '#type' => 'hidden',
-      '#value' => $account->id(),
-    );
-    $form['sleep'] = array(
-      '#type' => 'fieldset',
-      '#title' => t('Sleep Time'),
-      '#collapsible' => TRUE,
-    );
-  
-    $form['sleep']['sleep_enabled'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Disable messages between these hours'),
-      '#description' => t('If enabled, you will not receive messages between the specified hours.'),
-      '#default_value' => isset($account->sms_user['sleep_enabled']) ? $account->sms_user['sleep_enabled'] : NULL,
-    );
-  
-    // Determine whether to use the 24-hour or 12-hour clock based on site settings
-    if (strpos(DateFormat::load('short')->getPattern(), 'g')) {
-      $format = 'g A';
-    }
-    else {
-      $format = 'H:00';
-    }
-    // Build the list of options based on format
-    $hour = 0; $options = array();
-    while ($hour < 24) {
-      $options[$hour] = date($format, mktime($hour));
-      $hour++;
-    }
-  
-    $form['sleep']['sleep_start_time'] = array(
-      '#type' => 'select',
-      '#multiple' => FALSE,
-      '#options' => $options,
-      '#default_value' => isset($account->sms_user['sleep_start_time']) ? $account->sms_user['sleep_start_time'] : NULL,
-    );
-  
-    $form['sleep']['sleep_end_time'] = array(
-      '#type' => 'select',
-      '#multiple' => FALSE,
-      '#options' => $options,
-      '#default_value' => isset($account->sms_user['sleep_end_time']) ? $account->sms_user['sleep_end_time'] : NULL,
-    );
-  
-    $form['sleep']['save'] = array(
-      '#type' => 'submit',
-      '#value' => t('Save'),
-    );
-  
-    return $form;
-  }
-  
-  /**
-   * {@inheritdoc}
-   */
-  public function submitForm(array &$form, FormStateInterface $form_state) {
-    $account = User::load($form_state->getValue('uid'));
-    $account->sms_user['sleep_enabled'] = $form_state->getValue('sleep_enabled');
-    $account->sms_user['sleep_start_time'] = $form_state->getValue('sleep_start_time');
-    $account->sms_user['sleep_end_time'] = $form_state->getValue('sleep_end_time');
-    $account->save();
-    drupal_set_message(t('The changes have been saved.'), 'status');
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getEditableConfigNames() {
-    return [];
-  }
-
-}
diff --git a/modules/sms_user/src/Plugin/views/field/SmsNumber.php b/modules/sms_user/src/Plugin/views/field/SmsNumber.php
deleted file mode 100644
index d22c76b..0000000
--- a/modules/sms_user/src/Plugin/views/field/SmsNumber.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\sms_user\Plugin\views\field\SmsNumber
- */
-
-namespace Drupal\sms_user\Plugin\views\field;
-
-use Drupal\views\Plugin\views\field\FieldPluginBase;
-use Drupal\views\ResultRow;
-
-/**
- * A handler to provide displays for users' mobile phone
- *
- * @ingroup views_field_handlers
- *
- * @ViewsField("sms_number")
- */
-class SmsNumber extends FieldPluginBase {
-  /**
-   * {@inheritdoc}
-   */
-  function render(ResultRow $values) {
-    $value = $this->getValue($values);
-    return $this->sanitizeValue($value);
-  }
-}
\ No newline at end of file
diff --git a/modules/sms_user/src/Plugin/views/field/SmsStatus.php b/modules/sms_user/src/Plugin/views/field/SmsStatus.php
deleted file mode 100644
index 569dabb..0000000
--- a/modules/sms_user/src/Plugin/views/field/SmsStatus.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\sms_user\Plugin\views\field\SmsStatus
- */
-
-namespace Drupal\sms_user\Plugin\views\field;
-
-use Drupal\views\Plugin\views\field\FieldPluginBase;
-use Drupal\views\ResultRow;
-
-/**
- * Views field handler to display the sms number status.
- *
- * @ingroup views_field_handlers
- *
- * @ViewsField("sms_status")
- */
-class SmsStatus extends FieldPluginBase {
-  /**
-   * {@inheritdoc}
-   */
-  function render(ResultRow $values) {
-    $status = $this->getValue($values);
-    $status_defined = array(
-      SMS_USER_PENDING => t('Pending'),
-      SMS_USER_CONFIRMED => t('Confirmed'),
-    );
-    return $status_defined[$status];
-  }
-}
\ No newline at end of file
diff --git a/modules/sms_user/src/Plugin/views/filter/SmsStatus.php b/modules/sms_user/src/Plugin/views/filter/SmsStatus.php
deleted file mode 100644
index 5cb71d8..0000000
--- a/modules/sms_user/src/Plugin/views/filter/SmsStatus.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\sms_user\Plugin\views\filter\SmsStatus
- */
-
-namespace Drupal\sms_user\Plugin\views\filter;
-
-use Drupal\Core\Form\FormStateInterface;
-use Drupal\views\Plugin\views\filter\InOperator;
-
-/**
- * Views handler to filter users by sms phone number validation status.
- *
- * @ingroup views_filter_handlers
- *
- * @ViewsFilter("sms_status")
- */
-class SmsStatus extends InOperator {
-  /**
-   * {@inheritdoc}
-   */
-  function getValueOptions() {
-    if (!isset($this->valueOptions)) {
-      $this->valueTitle = t('Status');
-      $this->valueOptions = array(
-        SMS_USER_PENDING => t('Pending'),
-        SMS_USER_CONFIRMED => t('Confirmed'),
-      );
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  function valueForm(&$form, FormStateInterface $form_state) {
-    // Only values from that defined ones
-    parent::valueForm($form, $form_state);
-    $form['value']['#type'] = 'select';
-  }
-}
\ No newline at end of file
diff --git a/modules/sms_user/src/Tests/SmsFrameworkUserSettingsTest.php b/modules/sms_user/src/Tests/SmsFrameworkUserSettingsTest.php
index ea6abea..83057cf 100644
--- a/modules/sms_user/src/Tests/SmsFrameworkUserSettingsTest.php
+++ b/modules/sms_user/src/Tests/SmsFrameworkUserSettingsTest.php
@@ -52,7 +52,7 @@ class SmsFrameworkUserSettingsTest extends SmsFrameworkWebTestBase {
   /**
    * Tests saving form and verifying configuration is saved.
    */
-  function testSettingsForm() {
+  public function testSettingsForm() {
     $this->drupalGet(Url::fromRoute('sms_user.options'));
     $this->assertResponse(200);
 
@@ -101,7 +101,7 @@ class SmsFrameworkUserSettingsTest extends SmsFrameworkWebTestBase {
   /**
    * Tests saving form with invalid values.
    */
-  function testSettingsFormValidationFail() {
+  public function testSettingsFormValidationFail() {
     // End time < start time.
     $edit = [
       'active_hours[days][wednesday][start]' => 10,
diff --git a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php
index e5ea1c3..8edbe75 100644
--- a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php
+++ b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserAccountRegistrationServiceTest.php
@@ -75,9 +75,6 @@ class SmsFrameworkUserAccountRegistrationServiceTest extends SmsFrameworkKernelB
     $this->installSchema('system', ['sequences']);
     $this->installConfig('sms_user');
 
-    // @todo Remove table install after https://www.drupal.org/node/2677690
-    $this->installSchema('sms_user', ['sms_user']);
-
     $this->accountRegistration = $this->container->get('sms_user.account_registration');
     $this->smsProvider = $this->container->get('sms_provider');
 
diff --git a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
index d6874e1..3dcf3f8 100644
--- a/modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
+++ b/modules/sms_user/tests/src/Kernel/SmsFrameworkUserActiveHoursServiceTest.php
@@ -53,10 +53,6 @@ class SmsFrameworkUserActiveHoursServiceTest extends SmsFrameworkKernelBase {
     $this->smsProvider = $this->container->get('sms_provider');
     $this->installEntitySchema('user');
     $this->installEntitySchema('sms');
-
-    // @todo Remove when sms_user_user_load() no longer queries a 'sms_user'
-    // table.
-    $this->installSchema('sms_user', ['sms_user']);
   }
 
   /**
diff --git a/src/Entity/SmsMessage.php b/src/Entity/SmsMessage.php
index 8344499..dbd1f32 100644
--- a/src/Entity/SmsMessage.php
+++ b/src/Entity/SmsMessage.php
@@ -491,7 +491,7 @@ class SmsMessage extends ContentEntityBase implements SmsMessageInterface {
     $new = static::create();
     $new
       ->setAutomated($sms_message->isAutomated())
-      ->setSenderNumber($sms_message->getSenderNumber())
+      ->setSender($sms_message->getSender())
       ->addRecipients($sms_message->getRecipients())
       ->setMessage($sms_message->getMessage());
 
diff --git a/src/Entity/SmsMessageInterface.php b/src/Entity/SmsMessageInterface.php
index cf3b71a..9957c6d 100644
--- a/src/Entity/SmsMessageInterface.php
+++ b/src/Entity/SmsMessageInterface.php
@@ -44,23 +44,23 @@ interface SmsMessageInterface extends ContentEntityInterface, PlainSmsMessageInt
   public function setDirection($direction);
 
   /**
-   * Gets the name of the sender of this SMS message.
+   * Get phone number of the sender.
    *
-   * @return string|NULL
-   *   The name of the sender, or NULL if none is defined.
+   * @return string
+   *   The phone number of the sender.
    */
-  public function getSender();
+  public function getSenderNumber();
 
   /**
-   * Set the name of the sender of this SMS message.
+   * Set the phone number of the sender.
    *
-   * @param string $sender
-   *   The name of the sender.
+   * @param string $number
+   *   The phone number of the sender.
    *
    * @return $this
-   *   The called SMS message object.
+   *   Return SMS message for chaining.
    */
-  public function setSender($sender);
+  public function setSenderNumber($number);
 
   /**
    * Gets the entity who sent the SMS message.
diff --git a/src/Message/SmsMessage.php b/src/Message/SmsMessage.php
index ab7a767..293dfdb 100644
--- a/src/Message/SmsMessage.php
+++ b/src/Message/SmsMessage.php
@@ -22,11 +22,11 @@ class SmsMessage implements SmsMessageInterface {
   protected $uuid;
 
   /**
-   * The senders' phone number.
+   * The sender of the message.
    *
    * @var string
    */
-  protected $sender_phone_number;
+  protected $sender;
 
   /**
    * @var array
@@ -70,8 +70,8 @@ class SmsMessage implements SmsMessageInterface {
   /**
    * Creates a new instance of an SMS message.
    *
-   * @param string $sender_phone_number
-   *   (optional) The senders' phone number.
+   * @param string $sender
+   *   (optional) The sender of the message.
    * @param array $recipients
    *   (optional) The list of recipient phone numbers for the message.
    * @param string $message
@@ -81,28 +81,27 @@ class SmsMessage implements SmsMessageInterface {
    * @param int $uid
    *   (optional) The user who created the SMS message.
    */
-  public function __construct($sender_phone_number = NULL, array $recipients = [], $message = '', array $options = [], $uid = NULL) {
-    $this->setSenderNumber($sender_phone_number);
+  public function __construct($sender = '', array $recipients = [], $message = '', array $options = [], $uid = NULL) {
+    $this->sender = $sender;
     $this->addRecipients($recipients);
-    $this->setMessage($message);
     $this->message = $message;
     $this->options = $options;
-    $this->setUid($uid);
+    $this->uid = $uid;
     $this->uuid = $this->uuidGenerator()->generate();
   }
 
   /**
    * {@inheritdoc}
    */
-  public function getSenderNumber() {
-    return $this->sender_phone_number;
+  public function getSender() {
+    return $this->sender;
   }
 
   /**
    * {@inheritdoc}
    */
-  public function setSenderNumber($number) {
-    $this->sender_phone_number = $number;
+  public function setSender($sender) {
+    $this->sender = $sender;
     return $this;
   }
 
diff --git a/src/Message/SmsMessageInterface.php b/src/Message/SmsMessageInterface.php
index 6188a72..f252aab 100644
--- a/src/Message/SmsMessageInterface.php
+++ b/src/Message/SmsMessageInterface.php
@@ -180,23 +180,23 @@ interface SmsMessageInterface {
   public function removeOption($name);
 
   /**
-   * Get phone number of the sender.
+   * Gets the name of the sender of this SMS message.
    *
-   * @return string
-   *   The phone number of the sender.
+   * @return string|NULL
+   *   The name of the sender, or NULL if none is defined.
    */
-  public function getSenderNumber();
+  public function getSender();
 
   /**
-   * Set the phone number of the sender.
+   * Set the name of the sender of this SMS message.
    *
-   * @param string $number
-   *   The phone number of the sender.
+   * @param string $sender
+   *   The name of the sender.
    *
    * @return $this
-   *   Return SMS message for chaining.
+   *   The called SMS message object.
    */
-  public function setSenderNumber($number);
+  public function setSender($sender);
 
   /**
    * Gets the message to be sent.
diff --git a/src/Tests/SmsFrameworkMessageTestTrait.php b/src/Tests/SmsFrameworkMessageTestTrait.php
index cc48794..bc4ed47 100644
--- a/src/Tests/SmsFrameworkMessageTestTrait.php
+++ b/src/Tests/SmsFrameworkMessageTestTrait.php
@@ -18,16 +18,19 @@ namespace Drupal\sms\Tests;
 trait SmsFrameworkMessageTestTrait {
 
   /**
-   * Tests sender phone number.
+   * Tests recipients for SMS messages.
    *
-   * @covers ::getSenderNumber
-   * @covers ::setSenderNumber
+   * @covers ::getSender
+   * @covers ::setSender
    */
-  public function testSenderNumber() {
-    $number = '1234567890';
-    $sms_message = $this->createSmsMessage();
-    $sms_message->setSenderNumber($number);
-    $this->assertEquals($number, $sms_message->getSenderNumber());
+  public function testSender() {
+    $sms_message1 = $this->createSmsMessage();
+    $this->assertEquals(NULL, $sms_message1->getSender());
+
+    $sender = $this->randomMachineName();
+    $sms_message2 = $this->createSmsMessage();
+    $sms_message2->setSender($sender);
+    $this->assertEquals($sender, $sms_message2->getSender());
   }
 
   /**
diff --git a/src/Tests/SmsFrameworkTestTrait.php b/src/Tests/SmsFrameworkTestTrait.php
index de00e91..484d4c9 100644
--- a/src/Tests/SmsFrameworkTestTrait.php
+++ b/src/Tests/SmsFrameworkTestTrait.php
@@ -215,8 +215,7 @@ trait SmsFrameworkTestTrait {
    * @return \Drupal\sms\Message\SmsMessageInterface
    */
   protected function randomSmsMessage($uid = 1) {
-    $phone_numbers = $this->randomPhoneNumbers(1);
-    return new SmsMessage($phone_numbers[0], $this->randomPhoneNumbers(), $this->randomString(), [], $uid);
+    return new SmsMessage($this->randomString(), $this->randomPhoneNumbers(), $this->randomString(), [], $uid);
   }
 
   /**
diff --git a/tests/src/Kernel/SmsFrameworkMessageEntityTest.php b/tests/src/Kernel/SmsFrameworkMessageEntityTest.php
index 4f73ed2..ac0d76a 100644
--- a/tests/src/Kernel/SmsFrameworkMessageEntityTest.php
+++ b/tests/src/Kernel/SmsFrameworkMessageEntityTest.php
@@ -135,6 +135,19 @@ class SmsFrameworkMessageEntityTest extends SmsFrameworkKernelBase {
   }
 
   /**
+   * Tests sender phone number.
+   *
+   * @covers ::getSenderNumber
+   * @covers ::setSenderNumber
+   */
+  public function testSenderNumber() {
+    $number = '1234567890';
+    $sms_message = $this->createSmsMessage();
+    $sms_message->setSenderNumber($number);
+    $this->assertEquals($number, $sms_message->getSenderNumber());
+  }
+
+  /**
    * Tests sender entity.
    *
    * @covers ::getSenderEntity
@@ -246,11 +259,10 @@ class SmsFrameworkMessageEntityTest extends SmsFrameworkKernelBase {
     $user = User::create(['uid' => 1, 'name' => 'user']);
     $user->save();
 
-    $sender_number = $this->randomPhoneNumbers(1);
     $original = new StandardSmsMessage('', [], '', [], NULL);
     $original
       ->setAutomated(TRUE)
-      ->setSenderNumber($sender_number[0])
+      ->setSender($this->randomMachineName())
       ->addRecipients(['123123123', '456456456'])
       ->setMessage($this->randomMachineName())
       ->setUid($user->id())
@@ -260,7 +272,7 @@ class SmsFrameworkMessageEntityTest extends SmsFrameworkKernelBase {
     $sms_message = SmsMessage::convertFromSmsMessage($original);
 
     $this->assertEquals($original->isAutomated(), $sms_message->isAutomated());
-    $this->assertEquals($original->getSenderNumber(), $sms_message->getSenderNumber());
+    $this->assertEquals($original->getSender(), $sms_message->getSender());
     $this->assertEquals($original->getRecipients(), $sms_message->getRecipients());
     $this->assertEquals($original->getMessage(), $sms_message->getMessage());
     $this->assertEquals($user->id(), $sms_message->getSenderEntity()->id());
diff --git a/tests/src/Kernel/SmsFrameworkPhoneNumberProviderTest.php b/tests/src/Kernel/SmsFrameworkPhoneNumberProviderTest.php
index 468fad6..8362b7d 100644
--- a/tests/src/Kernel/SmsFrameworkPhoneNumberProviderTest.php
+++ b/tests/src/Kernel/SmsFrameworkPhoneNumberProviderTest.php
@@ -158,7 +158,7 @@ class SmsFrameworkPhoneNumberProviderTest extends SmsFrameworkKernelBase {
     $this->resetTestMessages();
     $sms_message = new SmsMessage();
     $sms_message
-      ->setSenderNumber('+999888777')
+      ->setSender('+999888777')
       ->setMessage($this->randomString());
     $this->setExpectedException(\Drupal\sms\Exception\NoPhoneNumberException::class);
     $this->phoneNumberProvider->sendMessage($entity, $sms_message);
@@ -177,7 +177,7 @@ class SmsFrameworkPhoneNumberProviderTest extends SmsFrameworkKernelBase {
 
     $sms_message = new SmsMessage();
     $sms_message
-      ->setSenderNumber('+999888777')
+      ->setSender('+999888777')
       ->setMessage($this->randomString());
     $this->phoneNumberProvider->sendMessage($entity, $sms_message);
     $this->assertEquals(1, count($this->getTestMessages($this->gateway)));
diff --git a/tests/src/Kernel/SmsFrameworkTokenTest.php b/tests/src/Kernel/SmsFrameworkTokenTest.php
index d36a354..2e0c20a 100644
--- a/tests/src/Kernel/SmsFrameworkTokenTest.php
+++ b/tests/src/Kernel/SmsFrameworkTokenTest.php
@@ -74,7 +74,7 @@ class SmsFrameworkTokenTest extends SmsFrameworkKernelBase {
     $message = $this->randomString();
     $sms_message = new SmsMessage();
     $sms_message
-      ->setSenderNumber('+999888777')
+      ->setSender('+999888777')
       ->setMessage($message)
       ->addRecipients($phone_numbers);
     $data['sms-message'] = $sms_message;
