diff --git a/pg_paypal/pg_paypal.module b/pg_paypal/pg_paypal.module
index b93210b..099351c 100644
--- a/pg_paypal/pg_paypal.module
+++ b/pg_paypal/pg_paypal.module
@@ -1,5 +1,9 @@
 <?php
 
+/**
+ * @file
+ */
+
 // Constant definition
 define('cPaypalActionUrl',     'https://www.paypal.com/xclick/');
 define('cPaypalValidationUrl', 'https://www.paypal.com/cgi-bin/webscr');
@@ -16,14 +20,14 @@ function pg_paypal_menu() {
     'file' => 'pg_paypal.pages.inc',
     'type' => MENU_CALLBACK,
   );
-  $items['admin/pgdata/pgsettings/paypal'] = array(
+  $items['admin/config/pgapi/paypal'] = array(
     'title' => 'Paypal',
     'description' => 'Paypal payment settings.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pg_paypal_settings'),
     'access arguments' => array('administer pgapi'),
     'file' => 'pg_paypal.admin.inc',
-    'type' => MENU_LOCAL_TASK,
+    'type' => MENU_CALLBACK,
   );
   return $items;
 }
@@ -38,7 +42,7 @@ function pg_paypal_pgapi_gw($op, $a3 = NULL, $a4 = NULL) {
       break;
     case 'payment gateway info':
       $ret['name'] = theme('image', array(
-        'path' => drupal_get_path('module', 'pg_paypal') . 'images//paypal.png',
+        'path' => drupal_get_path('module', 'pg_paypal') . '/images/paypal.png',
         'width' => t('Paypal'),
         'height' => t('Paypal'),
       ));
diff --git a/pg_roboxchange/pg_roboxchange.module b/pg_roboxchange/pg_roboxchange.module
index 8dde08e..e4aa138 100644
--- a/pg_roboxchange/pg_roboxchange.module
+++ b/pg_roboxchange/pg_roboxchange.module
@@ -40,6 +40,7 @@ function pg_roboxchange_menu() {
     'access arguments' => array('administer pgapi'),
     'file' => 'pg_roboxchange.admin.inc',
   );
+
   return $items;
 }
 
diff --git a/pg_showtransactions/pg_showtransactions.admin.inc b/pg_showtransactions/pg_showtransactions.admin.inc
index 543337d..4b45b6e 100644
--- a/pg_showtransactions/pg_showtransactions.admin.inc
+++ b/pg_showtransactions/pg_showtransactions.admin.inc
@@ -111,11 +111,20 @@ function pg_showtransactions_history() {
     t('Operations'),
   );
 
-  $sql = 'SELECT t.*, u.name FROM {pgapi_transaction} t LEFT JOIN {users} u ON u.uid=t.uid ' . $filters['join'] . ' ' . $filters['where'] . tablesort_sql($header);
-
-  $result = pager_query($sql, variable_get('pg_showtransactions_default_num', 10), 0, NULL, $filters['args']);
-
-  while ($txn = db_fetch_object($result)) {
+//  $sql = 'SELECT t.*, u.name FROM {pgapi_transaction} t LEFT JOIN {users} u ON u.uid = t.uid ' . $filters['join'] . ' ' . $filters['where'] . tablesort_sql($header);
+//  $result = pager_query($sql, variable_get('pg_showtransactions_default_num', 10), 0, NULL, $filters['args']);
+
+  $query = db_select('pgapi_transaction', 't');
+  $query->extend('PagerDefault')
+        ->extend('TableSort')
+        ->leftJoin('users', 'u', 't.uid = u.uid')
+        ->fields('t')
+        ->fields('u', array('name'))
+        ->execute();
+  //$query->limit(variable_get('pg_showtransactions_default_num', 10));
+  //$query->orderByHeader($header);
+
+  foreach ($result as $txn) {
     $action = l(t('Edit'), "admin/reports/showtransactions/edit/" . $txn->txnid, array('query' => drupal_get_destination()));
     $rows[] = array(
       '<input type="checkbox" name="items[' . $txn->txnid . ']">',
@@ -131,15 +140,13 @@ function pg_showtransactions_history() {
       $action,
     );
   }
-  //while
-  $filter_form = drupal_get_form('pg_showtransactions_filter_form', 'history_filter');
 
+  $filter_form = drupal_get_form('pg_showtransactions_filter_form', 'history_filter');
   $output = theme('pg_showtransactions_history', array('rows' => $rows, 'filter_form' => $filter_form));
-  return $output;
 
+  return $output;
 }
 
-
 /**
  * @todo Please document this function.
  * @see http://drupal.org/node/1354
@@ -210,8 +217,8 @@ function pg_showtransactions_operator_history() {
   //while
   $filter_form = drupal_get_form('pg_showtransactions_filter_form', 'history_filter');
   $output = theme('pg_showtransactions_operator_history', array('rows' => $rows, 'filter_form' => $filter_form));
-  return $output;
 
+  return $output;
 }
 
 /**
@@ -288,8 +295,8 @@ function pg_showtransactions_personal_history() {
   //while
   $filter_form = drupal_get_form('pg_showtransactions_filter_form', 'personal_history_filter');
   $output .= theme('pg_showtransactions_personal_history', array('rows' => $rows, 'filter_form' => $filter_form));
-  return $output;
 
+  return $output;
 }
 
 /**
@@ -418,8 +425,6 @@ function pg_showtransactions_filter_form_submit($form, &$form_state) {
   }
 }
 
-
-
 /********************************************************************
  * Other Functions
  ********************************************************************/
@@ -550,9 +555,5 @@ function pg_showtransactions_personal_history_filters() {
     'options' => pgapi_build_status(),
   );
 
-
-
   return $filters;
 }
-
-
diff --git a/pg_showtransactions/pg_showtransactions.module b/pg_showtransactions/pg_showtransactions.module
index afba790..3ea92be 100644
--- a/pg_showtransactions/pg_showtransactions.module
+++ b/pg_showtransactions/pg_showtransactions.module
@@ -69,7 +69,7 @@ function pg_showtransactions_theme() {
  * @see http://drupal.org/node/1354
  */
 function pg_showtransactions_menu() {
-
+  $items = array();
 
   $items['admin/reports/pg_charts'] = array(
     'title' => 'PGAPI :: ShowTransaction :: Charts',
@@ -248,7 +248,7 @@ function pg_showtransactions_cron() {
     return '';
   }
   $sql = "SELECT * FROM {pgapi_transaction} WHERE created > '%d'";
-  $result = db_query("SELECT * FROM {pgapi_transaction} WHERE created > :created", array(':created' => : created, '' => array(':created' => $lasttime)));
+  $result = db_query("SELECT * FROM {pgapi_transaction} WHERE created > :created", array(':created' => $created, '' => array(':created' => $lasttime)));
   $stats = array();
   while ($row = db_fetch_object($result)) {
     $day = date("d", $row->created);
@@ -258,7 +258,7 @@ function pg_showtransactions_cron() {
   }
 
   $sql = "SELECT * FROM {pgapi_transaction} WHERE created > '%d' and status='%d'";
-  $result = db_query("SELECT * FROM {pgapi_transaction} WHERE created > :created and status = :status", array(':created' => : created, ':status' => : status, '' => array(
+  $result = db_query("SELECT * FROM {pgapi_transaction} WHERE created > :created and status = :status", array(':created' => $created, ':status' => $status, '' => array(
       ':created' => $lasttime,
       ':status' => pgapi_get_status_id('completed'),
     )));
@@ -814,7 +814,7 @@ function theme_pg_showtransactions_filters($variables) {
  * @todo Please document this function.
  * @see http://drupal.org/node/1354
  */
-function theme_pg_showtransactions_history() {
+function theme_pg_showtransactions_history($variables) {
   // TODO Number of parameters in this theme funcion does not match number of parameters found in hook_theme.
   $rows = $variables['rows'];
   $filter_form = $variables['filter_form'];
@@ -869,7 +869,7 @@ function theme_pg_showtransactions_history() {
         'colspan' => '11',
       ));
   }
-  $output .= '<form action="/pg_showtransactions/editgroup" method="POST"><div width=99% style="overflow-x: auto; ">';
+  $output .= '<form action="/pg_showtransactions/editgroup" method="POST"><div width=99% style="overflow-x: auto;">';
   $pager = theme('pager', array('tags' => array(
       'tags' => NULL,
       'element' => 0,
@@ -880,18 +880,15 @@ function theme_pg_showtransactions_history() {
         'colspan' => 10,
       ));
   }
-  $output .=  theme("table", array('header' => array(
-      'header' => $header,
-      'rows' => $rows,
-    )));
+  $output .= theme("table", array('header' => $header, 'rows' => $rows,));
   $output .= "</div>";
   $output .= '<input type="submit" name="op" class="form-submit" onclick="return confirm(\'' . t('Delete selected payments?') . '\');" value="' . t('Delete selected') . '"> ';
   $output .= '<input type="submit" name="op" class="form-submit" onclick="return confirm(\'' . t('Delete all unpaid payments?') . '\');" value="' . t('Delete all unpaid') . '">';
   $output .= '</form>';
+
   return $output;
 }
 
-
 /**
  * @todo Please document this function.
  * @see http://drupal.org/node/1354
diff --git a/pg_webmoney/pg_webmoney.module b/pg_webmoney/pg_webmoney.module
index d2e4333..116f0bf 100644
--- a/pg_webmoney/pg_webmoney.module
+++ b/pg_webmoney/pg_webmoney.module
@@ -41,7 +41,7 @@ function pg_webmoney_theme() {
   return array(
     'pg_webmoney_list' => array(
       'render element' => 'form',
-      'file' => 'pg_webfoney.theme.inc',
+      'file' => 'pg_webmoney.theme.inc',
     ),
     'pg_webmoney_example' => array(
       'variables' => array('purse' => NULL, 'tradename' => NULL, 'secret_key' => NULL, 'success' => NULL, 'done' => NULL, 'fail' => NULL),
@@ -86,7 +86,7 @@ function pg_webmoney_menu() {
     'access callback' => 'user_access',
     'access arguments' => array('administer pgapi'),
     'file' => 'pg_webmoney.admin.inc',
-    'type' => MENU_LOCAL_TASK,
+    'type' => MENU_CALLBACK,
   );
   $items['admin/config/pgapi/webmoney/list'] = array(
     'title' => 'Purses',
@@ -136,6 +136,7 @@ function pg_webmoney_menu() {
     'file' => 'pg_webmoney.admin.inc',
     'type' => MENU_CALLBACK,
   );
+
   return $items;
 }
