diff --git a/src/Entity/CmlEntityListBuilder.php b/src/Entity/CmlEntityListBuilder.php
index 1363897..2707942 100644
--- a/src/Entity/CmlEntityListBuilder.php
+++ b/src/Entity/CmlEntityListBuilder.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\cmlapi\Entity;
 
+use Drupal\Core\Link;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityListBuilder;
 use Drupal\Core\Routing\LinkGeneratorTrait;
@@ -37,23 +38,22 @@ class CmlEntityListBuilder extends EntityListBuilder {
     /* @var $entity \Drupal\cmlapi\Entity\CmlEntity */
     $row['id'] = $entity->id();
     $time = strtotime($entity->field_cml_date->value);
-    $row['date'] = format_date($time, 'custom', 'dM H:i:s');
+    $row['date'] = \Drupal::service('date.formatter')->format($time, 'custom', 'dM H:i:s');
     $files = $entity->field_file->getValue();
     $files_output = [];
     if (!empty($files)) {
       foreach ($files as $file) {
-        $files_output[] = file_load($file['target_id'])->getFilename();
+        $files_output[] = \Drupal::service('entity_type.manager')->getStorage('file')->load($file['target_id'])->getFilename();
       }
     }
     $row['file']  = implode(', ', $files_output);
-    $row['name']  = $this->l(
-      'cml',
-      new Url(
-        'entity.cml.edit_form', array(
-          'cml' => $entity->id(),
-        )
+    // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
+    // Please manually remove the `use LinkGeneratorTrait;` statement from this class.
+    $row['name']  = Link::fromTextAndUrl('cml', new Url(
+      'entity.cml.edit_form', array(
+        'cml' => $entity->id(),
       )
-    );
+    ));
     $row['login'] = $entity->field_cml_login->value;
     $row['ip']    = $entity->field_cml_ip->value;
     $row['type']  = $entity->field_cml_type->value;
diff --git a/src/Form/CmlEntityForm.php b/src/Form/CmlEntityForm.php
index d28c086..b2906b2 100644
--- a/src/Form/CmlEntityForm.php
+++ b/src/Form/CmlEntityForm.php
@@ -34,13 +34,13 @@ class CmlEntityForm extends ContentEntityForm {
 
     switch ($status) {
       case SAVED_NEW:
-        drupal_set_message($this->t('Created the %label Cml entity.', [
+        $this->messenger()->addStatus($this->t('Created the %label Cml entity.', [
           '%label' => $entity->label(),
         ]));
         break;
 
       default:
-        drupal_set_message($this->t('Saved the %label Cml entity.', [
+        $this->messenger()->addStatus($this->t('Saved the %label Cml entity.', [
           '%label' => $entity->label(),
         ]));
     }
diff --git a/src/Service/CmlCleaner.php b/src/Service/CmlCleaner.php
index b8da963..e65514a 100644
--- a/src/Service/CmlCleaner.php
+++ b/src/Service/CmlCleaner.php
@@ -150,7 +150,7 @@ class CmlCleaner implements CmlCleanerInterface {
       $dir = $config->get('file-path');
     }
     $type = $cml->type->value;
-    $time = format_date($cml->created->value, 'custom', 'Y-m-d--H-i-s');
+    $time = \Drupal::service('date.formatter')->format($cml->created->value, 'custom', 'Y-m-d--H-i-s');
     $key = substr($cml->uuid->value, 0, 8);
     $cid = $cml->id();
     $dir = "public://{$dir}/{$type}/{$time}-$key-{$cid}";
diff --git a/src/Service/ParserCatalog.php b/src/Service/ParserCatalog.php
index 702364a..f8f393c 100644
--- a/src/Service/ParserCatalog.php
+++ b/src/Service/ParserCatalog.php
@@ -12,7 +12,7 @@ class ParserCatalog extends ParserBase {
    */
   public function parseFlatCatalog($cid = FALSE, $cache_on = TRUE) {
     $rows = FALSE;
-    $expire = REQUEST_TIME + 60 * 60 * 24 * 1;
+    $expire = \Drupal::time()->getRequestTime() + 60 * 60 * 24 * 1;
     $uri = $this->cmlService->getFilePath($cid, 'import');
     if ($uri) {
       $rows = &drupal_static("ParserCatalog::getRows():$uri");
diff --git a/src/Service/ParserOffers.php b/src/Service/ParserOffers.php
index 709d40b..4cd1eb3 100644
--- a/src/Service/ParserOffers.php
+++ b/src/Service/ParserOffers.php
@@ -14,7 +14,7 @@ class ParserOffers extends ParserBase {
    */
   public function parse($cid = FALSE, $cache_on = TRUE) {
     $size = 300;
-    $expire = REQUEST_TIME + 60 * 60 * 24 * 1;
+    $expire = \Drupal::time()->getRequestTime() + 60 * 60 * 24 * 1;
     $rows = FALSE;
     $uri = $this->cmlService->getFilePath($cid, 'offers');
     if ($uri) {
@@ -60,7 +60,7 @@ class ParserOffers extends ParserBase {
    */
   public function parseArray($cid = FALSE, $cache_on = TRUE) {
     $size = 300;
-    $expire = REQUEST_TIME + 60 * 60 * 24 * 1;
+    $expire = \Drupal::time()->getRequestTime() + 60 * 60 * 24 * 1;
     $rows = FALSE;
     $uri = $this->cmlService->getFilePath($cid, 'offers');
     if ($uri) {
diff --git a/src/Service/ParserProduct.php b/src/Service/ParserProduct.php
index 64149d9..ff27109 100644
--- a/src/Service/ParserProduct.php
+++ b/src/Service/ParserProduct.php
@@ -14,7 +14,7 @@ class ParserProduct extends ParserBase {
    */
   public function parse($cid = FALSE, $cache_on = TRUE) {
     $size = 300;
-    $expire = REQUEST_TIME + 60 * 60 * 24 * 1;
+    $expire = \Drupal::time()->getRequestTime() + 60 * 60 * 24 * 1;
     $rows = FALSE;
     $uri = $this->cmlService->getFilePath($cid, 'import');
     if ($uri) {
diff --git a/src/Service/XmlParser.php b/src/Service/XmlParser.php
index 8cd3345..ef2819d 100644
--- a/src/Service/XmlParser.php
+++ b/src/Service/XmlParser.php
@@ -63,7 +63,7 @@ class XmlParser implements XmlParserInterface {
    * Get Last.
    */
   public function xmlString($uri) {
-    $filepath = drupal_realpath($uri);
+    $filepath = \Drupal::service('file_system')->realpath($uri);
     return $filepath;
   }
 
@@ -71,7 +71,7 @@ class XmlParser implements XmlParserInterface {
    * Parse_xml_file.
    */
   public function parseXmlFile($file_uri) {
-    $filepath = drupal_realpath($file_uri);
+    $filepath = \Drupal::service('file_system')->realpath($file_uri);
     $this->xmlString = NULL;
 
     if (is_file($filepath) && is_readable($filepath)) {
