diff --git a/shoutbox-form.js b/shoutbox-form.js
index 41350b5..1b9e940 100644
--- a/shoutbox-form.js
+++ b/shoutbox-form.js
@@ -1,42 +1,47 @@
 (function ($) {
 
-Drupal.shoutbox = {}
-Drupal.behaviors.shoutbox = {
-    attach: function(context, settings) {
-	// Declare AJAX behavior for the form
-	var options = {
-	    resetForm: true,
-	    beforeSubmit: Drupal.shoutbox.validate,
-	    success: Drupal.shoutbox.success
-	};
-	
-	// Detect the shout form
-	var shoutForm = $('#shoutbox-add-form:not(.shoutbox-processed)');
-	
-	if (shoutForm.length) {
-	    // Set a class to the form indicating that it's been processed
-	    $(shoutForm).addClass('shoutbox-processed');
-	    
-	    // Add AJAX behavior to the form
-	    $(shoutForm).ajaxForm(options);
+Drupal.shoutbox = Drupal.shoutbox || {};
 
-	    // Tell the form that we have Javascript enabled
-	    $(shoutForm).find('#edit-js').val(1);
-	    
-	    // Empty the shout textfield
-	    $(shoutForm).find('#edit-message').val('');
-	    
-	    // Close errors if they're clicked
-	    $('#shoutbox-error').click(function() {
-		$(this).hide(); 
-	    });
+Drupal.shoutbox.afterSubmit = Drupal.shoutbox.afterSubmit || {};
 
-	    // Show the admin links on hover
-	    Drupal.shoutbox.adminHover();
-	    
-	    // Initialize the timer for shout updates
-	    Drupal.shoutbox.shoutTimer('start');
-	}
+Drupal.behaviors.shoutbox = {
+    attach: function(context, settings) {
+      
+    	// Declare AJAX behavior for the form
+    	var options = {
+        resetForm: true,
+        beforeSubmit: Drupal.shoutbox.validate,
+        success: Drupal.shoutbox.success
+    	};
+    	
+    	// Detect the shout form
+    	var shoutForm = $('#shoutbox-add-form:not(.shoutbox-processed)', context);
+    	
+    	if (shoutForm.length) {
+    	    // Set a class to the form indicating that it's been processed
+    	    $(shoutForm).addClass('shoutbox-processed');
+    	    
+    	    // Add AJAX behavior to the form
+    	    $(shoutForm).ajaxForm(options);
+    
+    	    // Tell the form that we have Javascript enabled
+    	    $(shoutForm).find('#edit-js').val(1);
+    	    
+    	    // Empty the shout textfield
+    	    $(shoutForm).find('#edit-message').val('');
+    	    
+    	    // Close errors if they're clicked
+    	    $('#shoutbox-error').click(function() {
+    		    $(this).hide(); 
+    	    });
+    
+    	    // Show the admin links on hover
+    	    Drupal.shoutbox.adminHover();
+    	    
+    	    // Initialize the timer for shout updates
+    	    Drupal.shoutbox.shoutTimer('start');
+    	}
+    	
     }
 };
 
@@ -84,8 +89,31 @@ Drupal.shoutbox.adminFixDestination = function() {
  * Callback for a successful shout submission
  */
 Drupal.shoutbox.success = function(responseText) {
-  // Load the latest shouts
-  Drupal.shoutbox.loadShouts(true);
+  
+  // Execute all of them.
+  $.each(Drupal.shoutbox.afterSubmit, function (func) {
+    // We check for a wrapper function in Drupal.field_group as
+    // alternative for dynamic string function calls.
+    var hook = func.toLowerCase();
+    if ($.isFunction(this.execute)) {
+      this.execute(responseText);
+    }
+  });
+  
+}
+
+/**
+ * Implements Drupal.shoutbox.afterSubmit.hook.execute().
+ */
+Drupal.shoutbox.afterSubmit.loadShouts = {
+  execute: function (response) {
+    
+    // Load the latest shouts.
+    if ($("#shoutbox-body").length > 0) {
+      Drupal.shoutbox.loadShouts(true);
+    }
+    
+  }
 }
 
 /**
diff --git a/shoutbox.module b/shoutbox.module
index 367fa0f..3fa7a1e 100644
--- a/shoutbox.module
+++ b/shoutbox.module
@@ -85,7 +85,7 @@ function shoutbox_menu() {
 function shoutbox_shout_load($shout_id) {
   $shout = FALSE;
   if (is_numeric($shout_id)) {
-    $shout = db_query("SELECT * FROM {shoutbox} WHERE shout_id = :shout_id", 
+    $shout = db_query("SELECT * FROM {shoutbox} WHERE shout_id = :shout_id",
                       array(':shout_id' => $shout_id))->fetchObject();
   }
   return $shout;
@@ -267,7 +267,7 @@ function shoutbox_view($block = FALSE) {
   theme('shoutbox_external_files');
 
   $build = array();
-  
+
   // Determine the post count
   if (!$block) {
     $show_amount = variable_get('shoutbox_showamount_page', '30');
@@ -306,10 +306,10 @@ function shoutbox_view($block = FALSE) {
       );
     }
   }
-  
+
   // Output the shoutbox form.
   $build['form'] = drupal_get_form('shoutbox_add_form');
-  
+
   //dprint_r($build);
   //unset($build['content']['count']);
   // JS Settings
@@ -421,7 +421,7 @@ function shoutbox_add_form($form) {
         // Use $_GET['q'] because the page might not be just 'shoutbox'
         '#markup' => '&laquo;&nbsp;' . l(t('Return to the shoutbox'), $_GET['q']),
       )
-    );  
+    );
   }
 
   $max = variable_get('shoutbox_max_length', 255);
@@ -576,21 +576,21 @@ function shoutbox_display_posts($show_amount, $pager = FALSE) {
     ->fields('s')
     ->addTag('shouts');
 
-  // We use context to get the meta data to be used for the query 
+  // We use context to get the meta data to be used for the query
   $contexts = array();
   $blank = new StdClass();
   shoutbox_invoke('context', $blank, $contexts);
   foreach ($contexts as $key => $metaData) {
     $query->addMetaData($key, $metaData);
   }
-  // TODO: (disterics) if no shoutbox modules are enabled 
+  // TODO: (disterics) if no shoutbox modules are enabled
   // we can speed up the query by removing the condition
-  if (variable_get('shoutbox_restrict_general_shouts', 1) && 
+  if (variable_get('shoutbox_restrict_general_shouts', 1) &&
       empty($contexts)) {
     $query->condition('s.module', 'shoutbox', '=');
   }
 
-  $delta = 0;  
+  $delta = 0;
   $weight = $show_amount + $delta;
 
   // Add the post to the output either ascending or descending
@@ -614,11 +614,11 @@ function shoutbox_display_posts($show_amount, $pager = FALSE) {
   $result = $query->execute();
 
   foreach ($result as $shout) {
-    if (($shout->moderate == 0) || (_shoutbox_user_access('moderate shoutbox')) 
+    if (($shout->moderate == 0) || (_shoutbox_user_access('moderate shoutbox'))
         || (_shoutbox_is_user_owned($shout))) {
       // Filter shout
       _shoutbox_sanitize_shout($shout);
-      
+
       // Add edit/delete links depending on user's permissions.
       $shoutlinks = _shoutbox_get_links($shout);
 
@@ -699,7 +699,7 @@ function _shoutbox_user_access($permission, $shout = NULL) {
   $access_granted = user_access($permission);
 
   //  If user_access says no, it's definitely no.
-  if (($access_granted)   && 
+  if (($access_granted)   &&
       (($permission == 'edit own shouts') || ($permission == 'delete own shouts'))) {
     if (_shoutbox_is_user_owned($shout)) {
       //  A registered user's own post.
@@ -762,7 +762,7 @@ function _shoutbox_filter_form() {
   /* } */
 
   /* return $form; */
-  
+
 }
 
 /**
diff --git a/shoutbox_rules/shoutbox_rules.module b/shoutbox_rules/shoutbox_rules.module
index 6b73ae9..5bc97db 100644
--- a/shoutbox_rules/shoutbox_rules.module
+++ b/shoutbox_rules/shoutbox_rules.module
@@ -46,7 +46,7 @@ function shoutbox_rules_event_info() {
     ),
     'shoutbox_publish' => $defaults + array(
       'label' => t('After a shout has been published'),
-      'variabless' => array(
+      'variables' => array(
         'user' => array(
           'type' => 'user',
           'label' => t('The user who published the shout.'),
@@ -102,9 +102,9 @@ function shoutbox_rules_data_info() {
 }
 
 // TODO: Reintroduce shoutbox action
-// when version 2.0 is created and shouts 
+// when version 2.0 is created and shouts
 // become entities.
-// 
+//
 
 /**
  * Implements hook_shoutbox().().
