diff --git a/popups.module b/popups.module
index 26c6bc0..a3211b3 100644
--- a/popups.module
+++ b/popups.module
@@ -213,7 +213,7 @@ function popups_get_css() {
         $theme_styles[] = basename($theme_style);
       }
     }
-    foreach($css[$media][$type] as $file => $preprocess) {
+    foreach ($css[$media][$type] as $file => $preprocess) {
       // If the theme supplies its own style using the name of the module style, skip its inclusion.
       // This includes any RTL styles associated with its main LTR counterpart.
       if ($type == 'module' && in_array(str_replace('-rtl.css', '.css', basename($file)), $theme_styles)) {
@@ -230,7 +230,7 @@ function popups_get_css() {
         }
         // If a CSS file is not to be preprocessed and it's a theme CSS file, it needs to *always* appear at the *bottom*,
         // regardless of whether preprocessing is on or off.
-        else if ($type == 'theme') {
+        elseif ($type == 'theme') {
           $popup_css['theme'][$file] = '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $file . $query_string .'" />'."\n";
         }
         else {
@@ -299,7 +299,7 @@ function popups_add_popups($rules=NULL) {
         $settings['popups']['links'][$options] = array();
       }
     }
-    if($added) {
+    if ($added) {
       drupal_add_js( $settings, 'setting' );
     }
   }
@@ -308,7 +308,7 @@ function popups_add_popups($rules=NULL) {
     global $custom_theme;
     $theme = $custom_theme;
     if (!$theme) {
-      $theme = variable_get('theme_default','none');
+      $theme = variable_get('theme_default', 'none');
     }
 
     drupal_add_js('misc/jquery.form.js');
diff --git a/popups_test.module b/popups_test.module
index c30e603..82deac7 100644
--- a/popups_test.module
+++ b/popups_test.module
@@ -94,7 +94,7 @@ function _popups_test_popups() {
                array( 'attributes' => array('id' => 'reload-target'),
                ));
   $output .= "<span id='response2'> (Auto Fade checkbox is: " . (variable_get('popups_autoclose_final_message', 1) ? 'on' : 'off') . ')</span>';
-  popups_add_popups(array('#reload-target'=>array('targetSelectors'=>array('#response2'))));
+  popups_add_popups(array('#reload-target' => array('targetSelectors' => array('#response2'))));
 
   $output .= '<li>'. l("Change Settings and ajax update multiple targets with data from other page (tricky!).", 'admin/settings/popups',
              array( 'attributes' => array(
@@ -109,10 +109,10 @@ function _popups_test_popups() {
 
   $output .= '<li>'. l("Pop up defined by popups_add_popups rule.", 'popups/test/response',
                      array('attributes' => array('id' => 'rule-test')));
-  popups_add_popups(array('#rule-test'=>array('width'=>'300px')));
+  popups_add_popups(array('#rule-test' => array('width' => '300px')));
   $output .= '<li>'. l('Ajax update just Page Title (only works if you theme uses id="page-title")', 'popups/test/namechange',
                      array('attributes' => array('id' => 'title-test')));
-  popups_add_popups(array('#title-test'=>array('titleSelectors'=>array('#page-title'), 'noUpdate'=> TRUE, 'forceReturn'=>'popups/test/namechange')));
+  popups_add_popups(array('#title-test' => array('titleSelectors' => array('#page-title'), 'noUpdate' => TRUE, 'forceReturn' => 'popups/test/namechange')));
 
   global $user;
   $output .= "<li>You are user number $user->uid</li>";
@@ -129,7 +129,7 @@ function _popups_test_popups() {
                      array('attributes' => array('id' => 'logout')));
   }
   // Need to have the rule outside the else, or it won't get loaded on ajax reload.
-  popups_add_popups(array('#logout'=>array('noUpdate'=>TRUE, 'reloadOnError'=>TRUE)));
+  popups_add_popups(array('#logout' => array('noUpdate' => TRUE, 'reloadOnError' => TRUE)));
 
   $output .= '<li>'. l("Add Poll (test inline)", 'node/add/poll',
                        array('attributes' => array('class' => 'popups-form')));
@@ -164,7 +164,7 @@ function _popups_test_popups_old() {
                array( 'attributes' => array('id' => 'reload-target'),
                ));
   $output .= "<span id='response2'> (Auto Fade checkbox is: " . (variable_get('popups_popup_final_message', 1) ? 'on' : 'off') . ')</span>';
-  popups_add_popups(array('#reload-target'=>array('targetSelectors'=>array('#response2'))));
+  popups_add_popups(array('#reload-target' => array('targetSelectors' => array('#response2'))));
 
   $output .= '<li>'. l("Change Settings and ajax update multiple targets with data from other page (tricky!).", 'admin/settings/popups',
              array( 'attributes' => array(
@@ -179,10 +179,10 @@ function _popups_test_popups_old() {
 
   $output .= '<li>'. l("Pop up defined by popups_add_popups rule.", 'popups/test/response',
                      array('attributes' => array('id' => 'rule-test')));
-  popups_add_popups(array('#rule-test'=>array('width'=>'300px')));
+  popups_add_popups(array('#rule-test' => array('width' => '300px')));
   $output .= '<li>'. l('Ajax update just Page Title (only works if you theme uses id="page-title")', 'popups/test/namechange',
                      array('attributes' => array('id' => 'title-test')));
-  popups_add_popups(array('#title-test'=>array('titleSelectors'=>array('#page-title'), 'noUpdate'=> TRUE, 'forceReturn'=>'popups/test/namechange')));
+  popups_add_popups(array('#title-test' => array('titleSelectors' => array('#page-title'), 'noUpdate' => TRUE, 'forceReturn' => 'popups/test/namechange')));
 
   global $user;
   $output .= "<li>You are user number $user->uid</li>";
@@ -199,7 +199,7 @@ function _popups_test_popups_old() {
                      array('attributes' => array('id' => 'logout')));
   }
   // Need to have the rule outside the else, or it won't get loaded on ajax reload.
-  popups_add_popups(array('#logout'=>array('noUpdate'=>TRUE, 'reloadOnError'=>TRUE)));
+  popups_add_popups(array('#logout' => array('noUpdate' => TRUE, 'reloadOnError' => TRUE)));
 
   $output .= '<li>'. l("Add Poll (test inline)", 'node/add/poll',
                        array('attributes' => array('class' => 'popups-form')));
