diff --git a/swfupload.install b/swfupload.install
index 94c213b..a61b10d 100644
--- a/swfupload.install
+++ b/swfupload.install
@@ -9,5 +9,27 @@
  * Implementation of hook_uninstall().
  */
 function swfupload_uninstall() {
-  db_query('DELETE FROM {variable} WHERE name LIKE "swfupload_setting_%"');
+  db_delete('DELETE FROM {variable} WHERE name LIKE :name', array(':name' => 'swfupload_setting_%'));
+}
+
+
+/**
+ * Implements hook_requirements().
+ */
+function swfupload_requirements($phase) {
+  $requirements = array();
+  $library = libraries_load('swfupload');
+
+  // Ensure translations don't break at install time
+  $t = get_t();
+
+  // Report Drupal version
+  if ($phase == 'runtime') {
+    $requirements['swfupload'] = array(
+      'title' => $t('SWFUpload'),
+      'value' => empty($library) ? t('SWFUpload library was not found!') : $library['version'],
+      'severity' => empty($library) ? REQUIREMENT_ERROR : REQUIREMENT_OK,
+    );
+  }
+  return $requirements;
 }
diff --git a/swfupload.module b/swfupload.module
index e2cf5e2..e5687ac 100644
--- a/swfupload.module
+++ b/swfupload.module
@@ -9,10 +9,15 @@ include_once dirname(__FILE__) . '/swfupload_widget.inc';
  */
 
 /**
- * Implements hook_perm().
+ * Implements hook_permission().
  */
-function swfupload_perm() {
-  return array('upload files with swfupload');
+function swfupload_permission() {
+  return array(
+    'upload files with swfupload' => array(
+      'title' => t('Upload files with SWFUpload'),
+      'description' => t('Allows the user to upload multiple files using SWFUpload.'),
+    ),
+  );
 }
 
 /**
@@ -103,7 +108,7 @@ function swfupload_theme() {
 }
 
 /**
- * Implements hook_elements().
+ * Implements hook_element_info().
  */
 function swfupload_element_info() {
   $path = drupal_get_path('module', 'swfupload');
@@ -212,7 +217,7 @@ function swfupload_swfupload(&$file, $op, &$instance, $instance_settings) {
 }
 
 /**
- * Implements hook_library().
+ * Implements hook_libraries_info().
  */
 function swfupload_libraries_info() {
   $libraries = array(
@@ -233,27 +238,6 @@ function swfupload_libraries_info() {
 }
 
 /**
- * Implements hook_requirements().
- */
-function swfupload_requirements($phase) {
-  $requirements = array();
-  $library = libraries_load('swfupload');
-
-  // Ensure translations don't break at install time
-  $t = get_t();
-
-  // Report Drupal version
-  if ($phase == 'runtime') {
-    $requirements['swfupload'] = array(
-      'title' => $t('SWFUpload'),
-      'value' => empty($library) ? t('SWFUpload library was not found!') : $library['version'],
-      'severity' => empty($library) ? REQUIREMENT_ERROR : REQUIREMENT_OK,
-    );
-  }
-  return $requirements;
-}
-
-/**
  * Generates an unique key, used for validating  upload requests
  */
 function _swfupload_post_key() {
@@ -282,4 +266,4 @@ function swfupload_thumb($file) {
   // Force an object.
   $file = (object) $file;
   return image_style_url('thumbnail', $file->uri);
-}
\ No newline at end of file
+}
