diff --git quotes.module quotes.module
index 5b622cb..888c76a 100644
--- quotes.module
+++ quotes.module
@@ -62,7 +62,7 @@ function quotes_node_access($node, $op, $account) {
         if (user_access('create quotes', $account) || user_access('import quotes', $account) || user_access('edit own quotes', $account)) {
           return NODE_ACCESS_ALLOW;
         }
-	      break;
+        break;
       case 'update':
       case 'delete':
         if (user_access('edit own quotes', $account) && ($account->uid == $node->uid)) {
@@ -71,12 +71,12 @@ function quotes_node_access($node, $op, $account) {
         if (user_access('administer quotes', $account)) {
           return NODE_ACCESS_ALLOW;
         }
-	      break;
+        break;
       case 'view':
         if (user_access('access quotes', $account)) {
           return NODE_ACCESS_ALLOW;
         }
-	      break;
+        break;
     }
   }
 
@@ -98,10 +98,10 @@ function _quotes_myquotes_access() {
   return $user->uid && variable_get('quotes_show_myquotes', TRUE);
 }
 
-function _quotes_recentquotes_access() {
+function _quotes_recentquotes_access($account) {
   global $user;
   // This path is only allowed for authenticated users looking at their own posts.
-  return $user->uid && variable_get('quotes_user_recent', FALSE);
+  return $user->uid && ($user->uid == $account->uid) && variable_get('quotes_user_recent', FALSE);
 }
 
 /**
@@ -117,6 +117,7 @@ function quotes_menu() {
     'page callback' => 'quotes_user_page',
     'file' => 'quotes.user.inc',
     'access callback' => '_quotes_recentquotes_access',
+    'access arguments' => array(1),
     'type' => MENU_LOCAL_TASK,
     'weight' => 2,
   );
@@ -192,7 +193,6 @@ function quotes_menu() {
     'type' => MENU_NORMAL_ITEM,
   );
 
-
   // Admin settings for the site.
   $items['quotes/config'] = array(
     'title' => 'Settings',
@@ -402,7 +402,7 @@ function quotes_load($nodes) {
   foreach ($nodes as $node) {
     //$obj = db_fetch_object(db_query("SELECT a.aid AS quotes_aid, a.name AS quotes_author, a.bio AS quotes_bio, q.citation AS quotes_citation, q.promote AS quotes_promote FROM {quotes} q JOIN {quotes_authors} a USING (aid) WHERE q.vid = %d", $node->vid));
     $obj = db_select('quotes' , 'q');
-    $alias = $obj->join('quotes_authors' , 'a', 'q.aid = a.aid');
+    $alias = $obj->leftjoin('quotes_authors' , 'a', 'q.aid = a.aid');
     $f_aa = $obj->addField('a' , 'aid' , 'quotes_aid');
     $f_an = $obj->addField('a' , 'name' , 'quotes_author');
     $f_ab = $obj->addField('a' , 'bio' , 'quotes_bio');
@@ -695,21 +695,21 @@ function quotes_node_view($node, $view_mode) {
         '#markup' => $author,
       );
       // Add author's bio if enabled and present.
-      if (variable_get($quotes_author_bio,FALSE) == 1 && !empty($node->quotes_bio)) {
+      if (variable_get('quotes_author_bio',FALSE) == 1 && !empty($node->quotes_bio)) {
         $node->content['quotes_bio'] = array(
           '#prefix' => '<div class="quotes-bio">',
           '#suffix' => '</div>',
           '#markup' => check_markup($node->quotes_bio, $format, $node->language, FALSE),
         );
       }
-      // Add citation if present.
-      if (!empty($node->quotes_citation)) {
-        $node->content['quotes_citation'] = array(
-          '#prefix' => '<div class="quotes-citation"><cite>',
-          '#suffix' => '</cite></div>',
-          '#markup' => check_markup($node->quotes_citation, $format, $node->language, FALSE),
-        );
-      }
+    }
+    // Add citation if present.
+    if (!empty($node->quotes_citation)) {
+      $node->content['quotes_citation'] = array(
+        '#prefix' => '<div class="quotes-citation"><cite>',
+        '#suffix' => '</cite></div>',
+        '#markup' => check_markup($node->quotes_citation, $format, $node->language, FALSE),
+      );
     }
   }
   if ($view_mode != 'rss') {
@@ -1425,7 +1425,11 @@ function theme_quotes_quote($variables) {
  * @ingroup themeable
  */
 function theme_quotes_page($variables) {
-  $uid     = $variables['uid'];
+  global $user;
+  $account = $variables['account'];
+  if (is_numeric($account)) {
+    $account = user_load($account);
+  }
   $build   = array();
 
   $query = db_select('node', 'n')->extend('PagerDefault');
@@ -1435,18 +1439,16 @@ function theme_quotes_page($variables) {
     -> condition('n.status', '1')
     -> condition('n.type', 'quotes');
 
-  if ($uid) {
-    //$account = user_load_multiple(array('uid' => $uid->uid), array('status' => 1));
-    $account = user_load($uid->uid);
+  if ($account) {
     //$name = isset($account->realname) ? $account->realname : $account->name;
-    $name = $account->name;
+    $name = strip_tags(theme('username',array('account' => $account)));
     $menu_info = menu_get_item('quotes');
     $menu_title = $menu_info['title'];
-    drupal_set_title(t("!name's !menu", array('!menu' => $menu_title, '!name' => $name)), PASS_THROUGH);
+    drupal_set_title(t("!menu from !name", array('!menu' => $menu_title, '!name' => $name)), PASS_THROUGH);
 
-    $url = url("quotes/$account->uid/feed");
+    $url = url('quotes/' . $account->uid . '/feed');
     //$result = pager_query(db_rewrite_sql("SELECT n.nid FROM {node} n INNER JOIN {node_revisions} nr USING (vid) WHERE n.status=1 AND n.type='quotes' AND n.uid=%d ORDER BY n.sticky DESC, n.created DESC"), $limit, 0, NULL, $user->uid);
-    $query -> condition('n.uid', $uid->uid);
+    $query -> condition('n.uid', $account->uid);
   }
   else {
     $url = url('quotes/feed');
@@ -1474,11 +1476,14 @@ function theme_quotes_page($variables) {
     );
   }
   else {
-    if ($account->uid == $uid->uid) {
-      drupal_set_message(check_plain('You have not created any quotes.'));
+    if (!$account) {
+      drupal_set_message(t('No quotes have been created.'));
+    } 
+    elseif ($account->uid == $user->uid) {
+      drupal_set_message(t('You have not created any quotes.'));
     }
     else {
-      drupal_set_message(t('!author has not created any quotes entries.', array('!author' => theme('username', array('account' => $account))),PASS_THROUGH));
+      drupal_set_message(t('!author has not created any quotes entries.', array('!author' => theme('username', array('account' => $account)))));
     }
   }
 
@@ -1551,33 +1556,24 @@ function quotes_get_quote($filters = array(), $promoted_only, $limit = 1) {
 }
 
 /**
- * Returns the SQL join text necessary for the provided filter
- * criteria.
+ * Adds the necessary joins to a quotes block query to support filter criteria.
  *
  * @param $filters
- *   The array specifying filter criteria using the keys nid_filter,
- *   aid_filter, rid_filter, uid_filter, and tid_filter.
- * @param $aliases
- *   The array specifying the aliases to be used for the tables that
- *   may be joined based on the provided filter criteria. Keys are the
- *   table names node, users_roles, users, and term_node.
+ *   The array specifying filter criteria using the keys rid_filter and
+ *   tid_filter.
+ * @param $query
+ *   The query object to modify.
  *
  * @return
  *   A string containing the SQL join text necessary for the provided
  *   criteria.
  */
-function quotes_block_join_sql($filters = array(), $query, $aliases = array('node' => 'n', 'users_roles' => 'qur', 'users' => 'qu', 'taxonomy_index' => 'ti')) {
-  $join = '';
-  if ($filters['rid_filter'] && $filters['rid_filter'] != 'none') {
-    $a = $aliases['users_roles'];
-    //$join .= " LEFT JOIN {users_roles} '. $a USING(uid) ";
+function quotes_block_join_sql($filters = array(), $query) {
+  if (!empty($filters['rid_filter']) && $filters['rid_filter'] != 'none') {
     $ur_alias = $query->leftjoin('users_roles', 'a' , 'uid');
   }
 
-  if ($filters['tid_filter'] && $filters['tid_filter'] != 'none') {
-    $atn = $aliases['taxonomy_index'];
-    $an = $aliases['node'];
-    //$join .= " INNER JOIN {taxonomy_term_node} $atn ON $atn.nid = $an.nid ";
+  if (!empty($filters['tid_filter']) && $filters['tid_filter'] != 'none') {
     $ttn_alias = $query->join('taxonomy_index', 'ti', 'n.nid = ti.nid');
   }
 
@@ -1641,13 +1637,13 @@ function quotes_block_where_sql($filters = array(), $aliases = array('node' => '
  */
 function quotes_myquotes() {
   global $user;
-  return theme('quotes_page', array('uid' => $user->uid));
+  return theme('quotes_page', array('account' => $user));
 }
 
 /**
  * Menu callback that calls theme_quotes_page().
  *
- * @param $uid
+ * @param $account
  *   The user object (from menu) of the user's quotes to be displayed.
  * @param $arg2
  *   If 'feed', a feed is requested.
@@ -1655,10 +1651,10 @@ function quotes_myquotes() {
  * @return
  *   An HTML-formatted list of quotes.
  */
-function quotes_page($user = NULL, $arg2 = NULL) {
+function quotes_page($account = NULL, $arg2 = NULL) {
   global $user;
   if ($arg2 == 'feed') {
-    _quotes_feed_user($user->uid);
+    _quotes_feed_user($account->uid);
   }
   else {
     // Breadcrumb navigation. The default is wrong because of a core menu bug.
@@ -1668,11 +1664,11 @@ function quotes_page($user = NULL, $arg2 = NULL) {
     $menu_title = $menu_info['title'];
     $breadcrumb[] = l($menu_title, 'quotes');
     drupal_set_breadcrumb($breadcrumb);
-    if ($user == 'author') {
+    if ($account == 'author') {
       return quotes_author($arg2);
     }
     else {
-      return theme('quotes_page', array('uid' => $user));
+      return theme('quotes_page', array('account' => $account));
     }
   }
 }
@@ -1692,11 +1688,12 @@ function quotes_page($user = NULL, $arg2 = NULL) {
  * @see http://drupal.org/node/1354
  */
 function quotes_author($author = NULL) {
-  if (!$author) {
+  $output = '';
+  if (!isset($author)) {
     // If no author given, display a selection list.
     return drupal_get_form('quotes_author_form');
   }
-  elseif ($author == t('unspecified')) {
+  elseif ($author==0 || $author == t('unspecified')) {
     $aid = 0;
     $auth = array('name' => $author, 'bio' => '');
   }
@@ -1729,19 +1726,21 @@ function quotes_author($author = NULL) {
   }
 
   //$result = pager_query(db_rewrite_sql("SELECT n.nid FROM {node} n INNER JOIN {node_revisions} nr USING (vid) INNER JOIN {quotes} q USING (vid) WHERE q.aid='%d' AND n.status=1 AND n.type='quotes' ORDER BY n.sticky DESC, n.created DESC"), $limit, 0, NULL, $aid);
-  $sql = db_select('node', 'n');
+  $sql = db_select('node', 'n')
+    ->extend('PagerDefault')
+    ->limit($limit);
   $nr_alias = $sql ->join('node_revision', 'nr', 'nr.vid = n.vid');
   $q_alias = $sql ->join ('quotes', 'q', 'q.vid = nr.vid');
   $sql
     -> fields('n', array('nid'))
     -> fields('q', array('nid'))
-    -> condition('aid', '?')
-    -> condition('status', '1')
+    -> condition('aid', $aid)
+    -> condition('nr.status', '1')
     -> condition('type', 'quotes')
-    -> orderBy('sticky', 'DESC')
+    -> orderBy('nr.sticky', 'DESC')
     -> orderBy('created', 'DESC');
 
-  $result = pager_query($sql->execute(), $limit, 0, NULL, $aid);
+  $result = $sql->execute();
 
   $output .= '<div class="quotes">';
 
@@ -1958,9 +1957,9 @@ function quotes_get_authors($none = FALSE) {
       $list[$row->aid] = $row->name;
     }
     else {
-      db_query("DELETE FROM {quotes_authors} WHERE aid=%d", $row['aid']);
+      db_query("DELETE FROM {quotes_authors} WHERE aid=:aid", array(':aid' => $row->aid));
       watchdog('Quotes', 'Deleted aid=!aid (!name) because of no quotes.',
-        array('!aid' => $row['aid'], '!name' => drupal_substr(filter_xss($row['name'], array()), 0, 40)));
+        array('!aid' => $row->aid, '!name' => drupal_substr(filter_xss($row->name, array()), 0, 40)));
     }
   }
   if ($unknown != -1) {
