diff --git a/google_groups.admin.inc b/google_groups.admin.inc
index c09e36a..d6cfb9e 100644
--- a/google_groups.admin.inc
+++ b/google_groups.admin.inc
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * @file
  * Administration pages and code for the Google Groups module.
@@ -18,19 +17,21 @@ function google_groups_list_page() {
 
   foreach ($settings['groups'] as $delta => $group) {
     if ($group['register']) {
+      // @todo wrap this in theme('item_list');
       $reg = '<li>' . t('List on form: Yes') . '</li>';
       $reg .= '<li>' . t('Default: ') . ($group['register_default'] ? t('On') : t('Off')) . '</li>';
       $reg .= '<li>' . t('Forced: ') . ($group['register_default_forced'] ? t('Yes') : t('No')) . '</li>';
-    } else {
+    } 
+    else {
       $reg = '<li>' . t('List on form: No') . '</li>';
     }
     $reg = '<ul>' . $reg . '</ul>';
     $row = array(check_plain($group['name']), $reg);
 
     // Set the edit column.
-    $row[] = array('data' => l(t('edit'), 'admin/settings/googlegroups/edit/' . $delta));
+    $row[] = array('data' => l(t('edit'), 'admin/config/services/googlegroups/edit/' . $delta));
     // Set the delete column.
-    $row[] = array('data' => l(t('delete'), 'admin/settings/googlegroups/delete/' . $delta));
+    $row[] = array('data' => l(t('delete'), 'admin/config/services/googlegroups/delete/' . $delta));
 
     $rows[] = $row;
   }
@@ -39,7 +40,13 @@ function google_groups_list_page() {
     $rows[] = array(array('data' => t('No Google Groups have been created.'), 'colspan' => '4', 'class' => 'message'));
   }
 
-  return theme('table', $header, $rows);
+  $renderable = array(
+    '#theme' => 'table',
+    '#header' => $header,
+    '#rows' => $rows,
+  );
+
+  return $renderable;
 }
 
 /**
@@ -49,7 +56,7 @@ function google_groups_list_page() {
  *  FAPI array.
  */
 function google_groups_add_form() {
-  $delta = (arg(3) === 'edit' && arg(4)) ? arg(4) : NULL;
+  $delta = (arg(4) === 'edit' && arg(5)) ? arg(5) : NULL;
   if ($delta) {
     $settings = variable_get('google_groups_settings', array());
     $group    = $settings['groups'][$delta];
@@ -135,7 +142,7 @@ function google_groups_add_form_submit($form, &$form_state) {
 
   variable_set('google_groups_settings', $settings);
   drupal_set_message(t('Google Group saved.'), 'status');
-  $form_state['redirect'] = 'admin/settings/googlegroups';
+  $form_state['redirect'] = 'admin/config/services/googlegroups';
   return;
 }
 
@@ -153,7 +160,7 @@ function google_groups_delete_confirm(&$form_state) {
   $message = t('Are you sure you want to delete the Google Group @group?', array('@group' => $settings['groups'][$delta]['name']));
   $caption = '<p>'. t('This action cannot be undone.') .'</p>';
 
-  return confirm_form($form, $message, 'admin/settings/googlegroups', $caption, t('Delete'));
+  return confirm_form($form, $message, 'admin/config/services/googlegroups', $caption, t('Delete'));
 }
 
 /**
@@ -166,70 +173,6 @@ function google_groups_delete_confirm_submit($form, &$form_state) {
   unset($settings['groups'][$form_state['values']['delta']]);
   variable_set('google_groups_settings', $settings);
 
-  $form_state['redirect'] = 'admin/settings/googlegroups';
+  $form_state['redirect'] = 'admin/config/services/googlegroups';
   return;
 }
-
-/**
- * Implementation of hook_user() register op.
- */
-function google_groups_user_register_form() {
-  $form = array();
-
-  $visable = 0;
-  $settings = variable_get('google_groups_settings', array());
-  foreach ($settings['groups'] as $delta => $group) {
-    if ($group['register']) {
-      $form['google_groups_subscribe_' . $delta] = array(
-        '#type' => 'checkbox',
-        '#title' => t('Subscribe to @group', array('@group' => $group['name'])),
-        '#weight' => 10,
-      );
-
-      if ($group['register_default']) {
-        $form['google_groups_subscribe_' . $delta]['#default_value'] = 1;
-      }
-
-      if ($group['register_default_forced']) {
-        $form['google_groups_subscribe_' . $delta]['#type'] = 'hidden';
-      }
-      else {
-        $visable++;
-      }
-    }
-  }
-
-  if ($visable) {
-    $fieldset = array(
-      '#type' => 'fieldset',
-      '#title' => t('Email lists'),
-      '#description' => t('Subscribe to our email list(s).'),
-    );
-    $form = array('google_groups' => array_merge($fieldset, $form));
-  }
-
-  return $form;
-}
-
-/**
- * Implementation of hook_user() insert op.
- */
-function google_groups_user_register_submit(&$edit) {
-  $settings = variable_get('google_groups_settings', array());
-
-  foreach ($settings['groups'] as $delta => $group) {
-    if ($group['register']) {
-      if ($edit['google_groups_subscribe_' . $delta] == 1) {
-        if (google_groups_mail($group['id'], $edit['mail'])) {
-          drupal_set_message('You will be receiving a confirmation email for our email list.', 'status');
-        }
-        else {
-          $message = 'An error sending a subscription email occurred and user was NOT subscribed to our email list.';
-          watchdog('error', $message, array(), WATCHDOG_WARNING);
-          drupal_set_message('An error occurred and you were NOT subscribed to our email list.', 'warning');
-        }
-      }
-      $edit['google_groups_subscribe_' . $delta] = NULL;
-    }
-  }
-}
diff --git a/google_groups.info b/google_groups.info
index 67762ba..c097ab4 100644
--- a/google_groups.info
+++ b/google_groups.info
@@ -1,3 +1,4 @@
 name = Google Groups
 description = Allow users to subscribe to Google Groups.
-core = 6.x
+core = 7.x
+configure = admin/config/services/googlegroups
diff --git a/google_groups.install b/google_groups.install
index e2335d8..e5cc6f0 100644
--- a/google_groups.install
+++ b/google_groups.install
@@ -1,15 +1,26 @@
 <?php
+/**
+ * @file
+ * Install and Uninstall operations for the Google Groups module.
+ */
 
+/**
+ * Implements hook_install().
+ */
 function google_groups_install() {
   variable_set('google_groups_settings', array('next_delta' => 1, 'groups' => array()));
 }
 
+/**
+ * Implements hook_uninstall().
+ */
 function google_groups_uninstall() {
   variable_del('google_groups_settings');
 }
 
 /**
- * Update from 1.x to 2.x.
+ * Implements hook_update_N().
+ * Update variables from 1.x to 2.x format.
  */
 function google_groups_update_6200() {
   // Change 1.x vars to 2.x vars.
diff --git a/google_groups.module b/google_groups.module
index 3c22e5a..0d8e02f 100644
--- a/google_groups.module
+++ b/google_groups.module
@@ -7,18 +7,23 @@
 ini_set('display_errors', true);
 
 /**
- * Implementation of hook_perm().
+ * Implements hook_permission().
  */
-function google_groups_perm() {
-  return array('administer google groups');
+function google_groups_permission() {
+  return array(
+    'administer google groups' => array(
+      'title' => t('Administer Google Groups'),
+      'description' => t('Perform administration tasks for the Google Groups module.'),
+    ),
+  );
 }
 
 /**
- * Implementation of hook_menu().
+ * Implements hook_menu().
  */
 function google_groups_menu() {
   $items = array();
-  $items['admin/settings/googlegroups'] = array(
+  $items['admin/config/services/googlegroups'] = array(
     'title' => 'Google Groups',
     'description' => t('Google Groups module settings.'),
     'access arguments' => array('administer google groups'),
@@ -26,12 +31,12 @@ function google_groups_menu() {
     'file' => 'google_groups.admin.inc',
     'type' => MENU_NORMAL_ITEM,
   );
-  $items['admin/settings/googlegroups/list'] = array(
+  $items['admin/config/services/googlegroups/list'] = array(
     'title' => 'List',
     'type' => MENU_DEFAULT_LOCAL_TASK,
     'weight' => -25,
   );
-  $items['admin/settings/googlegroups/add'] = array(
+  $items['admin/config/services/googlegroups/add'] = array(
     'title' => 'Add a group',
     'description' => t('Add a new Google Group.'),
     'access arguments' => array('administer google groups'),
@@ -40,7 +45,7 @@ function google_groups_menu() {
     'file' => 'google_groups.admin.inc',
     'type' => MENU_LOCAL_TASK,
   );
-  $items['admin/settings/googlegroups/edit/%'] = array(
+  $items['admin/config/services/googlegroups/edit/%'] = array(
     'title' => 'Edit a group',
     'description' => t('Edit a Google Group.'),
     'access arguments' => array('administer google groups'),
@@ -49,7 +54,7 @@ function google_groups_menu() {
     'file' => 'google_groups.admin.inc',
     'type' => MENU_CALLBACK,
   );
-  $items['admin/settings/googlegroups/delete/%'] = array(
+  $items['admin/config/services/googlegroups/delete/%'] = array(
     'title' => 'Delete a group',
     'description' => t('Delete a Google Group.'),
     'access arguments' => array('administer google groups'),
@@ -62,92 +67,132 @@ function google_groups_menu() {
 }
 
 /**
- * Generate HTML for the google_groups block
- * @param op the operation from the URL
- * @param delta offset
- * @returns block HTML
- */
-function google_groups_block($op = 'list', $delta = 0) {
-  switch ($op) {
-    case 'list':
-      return google_groups_block_list();
-
-    case 'view':
-      $settings = variable_get('google_groups_settings', array());
-      $block['subject'] = t('Subscribe to @name', array('@name' => $settings['groups'][$delta]['name']));
-      $block['content'] = theme('google_groups_subscribe_form_block', $delta);
-      return $block;
-  }
-}
-
-/**
- * Returns a list of blocks in a form suitable for hook_block() when $op == list:
+ * Implements hook_block_list().
  */
-function google_groups_block_list() {
+function google_groups_block_info() {
   $settings = variable_get('google_groups_settings', array());
+
   $blocks = array();
   foreach ($settings['groups'] as $delta => $group) {
     $blocks[$delta]['info'] = t('Google Groups: @name', array('@name' => $group['name']));
   }
+
   return $blocks;
 }
 
 /**
- * Implementation of hook_theme()
+ * Implements hook_block_view().
  */
-function google_groups_theme() {
-  return array(
-    'google_groups_subscribe_form_block' => array(
-      'template' => 'google-groups-subscribe-form-block',
-      'arguments' => array('delta' => NULL),
-    ),
-  );
+function google_groups_block_view($delta = 0) {
+  $settings = variable_get('google_groups_settings', array());
+
+  $block['subject'] = t('Subscribe to @name', array('@name' => $settings['groups'][$delta]['name']));
+  $block['content'] = theme('google_groups_subscribe_form_block', array('delta' => $delta));
+
+  return $block;
 }
 
 /**
- * template preprocesser
+ * Prepares variables for google-groups-subscribe-from-block.tpl.php.
  */
-function template_preprocess_google_groups_subscribe_form_block(&$vars, $hook) {
+function template_preprocess_google_groups_subscribe_form_block(&$variables) {
   $settings = variable_get('google_groups_settings', array());
-  $group = $settings['groups'][$vars['delta']];
-  $vars['group_id'] = $group['id'];
-  $vars['group_name'] = $group['name'];
+  $group = $settings['groups'][$variables['delta']];
+  $variables['group_id'] = $group['id'];
+  $variables['group_name'] = $group['name'];
+}
+
+/**
+ * Implements hook_user_insert().
+ */
+function hook_user_insert(&$edit, $account, $category) {
+  $settings = variable_get('google_groups_settings', array());
+
+  foreach ($settings['groups'] as $delta => $group) {
+    if ($group['register']) {
+      if ($edit['google_groups_subscribe_' . $delta] == 1) {
+        if (google_groups_mail($group['id'], $edit['mail'])) {
+          drupal_set_message('You will be receiving a confirmation email for our email list.', 'status');
+        }
+        else {
+          $message = 'An error sending a subscription email occurred and user was NOT subscribed to our email list.';
+          watchdog('error', $message, array(), WATCHDOG_WARNING);
+          drupal_set_message('An error occurred and you were NOT subscribed to our email list.', 'warning');
+        }
+      }
+      $edit['google_groups_subscribe_' . $delta] = NULL;
+    }
+  }
+}
+
+/**
+ * Implements hook_user_view().
+ */
+function hook_user_view($account, $view_mode, $langcode) {
+  $settings =  variable_get('google_groups_settings', array());
+  $account->content['google_groups'] = array(
+    '#type' => 'user_profile_category',
+    '#title' => 'Email lists',
+  );
+  foreach ($settings['groups'] as $delta => $group) {
+    $account->content['google_groups'][$delta] = array(
+      '#title' => $group['name'],
+      '#type' => 'user_profile_item',
+      '#value' => l(t('Manage your subscription to @name', array('@name' => $group['name'])), 'http://groups.google.com/group/' . $group['id']),
+    );
+  }
 }
 
 /**
- * Implementation of hook_user().
+ * Implements hook_form_FORM_ID_alter().
  */
-function google_groups_user($op, &$edit, &$account, $category = NULL) {
-  global $user;
-  switch ($op) {
-    case 'register':
-      module_load_include('admin.inc', 'google_groups', 'google_groups');
-      return google_groups_user_register_form();
-      break;
-
-    case 'insert':
-      module_load_include('admin.inc', 'google_groups', 'google_groups');
-      return google_groups_user_register_submit($edit);
-      break;
-
-    case 'view':
-      $settings =  variable_get('google_groups_settings', array());
-      $account->content['google_groups'] = array(
-        '#type' => 'user_profile_category',
-        '#title' => 'Email lists',
+function hook_form_user_register_alter(&$form, &$form_state, $form_id) {
+  $visable = 0;
+  $settings = variable_get('google_groups_settings', array());
+  foreach ($settings['groups'] as $delta => $group) {
+    if ($group['register']) {
+      $form_section['google_groups_subscribe_' . $delta] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Subscribe to @group', array('@group' => $group['name'])),
+        '#weight' => 10,
       );
-      foreach ($settings['groups'] as $delta => $group) {
-        $account->content['google_groups'][$delta] = array(
-          '#title' => $group['name'],
-          '#type' => 'user_profile_item',
-          '#value' => l(t('Manage your subscription to @name', array('@name' => $group['name'])), 'http://groups.google.com/group/' . $group['id']),
-        );
+
+      if ($group['register_default']) {
+        $form_section['google_groups_subscribe_' . $delta]['#default_value'] = 1;
+      }
+
+      if ($group['register_default_forced']) {
+        $form_section['google_groups_subscribe_' . $delta]['#type'] = 'hidden';
+      }
+      else {
+        $visable++;
       }
-      break;
+    }
+  }
+
+  if ($visable) {
+    $fieldset = array(
+      '#type' => 'fieldset',
+      '#title' => t('Email lists'),
+      '#description' => t('Subscribe to our email list(s).'),
+    );
+    $form['google_groups'] = array_merge($fieldset, $form_section);
   }
 }
 
 /**
+ * Implements hook_theme()
+ */
+function google_groups_theme() {
+  return array(
+    'google_groups_subscribe_form_block' => array(
+      'template' => 'google-groups-subscribe-form-block',
+      'variables' => array('delta' => NULL),
+    ),
+  );
+}
+
+/**
  * Send email to google group.
  *
  * @param $group_email
@@ -172,5 +217,6 @@ function google_groups_mail($group_email, $from_email, $op = 'subscribe') {
     'body'     => drupal_wrap_mail($op),
     'headers'  => $headers,
   );
+
   return drupal_mail_send($message);
 }
