diff --git a/clone.install b/clone.install
index c0c78a8..bca82e3 100644
--- a/clone.install
+++ b/clone.install
@@ -8,7 +8,7 @@ function clone_uninstall() {
   variable_del('clone_omitted');
   variable_del('clone_nodes_without_confirm');
   variable_del('clone_menu_links');
-  $types = node_get_types('names');
+  $types = node_type_get_types();
   foreach ($types as $type => $name) {
     variable_del('clone_reset_'. $type);
   }
diff --git a/clone.module b/clone.module
index a546723..d0e3b03 100644
--- a/clone.module
+++ b/clone.module
@@ -18,21 +18,24 @@ function clone_help($path, $arg) {
 }
 
 /**
- * Implementation of hook_perm().
+ * Implementation of hook_permission().
  */
-function clone_perm() {
-  return array('clone node', 'clone own nodes');
+function clone_permission() {
+  return array(
+    'clone node' => array('title' => t('Clone any node')),
+    'clone own nodes' => array('title' => t('Clone own nodes.')),
+  );
 }
 
 /**
  * Implementation of hook_menu().
  */
 function clone_menu() {
-  $items['admin/settings/clone'] = array(
+  $items['admin/config/content/clone'] = array(
     'access arguments' => array('administer site configuration'),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('clone_settings'),
-    'title' => 'Clone module',
+    'title' => 'Node clone module',
     'file' => 'clone.pages.inc',
     'description' => 'Allows users to clone (copy then edit) an existing node.',
   );
@@ -41,10 +44,10 @@ function clone_menu() {
     'access arguments' => array(1),
     'page callback' => 'clone_node_check',
     'page arguments' => array(1),
-    'title' => 'Clone',
+    'title' => 'Clone content',
     'weight' => 5,
     'file' => 'clone.pages.inc',
-    'type' => MENU_LOCAL_TASK,
+    'type' => MENU_LOCAL_ACTION,
   );
   return $items;
 }
@@ -53,10 +56,8 @@ function clone_access_cloning($node) {
   global $user;
   // Check basic permissions first.
   $access = clone_is_permitted($node->type) && (user_access('clone node') || ($user->uid && ($node->uid == $user->uid) && user_access('clone own nodes')));
-  // Check additional conditions
-  $access = $access && (filter_access($node->format) && node_access('create', $node->type));
-  // Make sure the user can view the original node content.
-  $access = $access && node_access('view', $node);
+  // Make sure the user can view the original node content, and create a new one..
+  $access = $access && node_access('view', $node) && node_access('create', $node->type);
   // Let other modules alter this - for exmple to only allow some users
   // to clone specific nodes or types.
   drupal_alter("clone_access", $access, $node);
@@ -92,6 +93,8 @@ function clone_node_type($op, $type_obj) {
 * Implementation of hook_views_api.
 */
 function clone_views_api() {
+  //TODO
+  return;
   return array(
     'api' => 2,
     'path' => drupal_get_path('module', 'clone') .'/views',
@@ -99,17 +102,14 @@ function clone_views_api() {
 }
 
 /**
- * Implementation of hook_init().
+ * Implementation of hook_admin_paths().
  */
-function clone_init() {
-  // Support admin theme setting, based on system_init().
-  // Only affect the menu path created by this module, and only if the node admin theme checkbox is set.
-  if (variable_get('node_admin_theme', '0') && arg(0) == 'node' && arg(2) == 'clone') {
-    global $custom_theme;
-    // Use the chosen theme ID, or the front-end theme if one hasn't been selected.
-    $custom_theme = variable_get('admin_theme', '0');
-    // From system.module, this css file is required in the admin view.
-    drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module');
+function clone_admin_paths() {
+  if (variable_get('node_admin_theme')) {
+    $paths = array(
+      'node/*/clone' => TRUE, 
+    );
+    return $paths;
   }
 }
 
diff --git a/clone.pages.inc b/clone.pages.inc
index d872211..4e8a213 100644
--- a/clone.pages.inc
+++ b/clone.pages.inc
@@ -3,7 +3,7 @@
 /**
  * Menu callback to configure module settings.
  */
-function clone_settings() {
+function clone_settings($form, &$form_state) {
 
   $form['basic'] = array(
     '#type' => 'fieldset',
@@ -34,7 +34,7 @@ function clone_settings() {
     '#type' => 'fieldset',
     '#title' => t('Should the publishing options ( e.g. published, promoted, etc) be reset to the defaults?'),
   );
-  $types = node_get_types('names');
+  $types = node_type_get_names();
 
   foreach ($types as $type => $name) {
     $form['publishing']['clone_reset_'. $type] = array(
@@ -87,7 +87,7 @@ function clone_node_check($node) {
 /**
  *  form builder: prompt the user to confirm the operation
  */
-function clone_node_confirm($form_state, $node) {
+function clone_node_confirm($form, &$form_state, $node) {
 
     $form['nid'] = array('#type' => 'value', '#value' => $node->nid);
     return confirm_form($form,
@@ -113,9 +113,10 @@ function clone_node_confirm_submit($form, &$form_state) {
  * Returns NULL if no existing link, or links are not to be cloned.
  */
 function clone_node_clone_menu_link($node) {
-  if (variable_get('clone_menu_links', FALSE)) {
+  if (variable_get('clone_menu_links', FALSE) && function_exists('menu_node_prepare')) {
     // This will fetch the existing menu link if the node had one.
-    node_invoke_nodeapi($node, 'prepare');
+    menu_node_prepare($node);
+
     if (!empty($node->menu['mlid'])) {
       $old_link = $node->menu;
       $link['link_title'] = t('Clone of !title', array('!title' => $old_link['link_title']));
@@ -137,7 +138,7 @@ function clone_node_prepopulate($original_node) {
     global $user;
 
     if (clone_is_permitted($original_node->type)) {
-      $node = drupal_clone($original_node);
+      $node = clone $original_node;
 
       $node->nid = NULL;
       $node->vid = NULL;
@@ -165,9 +166,11 @@ function clone_node_prepopulate($original_node) {
         }
       }
       // Let other modules do special fixing up.
-      // The function signature is: hook_clone_node_alter(&$node, $original_node, $method)
-      // Where $method is either 'prepopulate' or 'save-edit'.
-      drupal_alter("clone_node", $node, $original_node, "prepopulate");
+      // The function signature is: hook_clone_node_alter(&$node, $context)
+      // $context is an array with two elements, 'method' and 'original_node',
+      // where 'method' is either 'prepopulate' or 'save-edit'.
+      $context = array('method' => 'prepopulate', 'original_node' => $original_node);
+      drupal_alter('clone_node', $node, $context);
       // Make sure the file defining the node form is loaded.
       module_load_include('inc', 'node', 'node.pages');
       return drupal_get_form($node->type .'_node_form', $node);
@@ -184,7 +187,7 @@ function clone_node_save($nid) {
 
     $node = node_load($nid);
     if (isset($node->nid) && clone_is_permitted($node->type)) {
-      $original_node = drupal_clone($node);
+      $original_node = clone $node;
 
       $node->nid = NULL;
       $node->vid = NULL;
@@ -211,9 +214,11 @@ function clone_node_save($nid) {
         }
       }
       // Let other modules do special fixing up.
-      // The function signature is: hook_clone_node_alter(&$node, $original_node, $method)
-      // Where $method is either 'prepopulate' or 'save-edit'.
-      drupal_alter("clone_node", $node, $original_node, "save-edit");
+      // The function signature is: hook_clone_node_alter(&$node, $context)
+      // $context is an array with two elements, 'method' and 'original_node',
+      // where 'method' is either 'prepopulate' or 'save-edit'.
+      $context = array('method' => 'save-edit', 'original_node' => $original_node);
+      drupal_alter('clone_node', $node, $context);
 
       node_save($node);
       return $node->nid;
