diff --git a/src/Controller/UberAffiliate.php b/src/Controller/UberAffiliate.php
index 3a63f9a..522bea6 100644
--- a/src/Controller/UberAffiliate.php
+++ b/src/Controller/UberAffiliate.php
@@ -38,10 +38,10 @@ class UberAffiliate extends  ControllerBase {
     foreach ($result as $affiliate) {
       $affiliate_uid = $affiliate->uid;
       $affiliate_name = SafeMarkup::checkPlain($affiliate->name);
-      $affiliate_uid_display =  l($affiliate_uid, \Drupal::service('path.alias_manager')->getAliasByPath('user/' . $affiliate_uid));
-      $affiliate_name_display =  l($affiliate_name, \Drupal::service('path.alias_manager')->getAliasByPath('user/' . $affiliate_uid));
+      $affiliate_uid_display =  l($affiliate_uid, \Drupal::service('path_alias.manager')->getAliasByPath('user/' . $affiliate_uid));
+      $affiliate_name_display =  l($affiliate_name, \Drupal::service('path_alias.manager')->getAliasByPath('user/' . $affiliate_uid));
       $affiliate_active = $affiliate->active ? t('Yes') : t('No');
-      $affiliate_created = format_date($affiliate->created);
+      $affiliate_created = \Drupal::service('date.formatter')->format($affiliate->created);
       $payouts_owed_display = $payouts_symbol . $affiliate->payouts_owed;
       $payouts_paid_display = $payouts_symbol . $affiliate->payouts_paid;
       $payouts_form = '';
@@ -50,7 +50,7 @@ class UberAffiliate extends  ControllerBase {
         $payouts_paid_display = $affiliate->payouts_paid . $payouts_symbol;
       }
       if (user_access('administer affiliate settings') || user_access('administer affiliate payouts')) {
-        $payouts_form .= drupal_render(drupal_get_form('affiliate_payout_inlineform', $affiliate_uid));
+        $payouts_form .= \Drupal::service('renderer')->render(drupal_get_form('affiliate_payout_inlineform', $affiliate_uid));
       }
       $rows[] = array($affiliate_uid_display, $affiliate_name_display, $affiliate_active, $affiliate_created, $affiliate->clicks, $affiliate->referrals, $payouts_owed_display, $payouts_paid_display, $payouts_form);
     }
@@ -74,7 +74,7 @@ class UberAffiliate extends  ControllerBase {
     ];
     return [
       '#type' => '#markup',
-      '#markup' => render($build)
+      '#markup' => \Drupal::service('renderer')->render($build)
     ];
 
   }
@@ -152,6 +152,6 @@ class UberAffiliate extends  ControllerBase {
       return new RedirectResponse($url->toString());
 
     }
-    return new RedirectResponse(\Drupal\Core\Url::fromRoute($destination_actual)->toString());
+    return new RedirectResponse(Url::fromRoute($destination_actual)->toString());
   }
 }
diff --git a/src/Form/AdminContentForm.php b/src/Form/AdminContentForm.php
index 5fe9192..b456b36 100644
--- a/src/Form/AdminContentForm.php
+++ b/src/Form/AdminContentForm.php
@@ -130,14 +130,14 @@ class AdminContentForm extends ConfigFormBase {
     $rebuild_caches = (int) $form_state['values']['affiliate_module_flush_all_caches_on_admin_content_form_submit'];
     if ($rebuild_caches) {
       drupal_flush_all_caches();
-      drupal_set_message(t('All caches have been cleared and the menu router has been rebuilt to reflect your updated affiliate menu path.'));
+      $this->messenger()->addStatus(t('All caches have been cleared and the menu router has been rebuilt to reflect your updated affiliate menu path.'));
     }
     // Remind the admin to rebuild the site's menus if the affiliate menu path has changed.
     else if ($menu_path_submitted != $menu_path_current) {
-      drupal_set_message(t('The click-thru menu path appears to have changed, but no caches have been flushed and the menu router has not been updated. If you encounter "Page not found" errors, please consider re-submitting this form but selecting <em>Yes</em> under the <em>Flush all caches</em> option. Doing so will help to ensure that any stale data is removed from the database.'), 'warning');
+      $this->messenger()->addWarning(t('The click-thru menu path appears to have changed, but no caches have been flushed and the menu router has not been updated. If you encounter "Page not found" errors, please consider re-submitting this form but selecting <em>Yes</em> under the <em>Flush all caches</em> option. Doing so will help to ensure that any stale data is removed from the database.'));
     }
     else if (!drupal_valid_path($menu_path_submitted)) {
-      drupal_set_message(t('Warning: it appears as though your site requires its caches to be flushed and its menu router to be updated. Until such time, your affiliates will likely encounter "Page not found" errors due to stale information inside the database. To remove the stale information, please consider re-submitting this form but selecting <em>Yes</em> under the <em>Flush all caches</em> option.'), 'warning');
+      $this->messenger()->addWarning(t('Warning: it appears as though your site requires its caches to be flushed and its menu router to be updated. Until such time, your affiliates will likely encounter "Page not found" errors due to stale information inside the database. To remove the stale information, please consider re-submitting this form but selecting <em>Yes</em> under the <em>Flush all caches</em> option.'));
     }
   }
 
diff --git a/src/Plugin/Block/UberAffiliateBlock.php b/src/Plugin/Block/UberAffiliateBlock.php
index 83c0e79..5ae384d 100644
--- a/src/Plugin/Block/UberAffiliateBlock.php
+++ b/src/Plugin/Block/UberAffiliateBlock.php
@@ -56,7 +56,7 @@ class UberAffiliateBlock extends BlockBase {
         $userdata = unserialize($result->data);
         $homepage = (isset($userdata['affiliate_homepage']) && !empty($userdata['affiliate_homepage'])) ? check_url($userdata['affiliate_homepage']) : '';
         $username = SafeMarkup::checkPlain($result->name);
-        $name = (!empty($homepage)) ? Link::fromTextAndUrl($username, $homepage) : Link::fromTextAndUrl($username,  \Drupal::service('path.alias_manager')->getAliasByPath('user/' . $result->uid));
+        $name = (!empty($homepage)) ? Link::fromTextAndUrl($username, $homepage) : Link::fromTextAndUrl($username,  \Drupal::service('path_alias.manager')->getAliasByPath('user/' . $result->uid));
         $rows[] = array(
           array('data' => t('#@rank', array('@rank' => $rank++))),
           array('data' => $name),
@@ -76,7 +76,7 @@ class UberAffiliateBlock extends BlockBase {
     if ($results_count && $results_count > $limit) {
       $output .= [
         '#theme' => 'more_link',
-        array('url' => \Drupal::service('path.alias_manager')->getAliasByPath('affiliate/top-users'), 'title' => t('More')),
+        array('url' => \Drupal::service('path_alias.manager')->getAliasByPath('affiliate/top-users'), 'title' => t('More')),
       ];
     }
     return $output;
