diff --git a/og_panels.info b/og_panels.info
index f6dfdfc..872631e 100644
--- a/og_panels.info
+++ b/og_panels.info
@@ -4,4 +4,4 @@ package = "Organic groups"
 dependencies[] = og
 dependencies[] = panels
 dependencies[] = page_manager
-core = 6.x
\ No newline at end of file
+core = 7.x
diff --git a/og_panels.install b/og_panels.install
index e40b6a3..60f13f6 100644
--- a/og_panels.install
+++ b/og_panels.install
@@ -1,21 +1,8 @@
 <?php
 
-/**
- * Implementations of hook_install/uninstall
- *
- * To go with our lovely new hook_schema()
- */
-function og_panels_install() {
-  drupal_install_schema('og_panels');
-}
-
-function og_panels_uninstall() {
-  drupal_uninstall_schema('og_panels');
-}
-
 
 /**
-* Implementation of hook_enable()
+* Implements hook_enable().
 */
 function og_panels_enable() {
   variable_set('page_manager_node_view_disabled', FALSE);
@@ -23,7 +10,7 @@ function og_panels_enable() {
 
 
 /**
- * Implementation of hook_schema()
+ * Implements hook_schema()
  *
  * Create schemas for handling og_panels and also the tab router, as per
  * http://drupal.org/node/362031
@@ -94,107 +81,4 @@ function og_panels_schema() {
   );
   return $schema;    
 }
-
-function og_panels_update_5001() {
-  $ret = array();
-  switch ($GLOBALS['db_type']) {
-    case 'mysql':
-    case 'mysqli':
-      $ret[] = update_sql("ALTER TABLE {og_panels} ADD COLUMN weight int(4) NOT NULL DEFAULT 0");
-      break;
-    case 'pgsql':
-      db_add_column($ret, 'og_panels', 'weight', 'integer', array('not null' => TRUE, 'default' => 0));
-      break;
-  }
-  return $ret ? $ret : array();
-}
-
-/**
-* Update og_panels table and data from Drupal 5 site to Drupal 6.
-*
-* Add the tab_num field, plus add as index, and a primary key
-* Update all existing records in the table with a tab_num value
-* To get the tab_num value we just need to select the records in the
-* correct order, then run through them, resetting the tab_num when we get
-* to the next nid.
-*/
-function og_panels_update_6000() {
-  $ret = array();
-
-// Add the tab_num field
-  $new_field = array(
-   'description' => 'Tab number for this node_tab.',
-   'type' => 'int',
-   'unsigned' => TRUE,
-   'not null' => TRUE,
-   'default' => 0,
-  );
-
-// Setup the indexes
-  $keys_new = array(
-    'indexes' => array(
-      'nid' => array('nid'),
-      'page_title' => array('page_title'),
-      'tab_num' => array('tab_num'),
-      'did' => array('did'),
-     ),
-  );
-  // Don't want did to be primary key anymore - will use nid and tab_num
-
-  db_add_field($ret, 'og_panels', 'tab_num', $new_field, $keys_new);
- 
-  // Select all records in the table, order by nid, default_page and weight
-  $result = db_query("SELECT * from {og_panels} ORDER BY nid, default_page DESC, weight ASC");
-  $old_nid = 0;
-  $tab_num = 0;
-  while ($row = db_fetch_object($result)) {
-   $tab_num ++;
-   $current_nid = $row->nid;
-   $did = $row->did;
-   // Reset the tab_num value to 1 when we move to the next node
-   if ($old_nid != 0 && ($old_nid != $current_nid)) {
-    $tab_num = 1;
-   }
-   $ret[] = update_sql("UPDATE {og_panels} SET tab_num = $tab_num WHERE nid = $current_nid AND did = $did");
-   $old_nid = $current_nid;
-  }
- 
-  // Can only add the new primary key here because there are were no values in
-  // tab_num before, so would cause "duplicate entry for key 1" errors 
-  db_drop_primary_key($ret, 'og_panels');
-  db_add_primary_key($ret, 'og_panels', array('nid', 'tab_num'));
- 
-  return $ret;
-}
-
-/**
-* This will make sure that your page manager node_view is enabled. This should 
-* fire with hook_enable() but if you just copy over the new code Drupal will 
-* think the module is already installed.
-*/
-function og_panels_update_6001() {
-  $ret = array();
-  variable_set('page_manager_node_view_disabled', FALSE);
-  return $ret;
-}
-
-
-/**
-* This is going to update our context names.
-*/
-function og_panels_update_6002() {
-  // Fix context names. When you do it like this it's sorta ugly.
-  // However, the alternative is to individually load every single pane. :\
-  $ret = array();
-  $result = db_query("SELECT * FROM {panels_pane} WHERE configuration LIKE '%%og_panels%%'");
-  while ($pane = db_fetch_object($result)) {
-    $configuration = unserialize($pane->configuration);
-    if ($configuration['context'] == 'og_panels') {
-      $configuration['context'] = 'relationship_og_1';
-      $serialized = serialize($configuration);
-      db_query("UPDATE {panels_pane} SET configuration = '%s' WHERE pid = %d", $serialized, $pane->pid);
-    }
-  }
-  
-  return $ret;
-}
\ No newline at end of file
+?>
diff --git a/og_panels.module b/og_panels.module
index c81968d..0f417cd 100644
--- a/og_panels.module
+++ b/og_panels.module
@@ -1,6 +1,6 @@
 <?php
 /**
- * Implementation of hook_init
+ * Implements of hook_init().
  *
  * Set group context and language if needed, make sure all OG panel pages of an organic group
  * has the same group theme and language settings.
@@ -21,20 +21,23 @@ function og_panels_init(){
   }
 }
 
+/**
+ * Implements of hook_help().
+ */
 function og_panels_help($path, $arg) {
   switch ($path) {
     case 'admin/help#og_panels':
-      return t('After enabling this module, visit the new "Pages" tab on any group. There, group admins may create as many pages as desired for their group. The pages may contain any layout that the site offers and admins may arrange many different types of content as desired. Site admins can restrict the types of content that may be added on the <a href="!settings">og_panels settings</a> page. You might want to make some Views available using <a href="!apv">admin/panels/views</a>. Group admins may designate one page as their group home page.', array('!settings' => url('admin/og/og_panels'), '!apv' => url('admin/panels/views')));
+      return t('After enabling this module, visit the new "Pages" tab on any group. There, group admins may create as many pages as desired for their group. The pages may contain any layout that the site offers and admins may arrange many different types of content as desired. Site admins can restrict the types of content that may be added on the <a href="!settings">og_panels settings</a> page. You might want to make some Views available using <a href="!apv">admin/panels/views</a>. Group admins may designate one page as their group home page.', array('!settings' => url('admin/config/group/og_panels'), '!apv' => url('admin/panels/views')));
     case(arg(0) == 'node' && arg(2) == 'og_panels' && !arg(3)):
       return '<p>'. t('Create custom pages for your group. Use custom pages to organize your content in a pretty and informative manner. Your group can group to be a whole website within a web site. Each custom page becomes a tab when viewing your group. One of your custom pages should be designated as your <em>group home page</em>. That page will then display when visitors first arrive at your group.') .'</p><p>'. t('Start by clicking the <a href="!url">Add new page</a> tab. Then you will choose a custom layout for your page. Then you will want to <em>edit content</em> for your custom page.', array('!url' => url('node/'. arg(1). '/og_panels/form'))) .'</p>';
   }
 }
 
 /**
- * Implementation of hook_menu
+ * Implements of hook_menu().
  */
 function og_panels_menu() {
-  $items['admin/og/og_panels'] = array(
+  $items['admin/config/group/og_panels'] = array(
     'title' => 'Organic groups panels',
     'description' => 'Configure the content that is available to group admins when creating group pages.',
     'page callback' => 'og_panels_admin_content',
@@ -108,7 +111,7 @@ function og_panels_menu() {
 }
 
 /**
- * Implementation of hook_menu_alter()
+ * Implements of hook_menu_alter()
  *
  * Allow the overriding of the default node/%node/view tab!
  *
@@ -124,7 +127,7 @@ function og_panels_menu_alter(&$items) {
 }
 
 /**
- * Implementation of hook_ctools_plugin_api()
+ * Implements of hook_ctools_plugin_api().
  *
  * Needed so that our other hooks are picked up.
  */
@@ -135,7 +138,7 @@ function og_panels_ctools_plugin_api($module, $api) {
 }
 
 /**
- * Implementation of hook_ctools_plugin_dierctory() to let the system know
+ * Implements of hook_ctools_plugin_dierctory() to let the system know
  * we implement task_handler, content_type and context plugins.
  */
 function og_panels_ctools_plugin_directory($module, $plugin) {
@@ -145,7 +148,7 @@ function og_panels_ctools_plugin_directory($module, $plugin) {
 }
 
 /**
- * Implementation of hook_default_page_manager_handlers()
+ * Implements of hook_default_page_manager_handlers()
  */
 function og_panels_default_page_manager_handlers() {
   $handler = new stdClass;
@@ -309,12 +312,19 @@ function og_panels_main_tab_title($node) {
 }
 
 /**
- * Implementation of hook_perm
+ * Implements of hook_permission().
  *
  * Add import and export OG panels pages permission
  */
-function og_panels_perm() {
-  return array('manage OG panels pages','import and export OG panels pages');
+function og_panels_permission() {
+  return array(
+    'manage OG panels pages' => array(
+      'title' => t('manage OG panels pages'),
+    ),
+    'import and export OG panels pages' = array(
+      'title' => t('import and export OG panels pages'),
+    ),
+  );
 }
 
 /**
@@ -377,7 +387,7 @@ function og_panels_delete($did, $nid) {
  * @return string
  **/
 function og_panels_overview($group_node) {
-  drupal_set_title(check_plain($group_node->title));
+  drupal_set_title($group_node->title);
   $displays = og_panels_get_all($group_node->nid);
   $output = drupal_get_form('og_panels_table', $displays, $group_node);
   return $output;
@@ -434,7 +444,7 @@ function og_panels_table(&$form_state, $displays, $group_node) {
 }
 
 /**
- * Implementation of hook_theme()
+ * Implementation of of hook_theme().
  *
  * For the table theme on the form
  */
@@ -511,7 +521,7 @@ function og_panels_page($nid, $tab_num, $print = TRUE) {
 
   // Set breadcrumb and title on non group nodes
   if ($tab['page_title']) {
-    drupal_set_title(check_plain($tab['page_title']));
+    drupal_set_title($tab['page_title']);
   }
 
   // Mark node as read and show feed icon for any group panel page (how to do this better?)
@@ -537,7 +547,7 @@ function og_panels_page($nid, $tab_num, $print = TRUE) {
  * @return void
  **/
 function og_panels_form(&$form_state, $group_node, $did = NULL) {
-  drupal_set_title(check_plain($group_node->title));
+  drupal_set_title($group_node->title);
   if (!is_null($did)) {
     $display = og_panels_get_one_by_display($did);
   }
@@ -791,14 +801,11 @@ function og_panels_set_breadcrumb($section, $group_node = NULL) {
 }
 
 /**
- * Implementations of hook_nodeapi
- *
- * On node load, make sure non-Home page panel pages have their title set correctly
+ * Implements of hook_node_load().
  */
-function og_panels_nodeapi($node, $op) {
-  switch ($op) {
-    case 'load':
-      if(og_is_group_type($node->type) && $node->nid == arg(1)){
+ 
+function og_panels_node_load($nodes, $types) {
+  if(og_is_group_type($node->type) && $node->nid == arg(1)){
         if(arg(2) == 'og-panel'){
           $did = (int)arg(3);
           if($did > 0){
@@ -816,10 +823,15 @@ function og_panels_nodeapi($node, $op) {
             $node->title = $row->page_title;
           }
         }
-      }
-      break;
-    case 'delete':
-      if ($og_panels = og_panels_get_all($node->nid)) {
+  }
+}
+
+/**
+ * Implements of hook_node_delete().
+ */
+
+function og_panels_node_delete($node) {
+  if ($og_panels = og_panels_get_all($node->nid)) {
         foreach ($og_panels as $og_panel) {
           og_panels_delete($og_panel->did, $node->nid); //make sure when deleting a group, the url alias are deleted as well
         }
@@ -827,10 +839,9 @@ function og_panels_nodeapi($node, $op) {
         db_query($sql, $node->nid);
         drupal_set_message(t('Organic groups panel pages deleted.'));
       }
-      break;
-  }
 }
 
+
 // ---------------------------------------------------------------------------
 // Meat of the Panels API; almost completely passing through to panels.module
 
@@ -873,14 +884,14 @@ function og_panels_admin_content() {
 }
 
 /**
- * Implementation of hook_form_alter
+ * Implements of hook_form_alter().
  *
  * attach og_panels_export_import_form before the panel edit form
  *
  * When views_exposed_form is presented, modify its form action so that the filtering behavior work
  * as expected while not destroying the OG panel tabs
  */
-function og_panels_form_alter(&$form, $form_state, $form_id){
+function og_panels_form_alter(&$form, &$form_state, $form_id){
     if($form_id == 'panels_edit_display_form' && arg(0) == 'node' && arg(1) > 0 && arg(2) == 'og_panels' && arg(3) > 0){
         if(user_access('import and export OG panels pages')){
             $did = (int)arg(3);
@@ -993,4 +1004,4 @@ function og_panels_import_from_code($code, $display_id){
             db_query("UPDATE {panels_pane} SET did = '%d' WHERE did = '%d'", $old_did, $new_did);
         }
    }
-}
\ No newline at end of file
+}
