diff --git a/vud.install b/vud.install
index b69704b..dfe9604 100644
--- a/vud.install
+++ b/vud.install
@@ -24,11 +24,11 @@ function vud_update_6200() {
 
   if (module_exists('updown')) {
     $ret[] = drupal_uninstall_schema('updown');
-    drupal_uninstall_module('updown');
+    drupal_uninstall_modules(array('updown'));
   }
   if (module_exists('updown_node')) {
     $ret[] = drupal_uninstall_schema('updown_node');
-    drupal_uninstall_module('updown_node');
+    drupal_uninstall_modules(array('updown_node'));
   }
 
   return $ret;
diff --git a/vud.module b/vud.module
index 65191d4..744bcba 100644
--- a/vud.module
+++ b/vud.module
@@ -124,29 +124,38 @@ function vud_permission() {
  * Menu callback; display all votes for a user.
  */
 function vud_user_votes() {
-  if ($account = user_load(array('uid' => arg(1), 'status' => 1))) {
+  $account = user_load(arg(1));
+  
+  if ($account && $account->status == 1) {
     if ($account->status || user_access('administer users')) {
       $header = array(
         array('data' => t('Node')),
         array('data' => t('Vote')),
         array('data' => t('Date'))
       );
-      $sql = db_rewrite_sql("SELECT n.nid, n.title, v.value, v.timestamp FROM {node} n LEFT JOIN {votingapi_vote} v
-                             ON n.nid = v.entity_id
-                             WHERE v.uid = %d AND v.tag = '%s' AND v.entity_type = 'node' AND n.status = 1
-                             ORDER BY v.timestamp DESC");
-      $result = pager_query($sql, 25, 0, NULL, $account->uid, variable_get('vud_tag', 'vote'));
+	  
+      $query = db_select('node', 'n');
+      $v_alias = $query->join('votingapi_vote', 'v', 'n.nid = v.entity_id');
+      $query->fields('n', array('nid', 'title'));
+      $query->fields($v_alias, array('value', 'timestamp'));
+      $query->condition("{$v_alias}.uid", $account->uid);
+      $query->condition("{$v_alias}.entity_type", 'node');
+      $query->condition("n.status", 1);
+      $query->orderBy("{$v_alias}.timestamp", 'DESC');
+      $query->extend("PagerDefault")->limit(10);
+      $result = $query->execute();
+
       $rows = array();
-      while ($node = db_fetch_object($result)) {
+      foreach ($result as $node) {
         $rows[] = array(
           l($node->title, 'node/'. $node->nid),
           $node->value,
           t('!time ago', array('!time' => format_interval(time() - $node->timestamp)))
         );
       }
-      drupal_set_title(check_plain($account->name));
-      $output = theme('table', $header, $rows);
-      $output .= theme('pager', NULL, 25);
+      drupal_set_title($account->name);
+      $output = theme('table', array('header' => $header, 'rows' => $rows));
+      $output .= theme('pager', array('tags' => array()));
 
       return $output;
     }
@@ -258,3 +267,40 @@ function vud_votingapi_metadata_alter(&$data) {
     'module' => 'vud',
   );
 }
+
+/**
+ * Grayside's implementation from 
+ * http://drupal.org/node/554360#comment-3303302
+ */
+function vud_get_content_uid($type, $id) {
+  $callback = 'vud_' . $type . '_content_owner';
+  $uid = $callback($id);
+  return isset($uid) ? $uid : 0;
+}
+
+/**
+ * returns uid of node author
+ */
+function vud_node_content_owner($nid) {
+  $result = db_select('node', 'n')
+              ->fields('n', array('uid'))
+              ->condition('nid', $nid, '=')
+              ->execute()
+              ->fetchAssoc();
+              
+  return $result['uid'];
+}
+
+/**
+ * returns uid of comment author
+ */
+function vud_comment_content_owner($cid) {
+  $result = db_select('comments', 'c')
+              ->fields('c', array('uid'))
+              ->condition('cid', $cid, '=')
+              ->execute()
+              ->fetchAssoc();
+              
+  return $result['uid'];
+}
+
diff --git a/vud.theme.inc b/vud.theme.inc
index 0850a55..c2d719a 100644
--- a/vud.theme.inc
+++ b/vud.theme.inc
@@ -296,7 +296,7 @@ function vud_widget_proxy($variables) {
  * Proxy votes display function, that hook_theme() calls.
  */
 function vud_votes_proxy($variables) {
-  $plugin = vud_widget_get($widget_theme);
+  $plugin = vud_widget_get($variables['widget_theme']);
   if (empty($plugin) || empty($plugin['votes template'])) {
     return;
   }
diff --git a/vud_node/vud_node.module b/vud_node/vud_node.module
index a9c811d..9820efe 100644
--- a/vud_node/vud_node.module
+++ b/vud_node/vud_node.module
@@ -127,8 +127,16 @@ function vud_node_admin_settings() {
     '#default_value' => variable_get('vud_node_reset', 0),
     '#options'       => array(0 => 'No', 1 => 'Yes'),
   );
+  
+  $form['vud_node_own_vote'] = array(
+    '#type'          => 'radios',
+    '#title'         => t('Users can vote on their own nodes'),
+    '#description'   => t('Choose if users are allowed to vote on their own nodes'),
+    '#default_value' => variable_get('vud_node_own_vote', 0),
+    '#options'       => array(0 => 'No', 1 => 'Yes'),
+  );
 
-return system_settings_form($form);
+  return system_settings_form($form);
 }
 
 /**
@@ -142,23 +150,31 @@ function vud_node_vud_widget_message_codes_alter(&$widget_message_codes) {
  * Implementation of hook_node_view().
  */
 function vud_node_node_view($node, $view_mode, $langcode) {
+
   // avoid showing the widget in some node builds
-  $exclude_modes = array(
-    NODE_BUILD_PREVIEW,
-    NODE_BUILD_SEARCH_INDEX,
-    NODE_BUILD_SEARCH_RESULT,
-    NODE_BUILD_RSS,
-  );
-  if (in_array($node->build_mode, $exclude_modes)) {
-    break;
+  if ( !empty($node->in_preview) ||
+       $view_mode == 'search_index' ||
+       $view_mode == 'search_result' ||
+       $view_mode == 'rss' ) {
+    return;
+  }
+  // and avoid showing the widget if the owner created the content
+  // @todo - it would be nice to show the widget, just disabled.
+  // or a checkbox for that setting ^
+  if(variable_get('vud_node_own_vote')) {
+    global $user;
+    if (vud_node_content_owner($node->nid) == $user->uid) {
+      return;
+    }
   }
+
   if (($can_edit=user_access('use vote up/down on nodes')) || user_access('view vote up/down count on nodes')) {
     $node_type = in_array($node->type, variable_get('vud_node_types', array()), TRUE);
     $widget_showmode = variable_get('vud_node_widget_show', VUD_NODE_DISPLAY_BOTH);
     $tag = variable_get('vud_tag', 'vote');
     $widget = variable_get('vud_node_widget', 'plain');
     $vote_on_teaser = (bool)variable_get('vud_node_widget_vote_on_teaser', TRUE);
-    $teaser = $a3;
+    //$teaser = $a3;
 
     $widget_message_code = VUD_WIDGET_MESSAGE_ERROR;
     if (!$can_edit) {
@@ -169,33 +185,51 @@ function vud_node_node_view($node, $view_mode, $langcode) {
     }
 
     if ($node_type) {
-
       switch ($widget_showmode) {
+        // We managed the theme according to the view mode
         case VUD_NODE_DISPLAY_TEASER_ONLY:
-          if ($teaser == 1) {
+          if ($view_mode == 'teaser') {
+            $variables = array(
+             'entity_id' => $node->nid,
+             'type' => 'node',
+             'tag' => $tag,
+             'widget_type' => $widget,
+             'readonly' => !$can_edit,
+             'widget_message_code' => !$vote_on_teaser || !$can_edit, $widget_message_code,
+            );
             $node->content['vud_node_widget_display'] = array(
-              '#value' => theme('vud_widget', $node->nid, 'node', $tag, $widget, !$vote_on_teaser || !$can_edit, $widget_message_code),
+              '#markup' => theme('vud_widget', $variables),
               '#weight' => -10,
             );
           }
           break;
         case VUD_NODE_DISPLAY_FULL_ONLY:
-          if ($teaser == 0) {
+          if ($view_mode == 'full') {
             $node->content['vud_node_widget_display'] = array(
-              '#value' => theme('vud_widget', $node->nid, 'node', $tag, $widget, !$can_edit, $widget_message_code),
+             '#markup' => theme('vud_widget', array(
+               'entity_id'=>$entity_id,
+               'type'=>$type,
+               'tag'=>$tag,
+               'widget_message_code'=>$widget)),
               '#weight' => -10,
             );
           }
           break;
         case VUD_NODE_DISPLAY_BOTH:
-          if ($teaser == 1) {
+          if ($view_mode == 'teaser') {
             $readonly = !$vote_on_teaser || !$can_edit;
           }
           else {
             $readonly = !$can_edit;
           }
           $node->content['vud_node_widget_display'] = array(
-            '#value' => theme('vud_widget', $node->nid, 'node', $tag, $widget, $readonly, $widget_message_code),
+            '#markup' => theme('vud_widget', array(
+              'entity_id' => $node->nid,
+              'type'=>'node',
+              'tag'=>$tag,
+              'widget_theme'=>$widget,
+              'readonly'=>$readonly,
+              'widget_message_code' => $widget_message_code)),
             '#weight' => -10,
           );
           break;
@@ -232,18 +266,19 @@ function vud_node_tracker() {
     $criteria = array('entity_type' => 'node', 'entity_id' => $node->nid, 'tag' => $tag);
     $votes = votingapi_select_votes($criteria);
     $rows[] = array();
+
     foreach ($votes as $vote) {
       $account = user_load($vote['uid']);
       $rows[] = array(
-        theme('username', $account),
+        theme('username', array('account' => $account)),
         $vote['value'],
         array('data' => format_date($vote['timestamp'], 'small'), 'class' => 'nowrap')
       );
     }
-    drupal_set_title(check_plain($node->title));
-    $output = theme('table', $header, $rows);
-    $output .= theme('pager', NULL, 30);
 
+    drupal_set_title($node->title);
+    $output = theme('table', array('header' => $header,'rows' => $rows));
+    $output .= theme('pager', array('quantity' => 30));
     return $output;
   }
   else {
@@ -253,6 +288,9 @@ function vud_node_tracker() {
 
 /**
  * Implementation of hook_link().
+ 
+ http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_link/6#comment-12124
+ 
  */
 function vud_node_link($type, $object, $teaser = FALSE) {
   $links = array();
@@ -269,24 +307,42 @@ function vud_node_link($type, $object, $teaser = FALSE) {
           break;
         case VUD_NODE_DISPLAY_TEASER_ONLY:
           if (($teaser == 1) && $node_type && $view_vud_node_votes_count) {
+            $variables = array(
+              'entity_id' => $node->nid,
+              'type'=>$type,
+              'tag'=>$tag,
+              'widget_theme' => $widget_theme);
+
             $links['vud_node_votes_count'] = array(
-              'title' => theme('vud_votes', $node->nid, $type, $tag, $widget_theme),
+              'title' => theme('vud_votes', $variables),
               'html'  => TRUE,
             );
           }
           break;
         case VUD_NODE_DISPLAY_FULL_ONLY:
           if (($teaser == 0) && $node_type && $view_vud_node_votes_count) {
+            $variables = array(
+              'entity_id' => $node->nid,
+              'type'=>$type,
+              'tag'=>$tag,
+              'widget_theme' => $widget_theme);
+
             $links['vud_node_votes_count'] = array(
-              'title' => theme('vud_votes', $node->nid, $type, $tag, $widget_theme),
+              'title' => theme('vud_votes', $variables),
               'html'  => TRUE,
             );
           }
           break;
         case VUD_NODE_DISPLAY_BOTH:
           if ($node_type && $view_vud_node_votes_count) {
+            $variables = array(
+              'entity_id' => $node->nid,
+              'type'=>$type,
+              'tag'=>$tag,
+              'widget_theme' => $widget_theme);
+
             $links['vud_node_votes_count'] = array(
-              'title' => theme('vud_votes', $node->nid, $type, $tag, $widget_theme),
+              'title' => theme('vud_votes', $variables),
               'html'  => TRUE,
             );
           }
