diff --git a/block/flickr_block.module b/block/flickr_block.module
index 560f1b4..b78ef7a 100644
--- a/block/flickr_block.module
+++ b/block/flickr_block.module
@@ -280,7 +280,7 @@ function flickr_block_configure($delta = '') {
     '#title' => t('Media type'),
     '#default_value' => $settings['media'],
   );
-  if (module_exists('taxonomy')) {
+  if (function_exists('taxonomy_get_vocabularies')) {
     // Get a list of existing vocabularies.
     $vocabulary = taxonomy_get_vocabularies();
     $checklist_vocab_array = array('0' => '<none>');
@@ -996,7 +996,7 @@ function flickr_block_view($delta = '') {
         case 'user':
           if ($uid = (int) arg(1)) {
             $user = user_load($uid);
-            if (module_exists('taxonomy') && $settings['vocab'] != 0) {
+            if (function_exists('taxonomy_vocabulary_load') && $settings['vocab'] != 0) {
               $taxonomy = taxonomy_vocabulary_load($settings['vocab']);
               if (property_exists($user, 'field_' . $taxonomy->machine_name)) {
                 $terms_user = (!empty($settings['vocab'])) ? field_view_field('user', $user, 'field_' . $taxonomy->machine_name) : '';
@@ -1050,7 +1050,7 @@ function flickr_block_view($delta = '') {
           if (($nid = (int) arg(1)) && ((arg(2) == "" || arg(2) == 'view'))) {
             $node = node_load($nid);
             $user = user_load($node->uid);
-            if (module_exists('taxonomy') && $settings['vocab'] != 0) {
+            if (function_exists('taxonomy_vocabulary_load') && $settings['vocab'] != 0) {
               $taxonomy = taxonomy_vocabulary_load($settings['vocab']);
               if (property_exists($user, 'field_' . $taxonomy->machine_name)) {
                 $terms_user = (!empty($settings['vocab']) && !empty($taxonomy->machine_name)) ? field_view_field('user', $user, 'field_' . $taxonomy->machine_name) : '';
@@ -1194,7 +1194,7 @@ function flickr_block_view($delta = '') {
     case 5:
       if (($nid = (int) arg(1)) && arg(0) == 'node' && ((arg(2) == "" || arg(2) == 'view'))) {
         $node = node_load($nid);
-        if (module_exists('taxonomy') && $settings['vocab'] != 0) {
+        if (function_exists('taxonomy_vocabulary_load') && $settings['vocab'] != 0) {
           $taxonomy = taxonomy_vocabulary_load($settings['vocab']);
           if (property_exists($node, 'field_' . $taxonomy->machine_name)) {
             $terms = (!empty($settings['vocab']) && !empty($taxonomy->machine_name)) ? field_view_field('node', $node, 'field_' . $taxonomy->machine_name) : '';
@@ -1277,7 +1277,7 @@ function flickr_block_view($delta = '') {
     case 10:
       if (($nid = (int) arg(1)) && arg(0) == 'node' && ((arg(2) == "" || arg(2) == 'view'))) {
         $node = node_load($nid);
-        if (module_exists('taxonomy') && $settings['vocab'] != 0) {
+        if (function_exists('taxonomy_vocabulary_load') && $settings['vocab'] != 0) {
           $taxonomy = taxonomy_vocabulary_load($settings['vocab']);
           if (property_exists($node, 'field_' . $taxonomy->machine_name)) {
             $terms = (!empty($settings['vocab']) && !empty($taxonomy->machine_name)) ? field_view_field('node', $node, 'field_' . $taxonomy->machine_name) : '';
@@ -1345,7 +1345,7 @@ function flickr_block_view($delta = '') {
     case 8:
       if (($nid = (int) arg(1)) && arg(0) == 'node' && ((arg(2) == "" || arg(2) == 'view'))) {
         $node = node_load($nid);
-        if (module_exists('taxonomy') && $settings['vocab'] != 0) {
+        if (function_exists('taxonomy_vocabulary_load') && $settings['vocab'] != 0) {
           $taxonomy = taxonomy_vocabulary_load($settings['vocab']);
           if (property_exists($node, 'field_' . $taxonomy->machine_name)) {
             $terms = (!empty($settings['vocab']) && !empty($taxonomy->machine_name)) ? field_view_field('node', $node, 'field_' . $taxonomy->machine_name) : '';
@@ -1388,7 +1388,7 @@ function flickr_block_view($delta = '') {
       $media = $settings['media'] == 'videos' ? t('videos') : t('photos');
       if (($nid = (int) arg(1)) && arg(0) == 'node' && ((arg(2) == "" || arg(2) == 'view'))) {
         $node = node_load($nid);
-        if (module_exists('taxonomy') && $settings['vocab'] != 0) {
+        if (function_exists('taxonomy_vocabulary_load') && $settings['vocab'] != 0) {
           $taxonomy = taxonomy_vocabulary_load($settings['vocab']);
           if (property_exists($node, 'field_' . $taxonomy->machine_name)) {
             $terms = (!empty($settings['vocab']) && !empty($taxonomy->machine_name)) ? field_view_field('node', $node, 'field_' . $taxonomy->machine_name) : '';
diff --git a/cachewarmer/flickrcachewarmer.module b/cachewarmer/flickrcachewarmer.module
index 82c8702..3f81887 100644
--- a/cachewarmer/flickrcachewarmer.module
+++ b/cachewarmer/flickrcachewarmer.module
@@ -103,7 +103,7 @@ function flickrcachewarmer_run($nids) {
         // Even the cURL method returns an error.
         if ($result->code != 200) {
           // Debug info.
-          if (variable_get('flickr_debug', 0) == 2 && module_exists('devel')) {
+          if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
             dpm(t("Value of 'result' on nid %nid with error in 'function flickr_request()' with connection method '%cmethod' in 'flickr.inc'", array('%nid' => $nid, '%cmethod' => $cmethod)) . ':');
             dpm($result);
           }
diff --git a/flickr.inc b/flickr.inc
index b34c008..f667ccd 100644
--- a/flickr.inc
+++ b/flickr.inc
@@ -146,7 +146,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
     watchdog('flickr', $message, array(), WATCHDOG_WARNING);
     if ($return_errors) {
       // Debug info.
-      if (variable_get('flickr_debug', 0) == 2 && module_exists('devel')) {
+      if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
         dpm("Value of error 'result' in 'function flickr_request()' with connection method " . "'" . $cmethod . "' in 'flickr.inc':");
         dpm($result);
       }
@@ -162,7 +162,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
     // Even the cURL method returns an error.
     if ($result->code != 200) {
       // Debug info.
-      if (variable_get('flickr_debug', 0) == 2 && module_exists('devel')) {
+      if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
         dpm("Value of 'result' with error in 'function flickr_request()' with connection method " . "'" . $cmethod . "' in 'flickr.inc':");
         dpm($result);
       }
@@ -177,7 +177,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
 
   }
   // Debug info.
-  if (variable_get('flickr_debug', 0) == 2 && module_exists('devel')) {
+  if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
     dpm("Value of 'result' in 'function flickr_request()' with the " . "'" . $cmethod . "' connection method in 'flickr.inc':");
     dpm($result);
   }
@@ -263,7 +263,7 @@ function flickr_request($method, $args, $cacheable = TRUE, $return_errors = FALS
  */
 function flickr_img($photo, $size = NULL, $attributes = NULL) {
   // Debug info.
-  if (variable_get('flickr_debug', 0) == 2 && module_exists('devel')) {
+  if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
     dpm("Value of 'photo' passed to 'function flickr_img()' in 'flickr.inc':");
     dpm($photo);
   }
@@ -1124,7 +1124,7 @@ function flickr_album($type = 'user', $id = '39873962@N08', $show_n = NULL, $siz
         $rest_ok = ($total % variable_get('flickr_per_page', 100)) > 3 * $show_n ? 1 : 0;
         $page = ($sort == 'random' && isset($total) && $total > variable_get('flickr_per_page', 100) && empty($tags)) ? mt_rand(1, floor($total / variable_get('flickr_per_page', 100)) + $rest_ok) : $page;
         // Debug info.
-        if (variable_get('flickr_debug', 0) == 2 && module_exists('devel')) {
+        if (variable_get('flickr_debug', 0) == 2 && function_exists('dpm')) {
           dpm("Arguments passed to 'function flickr_album()': " . '$type=' . $type . ' $delta=' . $delta . ' $id=' . $id . ' $sort=' . $sort . ' $filter=' . $filter . ' $page=' . $page . ' $per_page=' . $per_page . ' $tags=' . $tags . ' $vocab_isset=' . $vocab_isset . ' $total=' . $total . ' $lat=' . $lat . ' $lon=' . $lon . ' $radius=' . $radius . '$datefrom=' . $datefrom . ' $dateto=' . $dateto . ' $extend=' . $extend . ' $tag_mode=' . $tag_mode . ' $class=' . $class . ' $style=' . $style . ' $page=' . $page);
         }
         // Get a list of "all" the photos. This is cached.
