diff --git a/plugins/customindex/views/default/customindex/content.php b/plugins/customindex/views/default/customindex/content.php
index 86b8c3d10daf53fbee454a497c667709f7234e8a..165f391e6f0f71a6f17d5ae33b9d9e23875522cf 100644
--- a/plugins/customindex/views/default/customindex/content.php
+++ b/plugins/customindex/views/default/customindex/content.php
@@ -151,61 +151,60 @@
 	<h2 id="indexheading">The Latest Planet Red Happenings</h2>
 	<div class="col left">
 		<h3 class="sec_main">Featured Groups</h3>
-				<?php 
-				$options = array('metadata_names'=>'featured_group', 'metadata_values'=>'yes', 'limit'=>7);
-				$groups = elgg_get_entities_from_metadata($options);	
-                if($groups){
-                    foreach($groups as $group){
-                          echo "<div class=\"index_item\">";
-                          echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $group, 'size' => 'small')) . "</div>"; 
-                          echo "<div class=\"index_item_name\"><a href=\"" . $group->getUrl() . "\">" . $group->name . "</a><br /><span class=\"membercount\">" . get_group_members($group->guid, 10, 0, 0, true) . " members</span></div>";
-                          echo "</div>";
-                    }
-                }
-        		?>
+		<?php
+		$options = array('metadata_names'=>'featured_group', 'metadata_values'=>'yes', 'limit'=>7);
+		$groups = elgg_get_entities_from_metadata($options);
+		if ($groups) {
+			foreach ($groups as $group) {
+				echo "<div class=\"index_item\">";
+				echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $group, 'size' => 'small')) . "</div>"; 
+				echo "<div class=\"index_item_name\"><a href=\"" . $group->getUrl() . "\">" . $group->name . "</a><br /><span class=\"membercount\">" . get_group_members($group->guid, 10, 0, 0, true) . " members</span></div>";
+				echo "</div>";
+			}
+		}
+		?>
 	</div>
 	<div class="two_col middle">
 		<h3 class="sec_main">Latest Wire Posts</h3>
-				<?php
-				mysql_connect($CONFIG->dbhost, $CONFIG->dbuser, $CONFIG->dbpass) or die(mysql_error());
-				mysql_select_db($CONFIG->dbname) or die(mysql_error());
+		<?php
+		mysql_connect($CONFIG->dbhost, $CONFIG->dbuser, $CONFIG->dbpass) or die(mysql_error());
+		mysql_select_db($CONFIG->dbname) or die(mysql_error());
+		
+		//get the most recent wire posts
+		$result = mysql_query("SELECT * from {$CONFIG->dbprefix}entities where type='object' and subtype=4 and site_guid = 1 order by time_created desc limit 0, 5") or die(mysql_error());
+		while ($row = mysql_fetch_array( $result )) {
+			//get the actual post
+			$query2 = "SELECT * from {$CONFIG->dbprefix}objects_entity where guid=". $row['guid'] ."";
+			$result2 = mysql_query($query2);
+			$row2 = mysql_fetch_array( $result2 );
+			
+			//get the owner of the post
+			$query3 = "SELECT * from {$CONFIG->dbprefix}users_entity where guid=". $row['owner_guid'] ."";
+			$result3 = mysql_query($query3);
+			$row3 = mysql_fetch_array( $result3 );
+			
+			if (!filtrado($row3['name'] . '' . $row2['description'])){
+				echo '<img style="clear:left;float:left" alt="Profile Icon" src="mod/profile/icondirect.php?username=' . $row3["username"] . '&amp;size=small" />';
+				echo '<div class="index_item" style="overflow:hidden;float:left;max-width:400px;';
+					//if (isloggedin()) {echo('400px;');}else{echo('162px;');}
+				echo 'border:1px solid #dbdbdb; margin-left:14px; min-height:45px; -moz-border-radius:3px;">';
+				echo '	<span style="background:url(mod/customindex/commentbubblepoint.png); width:14px; height:34px; z-index:2; position:absolute; left:291px;'; 
+					//if (isloggedin()) {echo('291px;');}else{echo('51px;');}
+				echo '"></span>';
+				echo '	<div style="padding:10px;">';
 				
-				//get the most recent wire posts
-				$result = mysql_query("SELECT * from elggentities where type='object' and subtype=4 and site_guid = 1 order by time_created desc limit 0, 5") or die(mysql_error());
-				while($row = mysql_fetch_array( $result ))
-				{
-					//get the actual post
-					$query2 = "SELECT * from elggobjects_entity where guid=". $row['guid'] ."";
-					$result2 = mysql_query($query2);
-					$row2 = mysql_fetch_array( $result2 );
-					
-					//get the owner of the post
-					$query3 = "SELECT * from elggusers_entity where guid=". $row['owner_guid'] ."";
-					$result3 = mysql_query($query3);
-					$row3 = mysql_fetch_array( $result3 );
-					
-					if (!filtrado($row3['name'] . '' . $row2['description'])){
-						echo '<img style="clear:left;float:left" alt="Profile Icon" src="mod/profile/icondirect.php?username=' . $row3["username"] . '&amp;size=small" />';
-						echo '<div class="index_item" style="overflow:hidden;float:left;max-width:400px;';
-							//if (isloggedin()) {echo('400px;');}else{echo('162px;');}
-						echo 'border:1px solid #dbdbdb; margin-left:14px; min-height:45px; -moz-border-radius:3px;">';
-						echo '	<span style="background:url(mod/customindex/commentbubblepoint.png); width:14px; height:34px; z-index:2; position:absolute; left:291px;'; 
-							//if (isloggedin()) {echo('291px;');}else{echo('51px;');}
-						echo '"></span>';
-						echo '	<div style="padding:10px;">';
-						
-						;
-						
-						echo '<p style="margin:0;"><a href="pg/profile/' . $row3['username'] . '">' . $row3['name'] . '</a>: ' . preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '<a href="$1">$1</a>', $row2['description']) . '</p>';
-						//echo '<p style="margin:0;"><a href="pg/profile/' . $row3['username'] . '">' . $row3['name'] . '</a>: ' . $row2['description'] . '</p>';
-						echo '<p style="margin:2px 0 3px 0; font-size:10px; clear:both;float:right"><em>' . friendly_time($row['time_updated']) . '</em></p>';
-						echo '	</div>';
-						echo '</div><div class="clear"></div>';
-					}
-					
-				}
+				;
 				
-				?>
+				echo '<p style="margin:0;"><a href="pg/profile/' . $row3['username'] . '">' . $row3['name'] . '</a>: ' . preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '<a href="$1">$1</a>', $row2['description']) . '</p>';
+				//echo '<p style="margin:0;"><a href="pg/profile/' . $row3['username'] . '">' . $row3['name'] . '</a>: ' . $row2['description'] . '</p>';
+				echo '<p style="margin:2px 0 3px 0; font-size:10px; clear:both;float:right"><em>' . friendly_time($row['time_updated']) . '</em></p>';
+				echo '	</div>';
+				echo '</div><div class="clear"></div>';
+			}
+			
+		}
+		
+		?>
 	</div>
 	<div class="col right">
 		<h3 class="sec_main">Featured Huskers</h3>
@@ -217,8 +216,7 @@
 		$sReplace[0] = '-';
 		$sReplace[1] = '';
 
-		while($row = mysql_fetch_array( $result ))
-				{
+		while ($row = mysql_fetch_array( $result )) {
 		?>
 		<div class="zenbox">
 		<div style="float:left;margin:0px 5px 5px 0px;">
@@ -234,9 +232,7 @@
 			<a href="featured/husker/<?php echo preg_replace( $sPattern, $sReplace, $row["firstName"]."_".$row['lastName']);?>/">Continue Reading...</a>
 		</div>
 		</div>
-		<?php 
-				}
-		?>
+		<?php } ?>
 		<a href="featured/" title="See all the featured Huskers">See all the featured Huskers...</a>
 	</div>
 </div>
diff --git a/plugins/unl_theme/views/default/page_elements/header.php b/plugins/unl_theme/views/default/page_elements/header.php
index 0a99a3a8a58d7d485f885ac5c0d2c381b12a1c9d..bf2d476a06a482f8b8ccab6eed10e5d915c67874 100644
--- a/plugins/unl_theme/views/default/page_elements/header.php
+++ b/plugins/unl_theme/views/default/page_elements/header.php
@@ -15,25 +15,25 @@
 
 global $autofeed;
 if (isset($autofeed) && $autofeed == true) {
-    $url = $url2 = full_url();
-    if (substr_count($url,'?')) {
-        $url .= "&view=rss";
-    } else {
-        $url .= "?view=rss";
-    }
-    if (substr_count($url2,'?')) {
-        $url2 .= "&view=odd";
-    } else {
-        $url2 .= "?view=opendd";
-    }
-    $feedref = <<<END
-        
-    <link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />
-    <link rel="alternate" type="application/odd+xml" title="OpenDD" href="{$url2}" />
-        
+	$url = $url2 = full_url();
+	if (substr_count($url,'?')) {
+		$url .= "&view=rss";
+	} else {
+		$url .= "?view=rss";
+	}
+	if (substr_count($url2,'?')) {
+		$url2 .= "&view=odd";
+	} else {
+		$url2 .= "?view=opendd";
+	}
+	$feedref = <<<END
+		
+	<link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />
+	<link rel="alternate" type="application/odd+xml" title="OpenDD" href="{$url2}" />
+		
 END;
 } else {
-    $feedref = "";
+	$feedref = "";
 }
 
 $version = get_version();
@@ -47,55 +47,50 @@ $release = get_version(true);
 <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.form.js"></script>
 <script type="text/javascript" src="<?php echo $vars['url']; ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&amp;js=initialise_elgg&amp;viewtype=<?php echo $vars['view']; ?>"></script>
 
-<?php
-    global $pickerinuse;
-    if (isset($pickerinuse) && $pickerinuse == true) { 
-?>
-    <!-- only needed on pages where we have friends collections and/or the friends picker -->
-    <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.easing.1.3.packed.js"></script>
-    <script type="text/javascript" src="<?php echo $vars['url']; ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&amp;js=friendsPickerv1&amp;viewtype=<?php echo $vars['view']; ?>"></script>
-<?php
-    }
-?>
-    <!-- include the default css file -->
-    <link rel="stylesheet" href="<?php echo $vars['url']; ?>_css/css.css?lastcache=<?php echo $vars['config']->lastcache; ?>&amp;viewtype=<?php echo $vars['view']; ?>" type="text/css" />
-    
-    <?php 
-        echo $feedref;
-        echo elgg_view('metatags',$vars); 
-    ?>
+<?php global $pickerinuse; ?>
+<?php if (isset($pickerinuse) && $pickerinuse == true) : ?>
+	<?php //only needed on pages where we have friends collections and/or the friends picker ?>
+	<script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.easing.1.3.packed.js"></script>
+	<script type="text/javascript" src="<?php echo $vars['url']; ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&amp;js=friendsPickerv1&amp;viewtype=<?php echo $vars['view']; ?>"></script>
+<?php endif; ?>
 
-<?php if (preg_match('/friend/', $vars['title'])) { ?>
-		<script type="text/javascript">
-		WDN.jQuery(document).ready(function(){
-			WDN.jQuery("#content_area_user_title h2").after('<p><a href="<?php echo $CONFIG->url;?>mod/members/">Browse all the Planet Red users</a> to find your Husker friends!</p>');
-		});
-		</script>
-<?php } ?>
+<?php //include the default css file ?>
+<link rel="stylesheet" href="<?php echo $vars['url']; ?>_css/css.css?lastcache=<?php echo $vars['config']->lastcache; ?>&amp;viewtype=<?php echo $vars['view']; ?>" type="text/css" />
 
+<?php 
+	echo $feedref;
+	echo elgg_view('metatags',$vars); 
+?>
+
+<?php if (preg_match('/friend/', $vars['title'])) : ?>
+	<script type="text/javascript">
+	WDN.jQuery(document).ready(function(){
+		WDN.jQuery("#content_area_user_title h2").after('<p><a href="<?php echo $CONFIG->url;?>mod/members/">Browse all the Planet Red users</a> to find your Husker friends!</p>');
+	});
+	</script>
+<?php endif; ?>
 
-<?php if (!isloggedin()) { //The styles for the information box to be displayed if a non-authenticated user has arrived. ?>
+<?php if (!isloggedin()) : //The styles for the information box to be displayed if a non-authenticated user has arrived. ?>
 	<script type="text/javascript" src="<?php echo $vars['url'] .'mod/unl_theme/scripts/JS/actionNotice.js'?>"></script>
-<?php } else {?>
-<script type"text/javascript">
-//Use the correct logout URL for IDM
-WDN.idm.setLogoutURL('<?php echo $vars['url']; ?>action/logout');
-</script>
+<?php else : ?>
+	<script type="text/javascript">
+	WDN.idm.setLogoutURL('<?php echo $vars['url']; ?>action/logout');
+	</script>
+<?php endif; ?>
 
-<?php }
-	if ($vars['title'] == "Edit profile") { //CSS and JS for only the profile edit form page.	    
-        require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/unl_theme/scripts/JS/enhanceProfileForm.php');
-?>
-    	<style type="text/css">
-    	#profileEditor input[name$="city"] {
-    		text-transform: capitalize;
-    	}
-    	input[name=form_data_profile_city], select[name=form_data_profile_state], select[name=form_data_profile_country],
-        input[name=form_data_profile_homecity], select[name=form_data_profile_homestate], select[name=form_data_profile_homecountry],
-    	select[name=form_data_profile_dob_month], select[name=form_data_profile_dob_day], select[name=form_data_profile_dob_year],
-    	select[name=form_data_profile_attended_from], select[name=form_data_profile_attended_to] {
-    		width: auto !important;
-    		margin-right: 4px;
-    	}
-    	</style>
-<?php } ?>
+<?php if ($vars['title'] == "Edit profile") : //CSS and JS for only the profile edit form page ?>
+	require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/unl_theme/scripts/JS/enhanceProfileForm.php');
+	
+	<style type="text/css">
+	#profileEditor input[name$="city"] {
+		text-transform: capitalize;
+	}
+	input[name=form_data_profile_city], select[name=form_data_profile_state], select[name=form_data_profile_country],
+	input[name=form_data_profile_homecity], select[name=form_data_profile_homestate], select[name=form_data_profile_homecountry],
+	select[name=form_data_profile_dob_month], select[name=form_data_profile_dob_day], select[name=form_data_profile_dob_year],
+	select[name=form_data_profile_attended_from], select[name=form_data_profile_attended_to] {
+		width: auto !important;
+		margin-right: 4px;
+	}
+	</style>
+<?php endif; ?>
\ No newline at end of file
diff --git a/plugins/unl_theme/views/default/page_elements/unl_nav.php b/plugins/unl_theme/views/default/page_elements/unl_nav.php
index 31f10cd1bac4fbed154cc3c9f5035404ba4551be..c9462d8ce6692ecc7f1d2294694b2b018b8b6a5c 100644
--- a/plugins/unl_theme/views/default/page_elements/unl_nav.php
+++ b/plugins/unl_theme/views/default/page_elements/unl_nav.php
@@ -1,135 +1,103 @@
 <?php
+/**
+ * Elgg navigtion for UNL template college nav
+ * The standard elgg top toolbar
+ * 
+ */
 
-	/**
-	 * Elgg navigtion for UNL template college nav
-	 * The standard elgg top toolbar
-	 * 
-	 */
-?>
-<?php 
 	//set the current page tab
-	function setSelectedTab($linkPath) 
+	function setSelectedTab($linkPath)
 	{
-		if(stristr($_SERVER['REQUEST_URI'], $linkPath)){
+		if (stristr($_SERVER['REQUEST_URI'], $linkPath)) {
 			return ' class="selected"';
 		}
 	}
 ?>
-<?php
-     if (!isloggedin()) {
-?>
-<div class="wdn_notice" id="officialMessage">
-	<div class="message">
-		<div class="message_sale">
-			<h4>Planet Red is <strong>your</strong> UNL Social Network.</h4>
-			<h6>Put Yourself on the Map</h6>
-		</div>
-		<div class="message_action">
-			<a href="<?php echo $vars['url']; ?>account/register.php" title="Register to join Planet Red"><span>Join now</span></a>
+
+<?php if (!isloggedin()) : ?>
+	<div class="wdn_notice" id="officialMessage">
+		<div class="message">
+			<div class="message_sale">
+				<h4>Planet Red is <strong>your</strong> UNL Social Network.</h4>
+				<h6>Put Yourself on the Map</h6>
+			</div>
+			<div class="message_action">
+				<a href="<?php echo $vars['url']; ?>account/register.php" title="Register to join Planet Red"><span>Join now</span></a>
+			</div>
+			<div class="message_action" style="margin-left:28px;font-size:1.3em;width:97px;">
+				 or <a href="<?php echo $vars['url']; ?>pg/login" id="loginLink"><strong>Login</strong></a>
+			 </div>
 		</div>
-		<div class="message_action" style="margin-left:28px;font-size:1.3em;width:97px;">
-		 	or <a href="<?php echo $vars['url']; ?>pg/login" id="loginLink"><strong>Login</strong></a>
-		 </div>
 	</div>
-</div>
-
-
-<?php //This is the login details hidden with CSS and displayed in the colorbox. With CAS enabled this comes from cas_auth_unl views folder?>
-<div class="hidden">
-	<?php echo elgg_view('account/forms/login'); ?>
-</div>
-
-<?php }?>
-<?php
-     if (isloggedin()) {
-?>
-<ul class="wdn_tabs disableSwitching">
+	
+	
+	<?php //This is the login details hidden with CSS and displayed in the colorbox. With CAS enabled this comes from cas_auth_unl views folder?>
+	<div class="hidden">
+		<?php echo elgg_view('account/forms/login'); ?>
+	</div>
+<?php else : ?>
+	<ul class="wdn_tabs disableSwitching">
 	<li>
-        <a href="<?php echo $_SESSION['user']->getURL(); ?>" ><span style="background:url('<?php echo $_SESSION['user']->getIcon('topbar'); ?>') no-repeat; padding-left:20px;">Profile</span></a>
-    </li>
-    <li <?php echo setSelectedTab('pg/dashboard/');?>>
-        <a href="<?php echo $vars['url']; ?>pg/dashboard/"><span><?php echo elgg_echo('dashboard'); ?></span></a>
+		<a href="<?php echo $_SESSION['user']->getURL(); ?>" ><span style="background:url('<?php echo $_SESSION['user']->getIcon('topbar'); ?>') no-repeat; padding-left:20px;">Profile</span></a>
 	</li>
-<?php
-
-        // recreate tools menu compatible with UNL template
-	 
-		$menu = get_register('menu');
-		
+	<li <?php echo setSelectedTab('pg/dashboard/');?>>
+		<a href="<?php echo $vars['url']; ?>pg/dashboard/"><span><?php echo elgg_echo('dashboard'); ?></span></a>
+	</li>
+	<?php
+	
+	// recreate tools menu compatible with UNL template
+	
+	$menu = get_register('menu');
+	
+	if (is_array($menu) && sizeof($menu) > 0) {
+		$alphamenu = array();
+		foreach($menu as $item) {
+			$alphamenu[$item->name] = $item;
+		}
+		ksort($alphamenu);
 		
-
-		if (is_array($menu) && sizeof($menu) > 0) {
-			$alphamenu = array();
-			foreach($menu as $item) {
-				$alphamenu[$item->name] = $item;
-			}
-			ksort($alphamenu);
-			
-			foreach($alphamenu as $item) {
-				$requestURI = explode($vars['url'], $item->value);
-				$selectedTab = setSelectedTab($requestURI[1]);
-				if ($item->name != "Members") {
-					echo "<li" . setSelectedTab($requestURI[1]) . "><a href=\"{$item->value}\"><span>" . $item->name . "";
-					if ($item->name == "Friends") {
-						$user = get_loggedin_user();
-			
-						$options = array('relationship'=>'friendrequest', 'relationship_guid'=>$user->guid, 'inverse_relationship'=>true, 'count'=>true);
-						$count = elgg_get_entities_from_relationship($options);
-			
-						if(!empty($count)){
-							echo " <sup>" . $count . "</sup>";
-						}
+		foreach($alphamenu as $item) {
+			$requestURI = explode($vars['url'], $item->value);
+			$selectedTab = setSelectedTab($requestURI[1]);
+			if ($item->name != "Members") {
+				echo "<li" . setSelectedTab($requestURI[1]) . "><a href=\"{$item->value}\"><span>" . $item->name . "";
+				if ($item->name == "Friends") {
+					$user = get_loggedin_user();
+					
+					$options = array('relationship'=>'friendrequest', 'relationship_guid'=>$user->guid, 'inverse_relationship'=>true, 'count'=>true);
+					$count = elgg_get_entities_from_relationship($options);
+					
+					if(!empty($count)){
+						echo " <sup>" . $count . "</sup>";
 					}
-					echo"</span></a></li>";
 				}
+				echo"</span></a></li>";
 			}
 		}
-?>
-
-        	
-       
-		<?php
-		//allow people to extend this top menu
-		echo elgg_view('elgg_topbar/extend', $vars);
-		?>
-		
-		<li <?php echo setSelectedTab('pg/settings/');?>><a href="<?php echo $vars['url']; ?>pg/settings/" class="usersettings"><span><?php echo elgg_echo('settings'); ?></span></a></li>
-		
-		<?php
-		
-			// The administration link is for admin or site admin users only
-			if ($vars['user']->isAdmin()) { 
-		
-		?>
-		
-			<li <?php echo setSelectedTab('pg/admin/');?>><a href="<?php echo $vars['url']; ?>pg/admin/" class="usersettings"><span><?php echo elgg_echo("admin"); ?></span></a></li>
-		
-		<?php
-		
-				}
-		
-		?>
-
-
-
-
-		<li <?php echo setSelectedTab('action/logout');?>><a href="<?php echo $vars['url']; ?>action/logout"><span><?php echo elgg_echo('logout'); ?></span></a></li>
-
-
-</ul>
-<div id="elgg_topbar_container_search">
-<form id="searchform" action="<?php echo $vars['url']; ?>search/" method="get">
-<fieldset>
-<label for="search_input">Search Planet Red</label>
-	<input type="text" id="search_input" name="tag" class="search_input" />
-	<input type="submit" value="Go" class="search_submit_button" />
-</fieldset>
-</form>
-</div>
-
-<?php
-    }
-?>
+	}
+	?>
+	
+	<?php echo elgg_view('elgg_topbar/extend', $vars); //allow people to extend this top menu ?>
+	
+	<li <?php echo setSelectedTab('pg/settings/');?>><a href="<?php echo $vars['url']; ?>pg/settings/" class="usersettings"><span><?php echo elgg_echo('settings'); ?></span></a></li>
+	
+	<?php if ($vars['user']->isAdmin()) { // The administration link is for admin or site admin users only ?>
+		<li <?php echo setSelectedTab('pg/admin/');?>><a href="<?php echo $vars['url']; ?>pg/admin/" class="usersettings"><span><?php echo elgg_echo("admin"); ?></span></a></li>
+	<?php } ?>
+	
+	<li <?php echo setSelectedTab('action/logout');?>><a href="<?php echo $vars['url']; ?>action/logout"><span><?php echo elgg_echo('logout'); ?></span></a></li>
+	
+	</ul>
+	<div id="elgg_topbar_container_search">
+	<form id="searchform" action="<?php echo $vars['url']; ?>search/" method="get">
+	<fieldset>
+	<label for="search_input">Search Planet Red</label>
+		<input type="text" id="search_input" name="tag" class="search_input" />
+		<input type="submit" value="Go" class="search_submit_button" />
+	</fieldset>
+	</form>
+	</div>
+<?php endif; ?>