diff --git a/simple_node_importer.install b/simple_node_importer.install
index afced04..4401b28 100755
--- a/simple_node_importer.install
+++ b/simple_node_importer.install
@@ -18,7 +18,9 @@ function simple_node_importer_uninstall() {
 
   // Delete all nodes when module gets uninstalled.
   if (!empty($nodes)) {
-    entity_delete_multiple('node', $nodes);
+    $storage_handler = \Drupal::entityTypeManager()->getStorage("node");
+    $entities = $storage_handler->loadMultiple($nodes);
+    $storage_handler->delete($entities);
   }
 
   // Load simple node node type bundle.
@@ -30,8 +32,9 @@ function simple_node_importer_uninstall() {
   }
 
   $table = 'node_resolution';
-  if (db_table_exists($table)) {
-    db_drop_table($table);
+  $getschema = \Drupal::database()->schema();
+  if ($getschema->tableExists($table)) {
+    $getschema->dropTable($table);
   }
 }
 
@@ -40,8 +43,9 @@ function simple_node_importer_uninstall() {
  */
 function simple_node_importer_schema() {
   $schema = [];
+  $getschema = \Drupal::database()->schema();
   $table = 'node_resolution';
-  if (!db_table_exists($table)) {
+  if (!$getschema->tableExists($table)) {
     $schema['node_resolution'] = [
       'description' => 'The base table for saving rows which fails while importing Nodes.',
       'fields' => [
