diff --git a/new_relic_rpm.drush.inc b/new_relic_rpm.drush.inc
index d390279..dcb0044 100644
--- a/new_relic_rpm.drush.inc
+++ b/new_relic_rpm.drush.inc
@@ -5,11 +5,11 @@
  */
 
 /**
- * Implementation of hook_drush_init().
+ * Implements hook_drush_init().
  */
 function new_relic_rpm_drush_init() {
   // Make sure we have access to the needed functions.
-  require_once dirname(__FILE__) . '/new_relic_rpm.module';
+  require_once DRUPAL_ROOT . '/' . dirname(__FILE__) . '/new_relic_rpm.module';
   // Set job state
   new_relic_rpm_set_job_state(variable_get('new_relic_rpm_track_drush', 'norm'));
 }
diff --git a/new_relic_rpm.info b/new_relic_rpm.info
index 98a0d09..5fcf9fc 100644
--- a/new_relic_rpm.info
+++ b/new_relic_rpm.info
@@ -2,5 +2,5 @@
 name = New Relic RPM
 description = Integration with the New Relic RPM reporting and optimization system.
 version = "6.x-1.0"
-core = 6.x
+core = 7.x
 project = "new_relic_rpm"
\ No newline at end of file
diff --git a/new_relic_rpm.install b/new_relic_rpm.install
index 9137226..185b24f 100644
--- a/new_relic_rpm.install
+++ b/new_relic_rpm.install
@@ -5,12 +5,19 @@
  */
 
 /**
- * Implement hook_install().
+ * Implements hook_install().
  */
 function new_relic_rpm_install() {
   // Set New Relic RPM module's weight to very low so we can trigger job state
   // changes early. This can be important in cases like hook_cron().
-  db_query("UPDATE {system} SET weight = -20 WHERE name = 'new_relic_rpm'");
+  // TODO Please review the conversion of this statement to the D7 database API syntax.
+  /* db_query("UPDATE {system} SET weight = -20 WHERE name = 'new_relic_rpm'") */
+  db_update('system')
+  ->fields(array(
+    'weight' => -20,
+  ))
+  ->condition('name', 'new_relic_rpm')
+  ->execute();
 }
 
 /**
@@ -27,7 +34,7 @@ function new_relic_rpm_enable() {
 }
 
 /**
- * Implement hook_uninstall().
+ * Implements hook_uninstall().
  */
 function new_relic_rpm_uninstall() {
 
@@ -48,8 +55,12 @@ function new_relic_rpm_uninstall() {
  */
 function new_relic_rpm_update_6001() {
   $ret = array();
-  $ret[] = update_sql("UPDATE {system} SET weight = -20 WHERE name = 'new_relic_rpm'");
-  return $ret;
+  // TODO update_sql has been removed. Use the database API for any schema or data changes.
+  $ret[] = array() /* update_sql("UPDATE {system} SET weight = -20 WHERE name = 'new_relic_rpm'") */;
+  // hook_update_N() no longer returns a $ret array. Instead, return
+  // nothing or a translated string indicating the update ran successfully.
+  // See http://drupal.org/node/224333#update_sql.
+  return t('TODO Add a descriptive string here to show in the UI.') /* $ret */;
 }
 
 /**
diff --git a/new_relic_rpm.module b/new_relic_rpm.module
index abcf944..34623f2 100644
--- a/new_relic_rpm.module
+++ b/new_relic_rpm.module
@@ -5,7 +5,7 @@
  */
 
 /**
- * Implementation of hook_menu().
+ * Implements hook_menu().
  */
 function new_relic_rpm_menu() {
   $items['admin/content/new-relic-rpm'] = array(
@@ -16,7 +16,7 @@ function new_relic_rpm_menu() {
     'access arguments' => array('create new relic rpm deployments'),
     'file' => 'new_relic_rpm.settings.inc',
   );
-  $items['admin/settings/new-relic-rpm'] = array(
+  $items['admin/config/new-relic-rpm'] = array(
     'title' => 'New Relic RPM Settings',
     'description' => 'Alter settings and mange your New Relic RPM Integration.',
     'page callback' => 'drupal_get_form',
@@ -44,18 +44,27 @@ function new_relic_rpm_menu() {
 }
 
 /**
- * Implementation of hook_perm().
+ * Implements hook_permission().
  */
-function new_relic_rpm_perm() {
+function new_relic_rpm_permission() {
   return array(
-    'administer new relic rpm',
-    'view new relic rpm reports',
-    'create new relic rpm deployments',
+    'administer new relic rpm' => array(
+      'title' => t('administer new relic rpm'),
+      'description' => t('TODO Add a description for \'administer new relic rpm\''),
+    ),
+    'view new relic rpm reports' => array(
+      'title' => t('view new relic rpm reports'),
+      'description' => t('TODO Add a description for \'view new relic rpm reports\''),
+    ),
+    'create new relic rpm deployments' => array(
+      'title' => t('create new relic rpm deployments'),
+      'description' => t('TODO Add a description for \'create new relic rpm deployments\''),
+    ),
   );
 }
 
 /**
- * Implementation of hook_cron().
+ * Implements hook_cron().
  *
  * This is used to set cron tasks to be not tracked by RPM if so desired.
  */
@@ -65,7 +74,7 @@ function new_relic_rpm_cron() {
 }
 
 /**
- * Implementation of hook_boot().
+ * Implements hook_boot().
  *
  * This is used to set various RPM settings by URL.
  */
@@ -98,25 +107,9 @@ function new_relic_rpm_boot() {
 }
 
 /**
- * Implementation of hook_form_alter().
- *
- * Add a submit action to the system_module enable/disable form
+ * @todo Please document this function.
+ * @see http://drupal.org/node/1354
  */
-function new_relic_rpm_form_system_modules_alter(&$form, &$form_state) {
-
-  if (variable_get('new_relic_rpm_module_deployment', FALSE) &&
-      // If the API Key and/or App name is/are not set, there is no sense in
-      // attempting to create deployments.
-      ini_get('newrelic.appname') &&
-      variable_get('new_relic_rpm_api_key', '')) {
-
-    // We need our module check to run first--before the actuall install is done by Drupal.
-    $form['#submit'][-1000] = 'new_relic_rpm_modules_enabled';
-    ksort($form['#submit']);
-    reset($form['#submit']);
-  }
-}
-
 function new_relic_rpm_set_job_state($setting) {
   static $newrelic_module;
 
@@ -147,68 +140,22 @@ function new_relic_rpm_set_job_state($setting) {
 }
 
 /**
- * Submit callback for system module page.
- *
- * Because we need to determine which modules Drupal is going to install, we
- * are going to perform the same actions as the actual module install process,
- * minus the actual installation of the modules.
+ * Implements hook_modules_enabled().
  */
-function new_relic_rpm_modules_enabled($form, &$form_state) {
-  include_once './includes/install.inc';
-  $new_modules = array();
-  $enable_modules = array();
-  $disable_modules = array();
-
-  // If we are coming from the confirm form...
-  if (!isset($form_state['storage'])) {
-    // Merge in disabled active modules since they should be enabled.
-    // They don't appear because disabled checkboxes are not submitted
-    // by browsers.
-    $form_state['values']['status'] = array_merge($form_state['values']['status'], $form_state['values']['disabled_modules']);
-
-    // Check values for dependency that we can't install.
-    $dependencies = system_module_build_dependencies($form_state['values']['validation_modules'], $form_state['values']);
-
-  }
-  else {
-    $dependencies = NULL;
-  }
-
-  // Return if there are dependencies and they were not yet confirmed.
-  if ($dependencies && !isset($form_state['values']['confirm'])) {
-    return;
-  }
-
-  // Dependencies are covered. Drupal is going to install modules. Find out which.
-  foreach ($form_state['values']['status'] as $key => $choice) {
-    if ($choice) {
-      if (drupal_get_installed_schema_version($key) == SCHEMA_UNINSTALLED) {
-        $new_modules[] = $key;
-      }
-      else {
-        $enable_modules[] = $key;
-      }
-    }
-    else {
-      $disable_modules[] = $key;
-    }
-  }
-
-  // Validate new modules.
-  foreach ($new_modules as $key => $module) {
-    if (!drupal_check_module($module)) {
-      unset($new_modules[$key]);
-    }
+function new_relic_rpm_modules_enabled($modules) {
+  // Make the Deploy call to New Relic.
+  if (!empty($modules)) {
+    new_relic_rpm_module_deploy($modules, NULL);
   }
+}
 
-  $old_module_list = module_list();
-
-  $new_modules = array_diff(array_merge($enable_modules, $new_modules), $old_module_list);
-  $disable_modules = array_intersect($disable_modules, $old_module_list);
-
+/**
+ * Implements hook_modules_disabled().
+ */
+function new_relic_rpm_modules_disabled($modules) {
   // Make the Deploy call to New Relic.
-  if (!empty($new_modules) || !empty($disable_modules)) {
-    new_relic_rpm_module_deploy($new_modules, $disable_modules);
+  if (!empty($modules)) {
+    new_relic_rpm_module_deploy(NULL, $modules);
   }
 }
 
@@ -216,26 +163,32 @@ function new_relic_rpm_modules_enabled($form, &$form_state) {
  * Log module enable/disable actions as a deploy call to New Relic RPM.
  */
 function new_relic_rpm_module_deploy($new_modules, $disable_modules) {
-  $modules_installed = !empty($new_modules);
-  $modules_removed = !empty($disable_modules);
+  // If the API Key and/or App name is/are not set, there is no sense in
+  // attempting to create deployments.
+  if (variable_get('new_relic_rpm_module_deployment', FALSE) &&
+      ini_get('newrelic.appname') &&
+      variable_get('new_relic_rpm_api_key', '')) {
+    $modules_installed = !empty($new_modules);
+    $modules_removed = !empty($disable_modules);
 
-  if ($modules_installed) {
-    $m_inst = 'Modules Installed: ' . implode(', ', $new_modules ) . "\n";
-  }
-  else {
-    $m_inst = '';
-  }
+    if ($modules_installed) {
+      $m_inst = 'Modules Installed: ' . implode(', ', $new_modules ) . "\n";
+    }
+    else {
+      $m_inst = '';
+    }
 
-  if ($modules_removed) {
-    $m_remv = 'Modules Removed: ' . implode(', ', $disable_modules) . "\n";
-  }
-  else {
-    $m_remv = '';
-  }
+    if ($modules_removed) {
+      $m_remv = 'Modules Removed: ' . implode(', ', $disable_modules) . "\n";
+    }
+    else {
+      $m_remv = '';
+    }
 
-  _new_relic_rpm_deploy('Drupal Module Install/Uninstall',
-    'Drupal modules were installed: ' . ($modules_installed ? 'YES' : 'NO') . ' and uninstalled: ' . ($modules_removed ? 'YES' : 'NO'),
-    $m_inst . $m_remv);
+    _new_relic_rpm_deploy('Drupal Module Install/Uninstall',
+      'Drupal modules were installed: ' . ($modules_installed ? 'YES' : 'NO') . ' and uninstalled: ' . ($modules_removed ? 'YES' : 'NO'),
+      $m_inst . $m_remv);
+  }
 }
 
 /**
@@ -269,6 +222,7 @@ function new_relic_rpm_curl($url, $post = array()) {
   curl_setopt($ch, CURLOPT_URL, $url);
   curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
+  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
   if (!empty($post)) {
     curl_setopt($ch, CURLOPT_POST, TRUE);
     curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
@@ -299,6 +253,6 @@ function new_relic_rpm_curl($url, $post = array()) {
  *   1 if there is a match, 0 if there is not a match.
  */
 function new_relic_rpm_page_match($path, $patterns) {
-  $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($patterns, '/')) .')$/';
+  $regexp = '/^(' . preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1' . preg_quote(variable_get('site_frontpage', 'node'), '/') . '\2'), preg_quote($patterns, '/')) . ')$/';
   return preg_match($regexp, $path);
 }
diff --git a/new_relic_rpm.reports.inc b/new_relic_rpm.reports.inc
index 61ef7e3..1ab93ff 100644
--- a/new_relic_rpm.reports.inc
+++ b/new_relic_rpm.reports.inc
@@ -12,7 +12,7 @@ function new_relic_rpm_reporting() {
   // If no API key is set, break here and error out.
   $api_key = variable_get('new_relic_rpm_api_key', '');
   if (empty($api_key)) {
-    drupal_set_message(t('You need to enter your New Relic API key from your New Relic account settings page before you are able to view reports within Drupal. Visit the <a href="@settings">New Relic RPM Drupal admin page</a> to enter your API key.', array('@settings' => url('admin/settings/new-relic-rpm'))), 'error');
+    drupal_set_message(t('You need to enter your New Relic API key from your New Relic account settings page before you are able to view reports within Drupal. Visit the <a href="@settings">New Relic RPM Drupal admin page</a> to enter your API key.', array('@settings' => url('admin/config/new-relic-rpm'))), 'error');
     return '<h2>' . t('No API key found.') . '</h2>';
   }
 
@@ -26,7 +26,7 @@ function new_relic_rpm_reporting() {
   }
   // Error out of the return is False, store data if it is good.
   if (!$app_health) {
-    drupal_set_message(t('The New Relic REST API has denied your key. Either the key you entered on the <a href="@settings">New Relic RPM Drupal admin page</a> is incorrect, or you have not enabled API access for this application within the New Relic RPM webiste.', array('@settings' => url('admin/settings/new-relic-rpm'))), 'error');
+    drupal_set_message(t('The New Relic REST API has denied your key. Either the key you entered on the <a href="@settings">New Relic RPM Drupal admin page</a> is incorrect, or you have not enabled API access for this application within the New Relic RPM webiste.', array('@settings' => url('admin/config/new-relic-rpm'))), 'error');
     return '<h2>' . t('API access denied.') . '</h2>';
   }
   else {
@@ -47,7 +47,7 @@ function new_relic_rpm_reporting_details($cust_id, $app_id) {
   // If no API key is set, break here and error out.
   $api_key = variable_get('new_relic_rpm_api_key', '');
   if (empty($api_key)) {
-    drupal_set_message(t('You need to enter your New Relic API key from your New Relic account settings page before you are able to view reports within Drupal. Visit the <a href="@settings">New Relic RPM Drupal admin page<a/> to enter your API key.', array('@settings' => url('admin/settings/new-relic-rpm'))), 'error');
+    drupal_set_message(t('You need to enter your New Relic API key from your New Relic account settings page before you are able to view reports within Drupal. Visit the <a href="@settings">New Relic RPM Drupal admin page<a/> to enter your API key.', array('@settings' => url('admin/config/new-relic-rpm'))), 'error');
     return '<h2>' . t('No API key found.') . '</h2>';
   }
 
@@ -61,7 +61,7 @@ function new_relic_rpm_reporting_details($cust_id, $app_id) {
 
   // Error out if value is false, save cached copy of XML if it is good.
   if (!$app_dashboard) {
-    drupal_set_message(t('The New Relic REST API has denied your key. Either the key you entered on the <a href="@settings">New Relic RPM Drupal admin page</a> is incorrect, or you have not enabled API access for this application within the New Relic RPM webiste.', array('@settings' => url('admin/settings/new-relic-rpm'))), 'error');
+    drupal_set_message(t('The New Relic REST API has denied your key. Either the key you entered on the <a href="@settings">New Relic RPM Drupal admin page</a> is incorrect, or you have not enabled API access for this application within the New Relic RPM webiste.', array('@settings' => url('admin/config/new-relic-rpm'))), 'error');
     return '<h2>' . t('API access denied.') . '</h2>';
   }
   else {
@@ -86,23 +86,23 @@ function new_relic_rpm_reporting_details($cust_id, $app_id) {
 function new_relic_rpm_render_health($app_health) {
 
   $app_obj = simplexml_load_string($app_health);
-  $cust_id = (string)$app_obj->account->id;
+  $cust_id = (string) $app_obj->account->id;
 
   $apps = $app_obj->account->applications;
   foreach ($apps as $app) {
     foreach ($app as $data) {
 
       foreach ($data->{"threshold-values"} as $val) {
-          foreach ($val->threshold_value as $v) {
+        foreach ($val->threshold_value as $v) {
 
-            $app_name = (string)$data->name;
-            $attr_name = (string)$v->attributes()->name;
-            $app_data[$app_name][$attr_name]['val'] = (string)$v->attributes()->formatted_metric_value;
-            $app_data[$app_name][$attr_name]['mval'] = (string)$v->attributes()->metric_value;
-            $app_data[$app_name][$attr_name]['thresh'] = (string)$v->attributes()->threshold_value;
-            $app_data[$app_name]['AppID'] = (string)$data->id;
+          $app_name = (string) $data->name;
+          $attr_name = (string) $v->attributes()->name;
+          $app_data[$app_name][$attr_name]['val'] = (string) $v->attributes()->formatted_metric_value;
+          $app_data[$app_name][$attr_name]['mval'] = (string) $v->attributes()->metric_value;
+          $app_data[$app_name][$attr_name]['thresh'] = (string) $v->attributes()->threshold_value;
+          $app_data[$app_name]['AppID'] = (string) $data->id;
 
-          }
+        }
 
       }
     }
@@ -133,11 +133,11 @@ function new_relic_rpm_render_health($app_health) {
       }
       $row[] = $cell;
     }
-    $row[] = l('Details', 'admin/reports/new-relic-rpm/details/' . $cust_id . '/'. $v['AppID'], array('query' => array('app_name' => $k)));
+    $row[] = l('Details', 'admin/reports/new-relic-rpm/details/' . $cust_id . '/' . $v['AppID'], array('query' => array('app_name' => $k)));
     $table['rows'][] = $row;
   }
 
-  return theme_table($table['header'], $table['rows']);
+  return theme('table', $table);
 }
 
 /**
@@ -145,9 +145,6 @@ function new_relic_rpm_render_health($app_health) {
  */
 function new_relic_rpm_render_actions($cust_id, $app_id) {
 
-  $output = '<h2>Quick Links for this Application</h2>';
-  $output .= '<p>Links open New Relic\'s website in a new window.</p>';
-
   $rpm_url = "https://rpm.newrelic.com/accounts/{$cust_id}/applications/{$app_id}";
   $actions = array(
     'transactions' => t('Web Transactions'),
@@ -158,15 +155,25 @@ function new_relic_rpm_render_actions($cust_id, $app_id) {
     'edit_alerts' => t('App Alerts & Thresholds'),
     'deployments' => t('Deployments'),
   );
-  $links = array(array('title' => t("Overview"), 'href' => $rpm_url, 'attributes' => array('class' => '_blank')));
+  $links = array(
+    'overview' => array(
+      'title' => t("Overview"),
+      'href' => $rpm_url,
+      'attributes' => array('class' => '_blank'),
+    )
+  );
   foreach ($actions as $action => $title) {
-    $links[$action]= array(
+    $links[$action] = array(
       'title' => $title,
       'href' => "{$rpm_url}/{$action}",
       'attributes' => array('target' => '_blank'),
     );
   }
-  $output .= theme_links($links, array());
 
-  return $output;
+  $list = array(
+    'heading' => t('Links to New Relic\'s website for this Application'),
+    'links' => $links,
+  );
+
+  return theme('links', $list);
 }
diff --git a/new_relic_rpm.settings.inc b/new_relic_rpm.settings.inc
index d58c3cd..ebddfe4 100644
--- a/new_relic_rpm.settings.inc
+++ b/new_relic_rpm.settings.inc
@@ -7,7 +7,7 @@
 /**
  * New Relic RPM settings form.
  */
-function new_relic_rpm_settings(&$form_state) {
+function new_relic_rpm_settings($form, &$form_state) {
   $form = array();
 
   $form['new_relic_rpm_track_drush'] = array(
@@ -82,7 +82,7 @@ function new_relic_rpm_settings(&$form_state) {
 /**
  * Form callback for manually creating a deployment.
  */
-function new_relic_rpm_deploy(&$form_state) {
+function new_relic_rpm_deploy($form, &$form_state) {
   $form = array();
 
   $form['deploy_user'] = array(
@@ -132,6 +132,6 @@ function new_relic_rpm_deploy_submit($form, &$form_state) {
     drupal_set_message(t('New Relic RPM deployment created successfully'), 'status');
   }
   else {
-    drupal_set_message(t('New Relic RPM deployment failed to be created. Please ensure you have your account configured on the <a href="@settings">New Relic RPM Drupal admin page</a>.', array('@settings' => url('admin/settings/new-relic-rpm'))), 'error');
+    drupal_set_message(t('New Relic RPM deployment failed to be created. Please ensure you have your account configured on the <a href="@settings">New Relic RPM Drupal admin page</a>.', array('@settings' => url('admin/config/new-relic-rpm'))), 'error');
   }
 }
