diff --git a/crm_core_pathauto.info b/crm_core_pathauto.info
index 12f7c5e..1263a6c 100644
--- a/crm_core_pathauto.info
+++ b/crm_core_pathauto.info
@@ -9,6 +9,6 @@ core = 7.x
 ; =======================
 
 ; Core dependencies
-dependencies[] = crm_core
+dependencies[] = crm_core_contact
 dependencies[] = pathauto
 dependencies[] = entity_token
\ No newline at end of file
diff --git a/crm_core_pathauto.module b/crm_core_pathauto.module
index 45f55a6..3d3123a 100644
--- a/crm_core_pathauto.module
+++ b/crm_core_pathauto.module
@@ -4,7 +4,7 @@
  * @file
  * Provides Pathauto integration for CRM Core Contact entities.
  */
- 
+
 /**
  * Implements hook_pathauto().
  */
@@ -25,13 +25,22 @@ function crm_core_pathauto_pathauto($op) {
 
       foreach (crm_core_contact_types() as $contact_type => $contact_name) {
         if (count($languages) && variable_get('language_contact_type_' . $contact_type, 0)) {
-          $settings['patternitems'][$node_type] = t('Default path pattern for @$contact_type (applies to all @contact_type contact types with blank patterns below)', array('@contact_type' => $contact_name->name));
+          $settings['patternitems'][$contact_type] = t(
+            'Default path pattern for @$contact_type (applies to all @contact_type contact types with blank patterns below)',
+            array('@contact_type' => $contact_name->name)
+          );
           foreach ($languages as $lang_code => $lang_name) {
-            $settings['patternitems'][$contact_type . '_' . $lang_code] = t('Pattern for all @language @contact_type paths', array('@contact_type' => $contact_name->name, '@language' => $lang_name));
+            $settings['patternitems'][$contact_type . '_' . $lang_code] = t('Pattern for all @language @contact_type paths', array(
+                '@contact_type' => $contact_name->name,
+                '@language' => $lang_name
+              ));
           }
         }
         else {
-          $settings['patternitems'][$contact_type] = t('Pattern for all @contact_type paths', array('@contact_type' => $contact_name->name));
+          $settings['patternitems'][$contact_type] = t(
+            'Pattern for all @contact_type paths',
+            array('@contact_type' => $contact_name->name)
+          );
         }
       }
       return (object) $settings;
@@ -41,23 +50,28 @@ function crm_core_pathauto_pathauto($op) {
 }
 
 /**
- * Implements hook_entity_insert().
+ * Implements hook_crm_core_contact_insert().
  */
-function crm_core_pathauto_entity_insert($entity, $type) {
-  if ($type == 'crm_core_contact') {
-    module_load_include('inc', 'pathauto');
-    $uri = entity_uri('crm_core_contact', $entity);
-    pathauto_create_alias('crm_core_pathauto', 'insert', $uri['path'], array('crm_core_contact' => $entity), $entity->type);
-  }
+function crm_core_pathauto_crm_core_contact_insert($entity) {
+  module_load_include('inc', 'pathauto');
+  $uri = entity_uri('crm_core_contact', $entity);
+  pathauto_create_alias('crm_core_pathauto', 'insert', $uri['path'], array('crm_core_contact' => $entity), $entity->type);
 }
 
 /**
- * Implements hook_entity_update().
+ * Implements hook_crm_core_contact_update().
  */
-function crm_core_pathauto_entity_update($entity, $type) {
-  if ($type == 'crm_core_contact') {
-    module_load_include('inc', 'pathauto');
-    $uri = entity_uri('crm_core_contact', $entity);
-    pathauto_create_alias('crm_core_pathauto', 'update', $uri['path'], array('crm_core_contact' => $entity), $entity->type);
-  }
-}
\ No newline at end of file
+function crm_core_pathauto_crm_core_contact_update($entity) {
+  module_load_include('inc', 'pathauto');
+  $uri = entity_uri('crm_core_contact', $entity);
+  pathauto_create_alias('crm_core_pathauto', 'update', $uri['path'], array('crm_core_contact' => $entity), $entity->type);
+}
+
+/**
+ * Implements hook_crm_core_contact_delete().
+ */
+function crm_core_pathauto_crm_core_contact_delete($entity) {
+  module_load_include('inc', 'pathauto');
+  $uri = entity_uri('crm_core_contact', $entity);
+  pathauto_path_delete_all($uri['path']);
+}
