diff --git a/database/database.mysql b/database/database.mysql
index c35019bc68a67e21fa604a2c1b8388b36513e8e4..994ea4f919e43692fd38532e47591a5eef320910 100644
--- a/database/database.mysql
+++ b/database/database.mysql
@@ -2,7 +2,7 @@
 --
 -- Host: localhost    Database: drupal_devel
 ---------------------------------------------------------
--- Server version	3.23.52-nt
+-- Server version  3.23.52-nt
 
 --
 -- Table structure for table 'access'
diff --git a/includes/theme.inc b/includes/theme.inc
index 108347da74c48ebf425c762d883bc8005443bc8a..62239da128cb414b151f177ab48c122ad8c44036 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -75,6 +75,21 @@ function footer() {
 
 }
 
+function theme_mark() {
+  /*
+  ** Return a marker.  Used to indicate new comments or required form
+  ** fields.
+  */
+  return "<span style=\"color: red;\">*</span>";
+}
+
+function theme_error($message) {
+  /*
+  ** Return an error message.
+  */
+  return "<div style=\"color: red;\">$message</div>";
+}
+
 function theme_list() {
   static $list;
 
@@ -125,12 +140,12 @@ function theme_blocks($region, &$theme) {
 function theme_invoke() {
   global $theme;
   $args = func_get_args();
-  
+
   $function = array_shift($args);
 
   if (method_exists($theme, $function)) {
     return call_user_method_array($function, $theme, $args);
-  } 
+  }
   else {
     return call_user_func_array($function, $args);
   }
diff --git a/modules/blog.module b/modules/blog.module
index 7aba6d5dc59861652ce922609c0eed3bef55a02c..0869fe19ec8eccfe800618ead9bf99112d08a846 100644
--- a/modules/blog.module
+++ b/modules/blog.module
@@ -228,7 +228,7 @@ function blog_form(&$node, &$help, &$error) {
     */
 
     if (count(explode(" ", $node->body)) < variable_get("minimum_blog_size", 0)) {
-      $error["body"] = "<div style=\"color: red;\">". t("The body of your blog is too short.") ."</div>";
+      $error["body"] = theme_invoke("theme_error", t("The body of your blog is too short."));
     }
   }
   else {
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 7aba6d5dc59861652ce922609c0eed3bef55a02c..0869fe19ec8eccfe800618ead9bf99112d08a846 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -228,7 +228,7 @@ function blog_form(&$node, &$help, &$error) {
     */
 
     if (count(explode(" ", $node->body)) < variable_get("minimum_blog_size", 0)) {
-      $error["body"] = "<div style=\"color: red;\">". t("The body of your blog is too short.") ."</div>";
+      $error["body"] = theme_invoke("theme_error", t("The body of your blog is too short."));
     }
   }
   else {
diff --git a/modules/node.module b/modules/node.module
index 398404aee1de249377d662b18dfaa5117528be2b..d337687ad78dc45ef890a4f53dd0dbd5ce86215a 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -727,7 +727,7 @@ function node_validate($node, &$error) {
   */
 
   if (isset($node->title) && !$node->title) {
-    $error["title"] = "<div style=\"color: red;\">". t("You have to specify a valid title.") ."</div>";
+    $error["title"] = theme_invoke("theme_error", t("You have to specify a valid title."));
   }
 
   if (user_access("administer nodes")) {
@@ -760,7 +760,7 @@ function node_validate($node, &$error) {
       $node->uid = $account->uid;
     }
     else {
-      $error["name"] = "<div style=\"color: red;\">". t("The name '%u' does not exist.", array ("%u" => $node->name)) ."</div>";
+      $error["name"] = theme_invoke("theme_error", t("The name '%u' does not exist.", array ("%u" => $node->name)));
     }
 
     /*
@@ -771,7 +771,7 @@ function node_validate($node, &$error) {
       $node->created = strtotime($node->date);
     }
     else {
-      $error["date"] = "<div style=\"color: red;\">". t("You have to specifiy a valid date.") ."</div>";
+      $error["date"] = theme_invoke("theme_error", t("You have to specifiy a valid date."));
     }
 
   }
@@ -933,7 +933,7 @@ function node_add($type) {
       if ($edit[$field]) {
         $node[$field] = check_input($edit[$field]);
       }
-    }     
+    }
     $output = node_form($node);
   }
   else {
diff --git a/modules/node/node.module b/modules/node/node.module
index 398404aee1de249377d662b18dfaa5117528be2b..d337687ad78dc45ef890a4f53dd0dbd5ce86215a 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -727,7 +727,7 @@ function node_validate($node, &$error) {
   */
 
   if (isset($node->title) && !$node->title) {
-    $error["title"] = "<div style=\"color: red;\">". t("You have to specify a valid title.") ."</div>";
+    $error["title"] = theme_invoke("theme_error", t("You have to specify a valid title."));
   }
 
   if (user_access("administer nodes")) {
@@ -760,7 +760,7 @@ function node_validate($node, &$error) {
       $node->uid = $account->uid;
     }
     else {
-      $error["name"] = "<div style=\"color: red;\">". t("The name '%u' does not exist.", array ("%u" => $node->name)) ."</div>";
+      $error["name"] = theme_invoke("theme_error", t("The name '%u' does not exist.", array ("%u" => $node->name)));
     }
 
     /*
@@ -771,7 +771,7 @@ function node_validate($node, &$error) {
       $node->created = strtotime($node->date);
     }
     else {
-      $error["date"] = "<div style=\"color: red;\">". t("You have to specifiy a valid date.") ."</div>";
+      $error["date"] = theme_invoke("theme_error", t("You have to specifiy a valid date."));
     }
 
   }
@@ -933,7 +933,7 @@ function node_add($type) {
       if ($edit[$field]) {
         $node[$field] = check_input($edit[$field]);
       }
-    }     
+    }
     $output = node_form($node);
   }
   else {
diff --git a/modules/poll.module b/modules/poll.module
index f6dca48dfeffdc1321ffe8ad82e339686a65c9ff..7c22e041c53be5a9cf8d08ea110c321bf0daf645 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -86,12 +86,12 @@ function poll_form(&$node, &$help, &$error) {
       }
 
       if ($node->chvotes[$i] < 0) {
-        $error["chvotes][$i"] = "<span style=\"color: red;\">". t("Negative values are not allowed.") ."</span>";
+        $error["chvotes][$i"] = theme_invoke("theme_error", t("Negative values are not allowed."));
       }
     }
 
     if ($actualchoices < 2) {
-      $error["choice][0"] = "<span style=\"color: red;\">". t("You must fill in at least two choices.") ."</span>";
+      $error["choice][0"] = theme_invoke("theme_error", t("You must fill in at least two choices."));
     }
   }
   else {
@@ -125,7 +125,8 @@ function poll_form(&$node, &$help, &$error) {
 }
 
 function poll_help() {
- ?><p>Drupal's poll module allows users with at least content posting privileges to submit multiple-choice questions that others can vote on.  Any user with sufficient privileges can vote.  Please note that this is fully controlled by Drupal's access control features.  For example, users might be required to login before voting (or even seeing the page where the voting occurs) or it could be open to the world.</p>
+ ?>
+  <p>Drupal's poll module allows users with at least content posting privileges to submit multiple-choice questions that others can vote on.  Any user with sufficient privileges can vote.  Please note that this is fully controlled by Drupal's access control features.  For example, users might be required to login before voting (or even seeing the page where the voting occurs) or it could be open to the world.</p>
  <?php
 }
 
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index f6dca48dfeffdc1321ffe8ad82e339686a65c9ff..7c22e041c53be5a9cf8d08ea110c321bf0daf645 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -86,12 +86,12 @@ function poll_form(&$node, &$help, &$error) {
       }
 
       if ($node->chvotes[$i] < 0) {
-        $error["chvotes][$i"] = "<span style=\"color: red;\">". t("Negative values are not allowed.") ."</span>";
+        $error["chvotes][$i"] = theme_invoke("theme_error", t("Negative values are not allowed."));
       }
     }
 
     if ($actualchoices < 2) {
-      $error["choice][0"] = "<span style=\"color: red;\">". t("You must fill in at least two choices.") ."</span>";
+      $error["choice][0"] = theme_invoke("theme_error", t("You must fill in at least two choices."));
     }
   }
   else {
@@ -125,7 +125,8 @@ function poll_form(&$node, &$help, &$error) {
 }
 
 function poll_help() {
- ?><p>Drupal's poll module allows users with at least content posting privileges to submit multiple-choice questions that others can vote on.  Any user with sufficient privileges can vote.  Please note that this is fully controlled by Drupal's access control features.  For example, users might be required to login before voting (or even seeing the page where the voting occurs) or it could be open to the world.</p>
+ ?>
+  <p>Drupal's poll module allows users with at least content posting privileges to submit multiple-choice questions that others can vote on.  Any user with sufficient privileges can vote.  Please note that this is fully controlled by Drupal's access control features.  For example, users might be required to login before voting (or even seeing the page where the voting occurs) or it could be open to the world.</p>
  <?php
 }
 
diff --git a/modules/profile.module b/modules/profile.module
index 5503d7ee9e08ba036ece1fa927acdaaf60f32719..58c2882ab78b6c3b04db05c0c9ccd367816c23a5 100644
--- a/modules/profile.module
+++ b/modules/profile.module
@@ -54,9 +54,9 @@ function profile_conf_options() {
   $output .= form_select(t("Publicly accessible fields"), "profile_public_fields", variable_get("profile_public_fields", array()), $fields, t("The fields users will be able to set and that will be publicly visible."), "size=\"6\"", 1);
   $output .= form_select(t("Private fields"), "profile_private_fields", variable_get("profile_private_fields", array()), $fields, t("The fields users will be able to set, but which are kept private."), "size=\"6\"", 1);
 
-  $output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writeable and visible from the web.")); 
-  $output .= form_textfield(t("Avatar max size"), "profile_avatar_size", variable_get("profile_avatar_size", "85x85"), 10, 10, t("Maximum size for avatars."));    
-  $output .= form_textfield(t("Avatar max filesize"), "profile_avatar_filesize", variable_get("profile_avatar_filesize", "30"), 10, 10, t("Maximum filesize for avatars, in kb."));    
+  $output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writeable and visible from the web."));
+  $output .= form_textfield(t("Avatar max size"), "profile_avatar_size", variable_get("profile_avatar_size", "85x85"), 10, 10, t("Maximum size for avatars."));
+  $output .= form_textfield(t("Avatar max filesize"), "profile_avatar_filesize", variable_get("profile_avatar_filesize", "30"), 10, 10, t("Maximum filesize for avatars, in kb."));
 
   return $output;
 }
@@ -86,12 +86,12 @@ function profile_user($type, $edit, &$user) {
     case "view_private":
       // when user looks at his own data
       return _profile_user_view($user, "private");
-  }  
+  }
 }
 
 function profile_required($title) {
   // this pleads "theme_invoke, theme_invoke" ;)
-  return $title ." <span style=\"color: red;\">*</span>";
+  return $title ." ". theme_invoke("theme_mark");
 }
 
 function _profile_form($edit, $mode) {
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 5503d7ee9e08ba036ece1fa927acdaaf60f32719..58c2882ab78b6c3b04db05c0c9ccd367816c23a5 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -54,9 +54,9 @@ function profile_conf_options() {
   $output .= form_select(t("Publicly accessible fields"), "profile_public_fields", variable_get("profile_public_fields", array()), $fields, t("The fields users will be able to set and that will be publicly visible."), "size=\"6\"", 1);
   $output .= form_select(t("Private fields"), "profile_private_fields", variable_get("profile_private_fields", array()), $fields, t("The fields users will be able to set, but which are kept private."), "size=\"6\"", 1);
 
-  $output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writeable and visible from the web.")); 
-  $output .= form_textfield(t("Avatar max size"), "profile_avatar_size", variable_get("profile_avatar_size", "85x85"), 10, 10, t("Maximum size for avatars."));    
-  $output .= form_textfield(t("Avatar max filesize"), "profile_avatar_filesize", variable_get("profile_avatar_filesize", "30"), 10, 10, t("Maximum filesize for avatars, in kb."));    
+  $output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writeable and visible from the web."));
+  $output .= form_textfield(t("Avatar max size"), "profile_avatar_size", variable_get("profile_avatar_size", "85x85"), 10, 10, t("Maximum size for avatars."));
+  $output .= form_textfield(t("Avatar max filesize"), "profile_avatar_filesize", variable_get("profile_avatar_filesize", "30"), 10, 10, t("Maximum filesize for avatars, in kb."));
 
   return $output;
 }
@@ -86,12 +86,12 @@ function profile_user($type, $edit, &$user) {
     case "view_private":
       // when user looks at his own data
       return _profile_user_view($user, "private");
-  }  
+  }
 }
 
 function profile_required($title) {
   // this pleads "theme_invoke, theme_invoke" ;)
-  return $title ." <span style=\"color: red;\">*</span>";
+  return $title ." ". theme_invoke("theme_mark");
 }
 
 function _profile_form($edit, $mode) {
diff --git a/modules/tracker.module b/modules/tracker.module
index 32a8a0885c9812176f1a8a3eae4211a797b43055..e663ea7984b657f7b377cff34d62c1a4b5945e0f 100644
--- a/modules/tracker.module
+++ b/modules/tracker.module
@@ -48,7 +48,7 @@ function tracker_comments($id = 0) {
 
     $output .= "<ul>";
     while ($comment = db_fetch_object($cresult)) {
-      $output .= " <li>". l(check_output($comment->subject), array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid) ." ". t("by") ." ". format_name($comment) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? "<span style=\"color: red;\">*</span>" : "") ."</li>\n";
+      $output .= " <li>". l(check_output($comment->subject), array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid) ." ". t("by") ." ". format_name($comment) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? theme_invoke("theme_mark") : "") ."</li>\n";
     }
     $output .= " </ul>\n";
   }
diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module
index 32a8a0885c9812176f1a8a3eae4211a797b43055..e663ea7984b657f7b377cff34d62c1a4b5945e0f 100644
--- a/modules/tracker/tracker.module
+++ b/modules/tracker/tracker.module
@@ -48,7 +48,7 @@ function tracker_comments($id = 0) {
 
     $output .= "<ul>";
     while ($comment = db_fetch_object($cresult)) {
-      $output .= " <li>". l(check_output($comment->subject), array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid) ." ". t("by") ." ". format_name($comment) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? "<span style=\"color: red;\">*</span>" : "") ."</li>\n";
+      $output .= " <li>". l(check_output($comment->subject), array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid) ." ". t("by") ." ". format_name($comment) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? theme_invoke("theme_mark") : "") ."</li>\n";
     }
     $output .= " </ul>\n";
   }
diff --git a/modules/user.module b/modules/user.module
index d2c4d173483d7b5a7051a4427d426e7522581efb..835b8a996000d6c7751374447fa3a4366ef406bb 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -77,7 +77,7 @@ function user_load($array = array()) {
   $result = db_query("SELECT u.*, r.name AS role FROM users u LEFT JOIN role r ON u.rid = r.rid WHERE $query u.status < 3 LIMIT 1");
 
   $user = db_fetch_object($result);
-  if ($data = unserialize($user->data)) {
+  if ($user->data && $data = unserialize($user->data)) {
     foreach ($data as $key => $value) {
       if (!isset($user->$key)) {
         $user->$key = $value;
@@ -188,7 +188,7 @@ function user_validate_mail($mail) {
   */
 
   if ($mail && !eregi("^[0-9a-z_\.-]+@(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z][0-9a-z-]*[0-9a-z]\.)+[a-z]{2,})$", $mail)) {
-    return t("The e-mail address '$mail' is not valid.");
+    return t("The e-mail address '%mail' is not valid.", array("%mail" => $mail));
   }
 }
 
@@ -579,7 +579,7 @@ function user_login($edit = array(), $msg = "") {
   */
 
   if ($error) {
-    $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+    $output .= theme_invoke("theme_error", check_output($error));
   }
 
   /*
@@ -678,7 +678,7 @@ function user_pass($edit = array()) {
 
     // Display error message if necessary.
     if ($error) {
-      $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+      $output .= theme_invoke("theme_error", check_output($error));
     }
 
     /*
@@ -800,7 +800,7 @@ function user_register($edit = array()) {
   }
   else {
     if ($error) {
-      $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+      $output .= theme_invoke("theme_error", check_output($error));
     }
   }
 
@@ -917,7 +917,7 @@ function user_edit($edit = array()) {
     }
 
     if ($error) {
-      $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+      $output .= theme_invoke("theme_error", check_output($error));
     }
 
     if (!$edit) {
@@ -1141,7 +1141,7 @@ function user_admin_create($edit = array()) {
   else {
 
     if ($error) {
-      $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+      $output .= theme_invoke("theme_error", check_output($error));
     }
 
     $output .= form_textfield("Username", "name", $edit["name"], 30, 55);
@@ -1396,7 +1396,7 @@ function user_admin_edit($edit = array()) {
         $output .= status(t("your user information changes have been saved."));
       }
       else {
-        $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+        $output .= theme_invoke("theme_error", check_output($error));
       }
     }
     else if ($op == "Delete account") {
diff --git a/modules/user/user.module b/modules/user/user.module
index d2c4d173483d7b5a7051a4427d426e7522581efb..835b8a996000d6c7751374447fa3a4366ef406bb 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -77,7 +77,7 @@ function user_load($array = array()) {
   $result = db_query("SELECT u.*, r.name AS role FROM users u LEFT JOIN role r ON u.rid = r.rid WHERE $query u.status < 3 LIMIT 1");
 
   $user = db_fetch_object($result);
-  if ($data = unserialize($user->data)) {
+  if ($user->data && $data = unserialize($user->data)) {
     foreach ($data as $key => $value) {
       if (!isset($user->$key)) {
         $user->$key = $value;
@@ -188,7 +188,7 @@ function user_validate_mail($mail) {
   */
 
   if ($mail && !eregi("^[0-9a-z_\.-]+@(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z][0-9a-z-]*[0-9a-z]\.)+[a-z]{2,})$", $mail)) {
-    return t("The e-mail address '$mail' is not valid.");
+    return t("The e-mail address '%mail' is not valid.", array("%mail" => $mail));
   }
 }
 
@@ -579,7 +579,7 @@ function user_login($edit = array(), $msg = "") {
   */
 
   if ($error) {
-    $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+    $output .= theme_invoke("theme_error", check_output($error));
   }
 
   /*
@@ -678,7 +678,7 @@ function user_pass($edit = array()) {
 
     // Display error message if necessary.
     if ($error) {
-      $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+      $output .= theme_invoke("theme_error", check_output($error));
     }
 
     /*
@@ -800,7 +800,7 @@ function user_register($edit = array()) {
   }
   else {
     if ($error) {
-      $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+      $output .= theme_invoke("theme_error", check_output($error));
     }
   }
 
@@ -917,7 +917,7 @@ function user_edit($edit = array()) {
     }
 
     if ($error) {
-      $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+      $output .= theme_invoke("theme_error", check_output($error));
     }
 
     if (!$edit) {
@@ -1141,7 +1141,7 @@ function user_admin_create($edit = array()) {
   else {
 
     if ($error) {
-      $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+      $output .= theme_invoke("theme_error", check_output($error));
     }
 
     $output .= form_textfield("Username", "name", $edit["name"], 30, 55);
@@ -1396,7 +1396,7 @@ function user_admin_edit($edit = array()) {
         $output .= status(t("your user information changes have been saved."));
       }
       else {
-        $output .= "<p><span style=\"color: red;\" class=\"error\">". check_output($error) ."</span></p>";
+        $output .= theme_invoke("theme_error", check_output($error));
       }
     }
     else if ($op == "Delete account") {