diff --git path_access.info path_access.info
index bce9c6a..be0cc63 100644
--- path_access.info
+++ path_access.info
@@ -2,5 +2,6 @@
 name = Path Access
 description = Restrict access to any paths by user role
 package = Access control
-core = 6.x
+core = 7.x
 dependencies[] = path
+configure = admin/user/path_access
\ No newline at end of file
diff --git path_access.install path_access.install
index e016a96..0199b94 100644
--- path_access.install
+++ path_access.install
@@ -1,6 +1,9 @@
 <?php
 // $Id: path_access.install,v 1.2.2.3 2009/12/26 21:22:59 budda Exp $
 
+/**
+ * Implementation of hook_schema().
+ */
 function path_access_schema() {
   $schema['path_access'] = array(
     'fields' => array(
@@ -31,44 +34,11 @@ function path_access_schema() {
   return $schema;
 }
 
-function path_access_install() {
-  $res = drupal_install_schema('path_access');
-  $success = TRUE;
-  foreach ($res as $v) {
-    if ($v['success'] !== TRUE) {
-      $success = FALSE;
-      break;
-    }
-  }
-  if ($success) {
-    drupal_set_message(t('Path Access module installed tables successfully.'));
-  }
-  else {
-    drupal_set_message(t('The installation of Path Access module was unsuccessful.'), 'error');
-  }
-}
-
-function path_access_uninstall() {
-  $res = drupal_uninstall_schema('path_access');
-  $success = TRUE;
-  foreach ($res as $v) {
-    if ($v['success'] !== TRUE) {
-      $success = FALSE;
-      break;
-    }
-  }
-  if ($success) {
-    drupal_set_message(t('Path Access module uninstalled tables successfully.'));
-  }
-  else {
-    drupal_set_message(t('The uninstallation of Path Access module was unsuccessful.'), 'error');
-  }
-}
-
+/**
+ * Update 6100: Set {path_access}.pid SERIAL NOT NULL AUTO_INCREMENT.
+ */
 function path_access_update_6100() {
   $ret = array();
-  
   $ret[] = update_sql("ALTER TABLE {path_access} CHANGE pid pid SERIAL NOT NULL AUTO_INCREMENT");
-  
   return $ret;
 }
diff --git path_access.module path_access.module
index eefb7ab..f75cefc 100644
--- path_access.module
+++ path_access.module
@@ -11,22 +11,22 @@
  */
 
 /**
- * Implementation of hook_help().
+ * Implements hook_help().
  */
 function path_access_help($path, $arg) {
   switch ($path) {
-    case 'admin/user/pathaccess':
+    case 'admin/people/pathaccess':
       return t('Each user role can be granted or denied access to any url paths. This is a crude but straight forward way to restrict groups of nodes/pages to certain users using only the paths associated with the pages. Page access is not limited to node pages only, anything can be controlled using paths.');
   }
 }
 
 /**
- * Implementation of hook_init().
+ * Implements hook_init().
  */
 function path_access_init() {
   global $user;
 
-  _drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH);
+  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
 
   // User #1 has all privileges:
   if ($user->uid == 1) {
@@ -39,11 +39,10 @@ function path_access_init() {
     $role = $k;
   }
 
-  $result = db_query('SELECT pages, visibility FROM {path_access} WHERE rid = %d', $role);
-
   $visibility = 1;
   $pages = '';
-  while ($role = db_fetch_object($result)) {
+  $result = db_query('SELECT pages, visibility FROM {path_access} WHERE rid = :role', array( ':role' => $role ));
+  foreach ($result as $role) {
     $pages .= $role->pages . "\n";
     $visibility = $role->visibility && $visibility;
   }
@@ -69,40 +68,39 @@ function path_access_init() {
 }
 
 /**
- * Implementation of hook_menu().
+ * Implements hook_menu().
  */
 function path_access_menu() {
   $items = array();
 
-  $items['admin/user/pathaccess/edit'] = array(
+  $items['admin/people/pathaccess/edit'] = array(
     'title' => t('configure role paths'),
     'page callback' => 'path_access_admin_role_configure',
     'access arguments' => array('administer url aliases'),
     'type' => MENU_CALLBACK,
   );
-  $items['admin/user/pathaccess'] = array(
+  $items['admin/people/pathaccess'] = array(
     'title' => t('Path Access'),
     'description' => t('Define what paths a user role can access.'),
     'page callback' => 'path_access_admin_roles',
     'access arguments' => array('administer url aliases'),
-    'type' => MENU_NORMAL_ITEM,
+    'type' => MENU_LOCAL_TASK,
   );
 
   return $items;
 }
 
 /**
- * Menu callback; displays the block configuration form.
+ * Menu callback; displays the path access configuration form.
  */
 function path_access_admin_roles() {
   // Render the role overview.
   $result = db_query('SELECT * FROM {role} ORDER BY name');
-
-  $header = array(t('User Role'), t('Operations'));
-  while ($role = db_fetch_object($result)) {
-    $rows[] = array($role->name, l(t('edit'), 'admin/user/pathaccess/edit/' . $role->rid));
+  $table['header'] = array(t('User Role'), t('Operations'));  
+  foreach ($result as $role) {
+    $table['rows'][] = array($role->name, l(t('edit'), 'admin/people/pathaccess/edit/' . $role->rid));
   }
-  $output = theme('table', $header, $rows);
+  $output = theme('table', $table);
 
   return $output;
 }
@@ -113,18 +111,18 @@ function path_access_admin_roles() {
 function path_access_admin_role_configure() {
   $roleid = (integer) arg(4);
 
-  $settings = db_fetch_array(db_query('SELECT * FROM {path_access} pa INNER JOIN {role} r ON pa.rid = r.rid WHERE pa.rid = %d', $roleid));
+  $settings = db_query('SELECT * FROM {path_access} pa INNER JOIN {role} r ON pa.rid = r.rid WHERE pa.rid = :rid', array(':rid' => $roleid))->fetchObject();
 
   // Obtain role name for the page if there is no existing path settings for this role id.
   if (!$settings) {
-    $rolename = db_result(db_query('SELECT name FROM {role} WHERE rid = %d', $roleid));
-    db_query("INSERT INTO {path_access} (rid, pages, visibility) VALUES (%d, '', '')", $roleid);
+    $rolename = db_query('SELECT name FROM {role} WHERE rid = :rid', array(':rid' => $roleid))->fetchField();
+    db_query("INSERT INTO {path_access} (rid, pages, visibility) VALUES (:rid, '', 0)", array(':rid' => $roleid));
   }
   else {
-    $rolename = $settings['name'];
+    $rolename = $settings->name;
   }
 
-  drupal_set_title(t("Path access for '%role' role", array('%role' => $rolename)));
+  drupal_set_title(t("Path access for '@role' role", array('@role' => $rolename)));
 
   return drupal_get_form('path_access_admin_configure_form', $settings);
 }
@@ -132,7 +130,7 @@ function path_access_admin_role_configure() {
 /**
  * Define role access form.
  */
-function path_access_admin_configure_form(&$form_state, $edit) {
+function path_access_admin_configure_form($form, &$form_state) {
   $form['page_vis_settings'] = array(
     '#type' => 'fieldset',
     '#title' => t('Page specific visibility settings'),
@@ -142,19 +140,22 @@ function path_access_admin_configure_form(&$form_state, $edit) {
     '#type' => 'radios',
     '#title' => t('Allow users to view specific pages'),
     '#options' => array(t('Access every page except the listed pages.'), t('Access only the listed pages.')),
-    '#default_value' => $edit['visibility'],
+    '#default_value' => ( isset($form_state['build_info']['args'][0]->visibility) ? $form_state['build_info']['args'][0]->visibility : '' ),
   );
   $form['page_vis_settings']['pages'] = array(
     '#type' => 'textarea',
     '#title' => t('Pages'),
-    '#default_value' => $edit['pages'],
+    '#default_value' => ( isset($form_state['build_info']['args'][0]->visibility) ? $form_state['build_info']['args'][0]->visibility : '' ),
     '#description' => t("Enter one page per line as a path. The '*' character is a wildcard. Example paths are '<em>blog</em>' for the blog page and '<em>blog/*</em>' for every personal blog. '<em>&lt;front&gt;</em>' is the front page."),
   );
   $form['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save path access'),
   );
-  $form['rid'] = array('#type' => 'value', '#value' => $edit['rid']);
+  $form['rid'] = array(
+    '#type' => 'value', 
+    '#value' => ( isset($form_state['build_info']['args'][0]->rid) ? $form_state['build_info']['args'][0]->rid : arg(4) ),
+  );
 
   return $form;
 }
@@ -163,6 +164,7 @@ function path_access_admin_configure_form_validate($form_id, &$form_state) {
   // Prevent the logout page from being listed.
   $pages = explode("\n", $form_state['values']['pages']);
 
+  // needs to be updated to protect all protected pages?
   if (in_array('logout', $pages)) {
     form_set_error('pages', t('You cannot block access to the %logout page.', array('%logout' => 'logout')));
   }
@@ -172,16 +174,18 @@ function path_access_admin_configure_form_validate($form_id, &$form_state) {
  * Process role access form submission
  */
 function path_access_admin_configure_form_submit($form_id, &$form_state) {
-  db_query("UPDATE {path_access} SET visibility = %d, pages = '%s' WHERE rid = %d", $form_state['values']['visibility'], $form_state['values']['pages'], $form_state['values']['rid']);
+  db_query("UPDATE {path_access} SET visibility = :visibility, pages = :pages WHERE rid = :rid", array(':rid' => $form_state['values']['rid'], ':visibility' => $form_state['values']['visibility'], ':pages' => $form_state['values']['pages']));
 
   drupal_set_message(t('The path access configuration has been saved.'));
-  $form_state['redirect'] = 'admin/user/pathaccess';
+  $form_state['redirect'] = 'admin/people/pathaccess';
 }
 
 /*
  * Protected Pages can never be restricted using path_access.
  */
 function path_access_protected_pages($page) {
-  $pages = array('logout');
+  $pages = array(
+    'logout',
+  );
   return in_array($page, $pages);
 }
