diff --git a/drush/simplehtmldom.drush.inc b/drush/simplehtmldom.drush.inc
new file mode 100644
index 0000000..6a3a5f5
--- /dev/null
+++ b/drush/simplehtmldom.drush.inc
@@ -0,0 +1 @@
+<?php/** * @file *   drush integration for simplehtmldom. *//** * The simplehtmldom plugin URI. */define('SIMPLEHTMLDOM_DOWNLOAD_URI', 'https://github.com/konstantin-komelin/simplehtmldom/archive/master.zip');define('SIMPLEHTMLDOM_DOWNLOAD_PREFIX', 'simplehtmldom-');/** * Implementation of hook_drush_command(). * * In this hook, you specify which commands your * drush module makes available, what it does and * description. * * Notice how this structure closely resembles how * you define menu hooks. * * See `drush topic docs-commands` for a list of recognized keys. * * @return *   An associative array describing your command(s). */function simplehtmldom_drush_command() {  $items = array();  // the key in the $items array is the name of the command.  $items['simplehtmldom-plugin'] = array(    'callback' => 'drush_simplehtmldom_plugin',    'description' => dt('Download and install the simplehtmldom plugin.'),    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, // No bootstrap.    'arguments' => array(      'path' => dt('Optional. A path where to install the simplehtmldom plugin. If omitted Drush will use the default location.'),    ),    'aliases' => array('simplehtmldomplugin'),  );  return $items;}/** * Implementation of hook_drush_help(). * * This function is called whenever a drush user calls * 'drush help <name-of-your-command>' * * @param *   A string with the help section (prepend with 'drush:') * * @return *   A string with the help text for your command. */function simplehtmldom_drush_help($section) {  switch ($section) {    case 'drush:simplehtmldom-plugin':      return dt('Download and install the simplehtmldom plugin from https://github.com/konstantin-komelin/simplehtmldom/archive/master.zip, default location is sites/all/libraries.');  }}/** * Command to download the simplehtmldom plugin. */function drush_simplehtmldom_plugin() {  $args = func_get_args();  if (!empty($args[0])) {    $path = $args[0];  }  else {    $path = 'sites/all/libraries';  }  // Create the path if it does not exist.  if (!is_dir($path)) {    drush_op('mkdir', $path);    drush_log(dt('Directory @path was created', array('@path' => $path)), 'notice');  }  // Set the directory to the download location.  $olddir = getcwd();  chdir($path);  // Download the zip archive  if ($filepath = drush_download_file(SIMPLEHTMLDOM_DOWNLOAD_URI)) {    $filename = basename($filepath);    $dirname = SIMPLEHTMLDOM_DOWNLOAD_PREFIX . basename($filepath, '.zip');    // Remove any existing simplehtmldom plugin directory    if (is_dir($dirname) || is_dir('simplehtmldom')) {      drush_delete_dir($dirname, TRUE);      drush_delete_dir('simplehtmldom', TRUE);      drush_log(dt('A existing simplehtmldom plugin was deleted from @path', array('@path' => $path)), 'notice');    }    // Decompress the zip archive    drush_tarball_extract($filename);    // Change the directory name to "simplehtmldom" if needed.    if ($dirname != 'simplehtmldom') {      drush_move_dir($dirname, 'simplehtmldom', TRUE);      $dirname = 'simplehtmldom';    }  }  if (is_dir($dirname)) {    drush_log(dt('simplehtmldom plugin has been installed in @path', array('@path' => $path)), 'success');  }  else {    drush_log(dt('Drush was unable to install the simplehtmldom plugin to @path', array('@path' => $path)), 'error');  }  // Set working directory back to the previous working directory.  chdir($olddir);}
\ No newline at end of file
diff --git a/simplehtmldom.install b/simplehtmldom.install
index 98f91fc..d2a1aaa 100644
--- a/simplehtmldom.install
+++ b/simplehtmldom.install
@@ -1,33 +1 @@
-<?php
-/**
- * @file
- * Install, update and requirements hooks for the module.
- */
-
-/**
- * Implements hook_requirements().
- */
-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'),
-  );
-
-  // 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']['severity'] = REQUIREMENT_OK;
-  }
-  else {
-    $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');
-  }
-
-  return $requirements;
-}
+<?php/** * @file * Install, update and requirements hooks for the module. *//** * Implements hook_requirements(). */function simplehtmldom_requirements($phase) {  $requirements = array();  // Ensure translations do not break at install time.  $t = get_t();  // Include the helper file.  module_load_include('inc', 'simplehtmldom', 'helper');  if ($phase == 'runtime') {    $t = get_t();    $library = libraries_detect('simplehtmldom');    $error_type = isset($library['error']) ? drupal_ucfirst($library['error']) : '';    $error_message = isset($library['error message']) ? $library['error message'] : '';    if (empty($library['installed'])) {      $requirements['simplehtmldom_plugin'] = array(        'title' => $t('simplehtmldom plugin'),        'value' => $t('@e: At least @a', array('@e' => $error_type, '@a' => SIMPLEHTMLDOM_MIN_PLUGIN_VERSION)),        'severity' => REQUIREMENT_ERROR,        'description' => $t('!error You need to download the !simplehtmldom, extract the archive and place the simplehtmldom directory in the %path directory on your server.', array('!error' => $error_message, '!simplehtmldom' => l($t('simplehtmldom plugin'), $library['download url']), '%path' => 'sites/all/libraries')),      );    }    elseif (version_compare($library['version'], SIMPLEHTMLDOM_MIN_PLUGIN_VERSION, '>=')) {      $requirements['simplehtmldom_plugin'] = array(        'title' => $t('simplehtmldom plugin'),        'severity' => REQUIREMENT_OK,        'value' => $library['version'],        'description' => $t('"PHP Simple HTML DOM Parser" library'),      );    }    else {      $requirements['simplehtmldom_plugin'] = array(        'title' => $t('simplehtmldom plugin'),        'value' => $t('At least @a', array('@a' => SIMPLEHTMLDOM_MIN_PLUGIN_VERSION)),        'severity' => REQUIREMENT_ERROR,        'description' => $t('You need to download a later version of the !simplehtmldom and replace the old version located in the %path directory on your server.', array('!simplehtmldom' => l($t('simplehtmldom plugin'), $library['download url']), '%path' => $library['library path'])),      );    }  return $requirements;}}
\ No newline at end of file
diff --git a/simplehtmldom.module b/simplehtmldom.module
index de3da99..2fa7718 100644
--- a/simplehtmldom.module
+++ b/simplehtmldom.module
@@ -1,42 +1 @@
-<?php
-/**
- * @file
- * Include the only file of the library.
- *
- * There are 5-6 funcs there and their names are not prefixed.
- * But these names are quite rare to cause collisions.
- */
-
-// Include the helper file.
-module_load_include('inc', 'simplehtmldom', 'helper');
-
-if (!function_exists('str_get_html')) {
-  $simplehtmldom_library_path = _simplhtmldom_get_library_path();
-  if (!empty($simplehtmldom_library_path)) {
-    require_once $simplehtmldom_library_path;
-  }
-}
-else {
-  drupal_set_message(t('The simplehtmldom API module found that you define its functions before it does itself! Somewhere in your drupal files there must be a copy of the PHP Simple HTML DOM Parser library that you do not need if you use this module. Please remove the old library or move it to sites/all/libraries/simplehtmldom folder.'), 'error');
-}
-
-
-/**
- * Implements hook_libraries_info().
- */
-function simplehtmldom_libraries_info() {
-  $libraries['simplehtmldom'] = array(
-    'name' => 'PHP Simple HTML DOM Parser',
-    'vendor url' => 'http://simplehtmldom.sourceforge.net',
-    'download url' => 'http://sourceforge.net/projects/simplehtmldom/files/',
-    'version arguments' => array(
-      'file' => 'simple_html_dom.php',
-      'pattern' => '/version ([0-9\.]+)/',
-      'lines' => 40,
-    ),
-    'files' => array(
-      'php' => array('simple_html_dom.php'),
-    ),
-  );
-  return $libraries;
-}
+<?php/** * @file * Include the only file of the library. * * There are 5-6 funcs there and their names are not prefixed. * But these names are quite rare to cause collisions. */define('SIMPLEHTMLDOM_MIN_PLUGIN_VERSION', '1.5');// Include the helper file.module_load_include('inc', 'simplehtmldom', 'helper');if (!function_exists('str_get_html')) {  $simplehtmldom_library_path = _simplhtmldom_get_library_path();  if (!empty($simplehtmldom_library_path)) {    require_once $simplehtmldom_library_path;  }}else {  drupal_set_message(t('The simplehtmldom API module found that you define its functions before it does itself! Somewhere in your drupal files there must be a copy of the PHP Simple HTML DOM Parser library that you do not need if you use this module. Please remove the old library or move it to sites/all/libraries/simplehtmldom folder.'), 'error');}/** * Implements hook_libraries_info(). */function simplehtmldom_libraries_info() {  $libraries['simplehtmldom'] = array(    'name' => 'PHP Simple HTML DOM Parser',    'vendor url' => 'http://simplehtmldom.sourceforge.net',    'download url' => 'http://sourceforge.net/projects/simplehtmldom/files/',    'version arguments' => array(      'file' => 'simple_html_dom.php',      'pattern' => '/version ([0-9\.]+)/',      'lines' => 40,    ),    'files' => array(      'php' => array('simple_html_dom.php'),    ),  );  return $libraries;}
\ No newline at end of file
