diff --git a/helper.inc b/helper.inc
index 0a53357..3dd6a6e 100644
--- a/helper.inc
+++ b/helper.inc
@@ -22,7 +22,7 @@ function _simplhtmldom_get_library_path() {
   }
 
   // Support libraries module.
-  if (module_exists('libraries') && function_exists('libraries_get_path')) {
+  if (\Drupal::moduleHandler()->moduleExists('libraries') && function_exists('libraries_get_path')) {
     $library_path = libraries_get_path($library) . "/$file";
     if (file_exists($library_path)) {
       return $library_path;
@@ -33,8 +33,9 @@ function _simplhtmldom_get_library_path() {
       'sites/all/libraries/' . $library,
       drupal_get_path('module', 'simplehtmldom') . '/' . $library,
       drupal_get_path('module', 'simplehtmldom') . "/libraries",
-      'profiles/' . variable_get('install_profile', 'default') . '/libraries/' . $library,
+      'profiles/' . drupal_get_profile() . '/libraries/' . $library,
     );
+
     foreach ($paths as $library_dir) {
       $library_path = $library_dir . "/$file";
       if (file_exists($library_path)) {
diff --git a/simplehtmldom.info b/simplehtmldom.info
deleted file mode 100644
index 1a69126..0000000
--- a/simplehtmldom.info
+++ /dev/null
@@ -1,4 +0,0 @@
-name = simplehtmldom API
-description = A bridge between the PHP Simple HTML DOM Parser library and Drupal.
-core = 7.x
-
diff --git a/simplehtmldom.info.yml b/simplehtmldom.info.yml
new file mode 100644
index 0000000..068b224
--- /dev/null
+++ b/simplehtmldom.info.yml
@@ -0,0 +1,5 @@
+name: simplehtmldom API
+type: module
+description: 'A bridge between the PHP Simple HTML DOM Parser library and Drupal.'
+version: VERSION
+core: 8.x
diff --git a/simplehtmldom.install b/simplehtmldom.install
index 98f91fc..fd43d31 100644
--- a/simplehtmldom.install
+++ b/simplehtmldom.install
@@ -10,23 +10,22 @@
 function simplehtmldom_requirements($phase) {
   $requirements = array();
   // Ensure translations do not break at install time.
-  $t = get_t();
 
   $requirements['simple_html_dom'] = array(
-    'title' => $t('"PHP Simple HTML DOM Parser" library'),
+    'title' => t('PHP Simple HTML DOM Parser library'),
   );
 
   // Include the helper file.
   module_load_include('inc', 'simplehtmldom', 'helper');
 
   if (_simplhtmldom_get_library_path()) {
-    $requirements['simple_html_dom']['value'] = $t('Installed');
+    $requirements['simple_html_dom']['value'] = t('Installed');
     $requirements['simple_html_dom']['severity'] = REQUIREMENT_OK;
   }
   else {
-    $requirements['simple_html_dom']['value'] = $t('not installed');
+    $requirements['simple_html_dom']['value'] = t('not installed');
     $requirements['simple_html_dom']['severity'] = REQUIREMENT_ERROR;
-    $requirements['simple_html_dom']['description'] = $t('simple_html_dom.php is missing. Please copy the latest version of simple_html_dom.php (PHP Simple HTML DOM Parser library) from http://sourceforge.net/projects/simplehtmldom/ to you libraries folder, for example sites/all/libraries/simplehtmldom/simple_html_dom.php');
+    $requirements['simple_html_dom']['description'] = t('simple_html_dom.php is missing. Please copy the latest version of simple_html_dom.php (PHP Simple HTML DOM Parser library) from http://sourceforge.net/projects/simplehtmldom/ to you libraries folder, for example sites/all/libraries/simplehtmldom/simple_html_dom.php');
   }
 
   return $requirements;
