diff --git a/templates/hostnames.php b/templates/hostnames.php
new file mode 100644
index 0000000000000000000000000000000000000000..0c43d8a967d2339106c9f52bfe0e4b3a3e925cfd
--- /dev/null
+++ b/templates/hostnames.php
@@ -0,0 +1,11 @@
+<?php
+$this->includeAtTemplateBase('includes/header.php');
+$this->includeAtTemplateBase('includes/attributes.php');
+
+echo "<h2>" . $this->t('{core:frontpage:link_diagnostics}') . "</h2>";
+
+$attributes = $this->data['attributes'];
+
+echo(present_attributes($this, $attributes, ''));
+
+$this->includeAtTemplateBase('includes/footer.php');
diff --git a/templates/includes/attributes.php b/templates/includes/attributes.php
new file mode 100644
index 0000000000000000000000000000000000000000..2f960c46c0bd2209264b9d1934e2750eeaaf44f5
--- /dev/null
+++ b/templates/includes/attributes.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Functions used to present a table of attributes and their values.
+ */
+
+function present_list($attr) {
+	if (is_array($attr) && count($attr) > 1) {
+		$str = '<ul>';
+		foreach ($attr as $value) {
+			$str .= '<li>' . htmlspecialchars($attr) . '</li>';
+		}
+		$str .= '</ul>';
+		return $str;
+	} else {
+		return htmlspecialchars($attr[0]);
+	}
+}
+
+function present_assoc($attr) {
+	if (is_array($attr)) {
+		
+		$str = '<dl>';
+		foreach ($attr AS $key => $value) {
+			$str .= "\n" . '<dt>' . htmlspecialchars($key) . '</dt><dd>' . present_list($value) . '</dd>';
+		}
+		$str .= '</dl>';
+		return $str;
+	} else {
+		return htmlspecialchars($attr);
+	}
+}
+
+function present_attributes($t, $attributes, $nameParent) {
+	$alternate = array('odd', 'even'); $i = 0;
+	
+	$parentStr = (strlen($nameParent) > 0)? strtolower($nameParent) . '_': '';
+	$str = (strlen($nameParent) > 0)? '<table class="attributes" summary="attribute overview">':
+		'<table id="table_with_attributes"  class="attributes" summary="attribute overview">';
+
+	foreach ($attributes as $name => $value) {
+	
+		$nameraw = $name;
+		$name = $t->getAttributeTranslation($parentStr . $nameraw);
+
+		if (preg_match('/^child_/', $nameraw)) {
+			$parentName = preg_replace('/^child_/', '', $nameraw);
+			foreach($value AS $child) {
+				$str .= '<tr class="odd"><td colspan="2" style="padding: 2em">' . present_attributes($t, $child, $parentName) . '</td></tr>';
+			}
+		} else {	
+			if (sizeof($value) > 1) {
+				$str .= '<tr class="' . $alternate[($i++ % 2)] . '"><td class="attrname">';
+
+				if ($nameraw !== $name)
+					$str .= htmlspecialchars($name).'<br/>';
+				$str .= '<tt>'.htmlspecialchars($nameraw).'</tt>';
+				$str .= '</td><td class="attrvalue"><ul>';
+				foreach ($value AS $listitem) {
+					if ($nameraw === 'jpegPhoto') {
+						$str .= '<li><img src="data:image/jpeg;base64,' . htmlspecialchars($listitem) . '" /></li>';
+					} else {
+						$str .= '<li>' . present_assoc($listitem) . '</li>';
+					}
+				}
+				$str .= '</ul></td></tr>';
+			} elseif(isset($value[0])) {
+				$str .= '<tr class="' . $alternate[($i++ % 2)] . '"><td class="attrname">';
+				if ($nameraw !== $name)
+					$str .= htmlspecialchars($name).'<br/>';
+				$str .= '<tt>'.htmlspecialchars($nameraw).'</tt>';
+				$str .= '</td>';
+				if ($nameraw === 'jpegPhoto') {
+					$str .= '<td class="attrvalue"><img src="data:image/jpeg;base64,' . htmlspecialchars($value[0]) . '" /></td></tr>';
+				} else {
+					$str .= '<td class="attrvalue">' . htmlspecialchars($value[0]) . '</td></tr>';
+				}
+			}
+		}
+		$str .= "\n";
+	}
+	$str .= '</table>';
+	return $str;
+}
diff --git a/templates/status.php b/templates/status.php
index e4046d651ef64fff45c7af26cf2de9d5eaacb79d..f1040aac6b821ab38866cbeca4fe9b5fcccfeac0 100644
--- a/templates/status.php
+++ b/templates/status.php
@@ -6,6 +6,7 @@ if(array_key_exists('header', $this->data)) {
 }
 
 $this->includeAtTemplateBase('includes/header.php');
+$this->includeAtTemplateBase('includes/attributes.php');
 ?>
 
 <h2><?php if (isset($this->data['header'])) { echo($this->data['header']); } else { echo($this->t('{status:some_error_occurred}')); } ?></h2>
@@ -25,90 +26,23 @@ if(isset($this->data['sessionsize'])) {
 <h2><?php echo($this->t('{status:attributes_header}')); ?></h2>
 
 <?php
-// consent style listing start
-$attributes = $this->data['attributes'];
-
-function present_list($attr) {
-	if (is_array($attr) && count($attr) > 1) {
-		$str = '<ul>';
-		foreach ($attr as $value) {
-			$str .= '<li>' . htmlspecialchars($attr) . '</li>';
-		}
-		$str .= '</ul>';
-		return $str;
-	} else {
-		return htmlspecialchars($attr[0]);
-	}
-}
-
-function present_assoc($attr) {
-	if (is_array($attr)) {
-		
-		$str = '<dl>';
-		foreach ($attr AS $key => $value) {
-			$str .= "\n" . '<dt>' . htmlspecialchars($key) . '</dt><dd>' . present_list($value) . '</dd>';
-		}
-		$str .= '</dl>';
-		return $str;
-	} else {
-		return htmlspecialchars($attr);
-	}
-}
-
-function present_attributes($t, $attributes, $nameParent) {
-	$alternate = array('odd', 'even'); $i = 0;
-	
-	$parentStr = (strlen($nameParent) > 0)? strtolower($nameParent) . '_': '';
-	$str = (strlen($nameParent) > 0)? '<table class="attributes" summary="attribute overview">':
-		'<table id="table_with_attributes"  class="attributes" summary="attribute overview">';
-
-	foreach ($attributes as $name => $value) {
-	
-		$nameraw = $name;
-		$name = $t->getAttributeTranslation($parentStr . $nameraw);
 
-		if (preg_match('/^child_/', $nameraw)) {
-			$parentName = preg_replace('/^child_/', '', $nameraw);
-			foreach($value AS $child) {
-				$str .= '<tr class="odd"><td colspan="2" style="padding: 2em">' . present_attributes($t, $child, $parentName) . '</td></tr>';
-			}
-		} else {	
-			if (sizeof($value) > 1) {
-				$str .= '<tr class="' . $alternate[($i++ % 2)] . '"><td class="attrname">';
+$attributes = $this->data['attributes'];
+echo(present_attributes($this, $attributes, ''));
 
-				if ($nameraw !== $name)
-					$str .= htmlspecialchars($name).'<br/>';
-				$str .= '<tt>'.htmlspecialchars($nameraw).'</tt>';
-				$str .= '</td><td class="attrvalue"><ul>';
-				foreach ($value AS $listitem) {
-					if ($nameraw === 'jpegPhoto') {
-						$str .= '<li><img src="data:image/jpeg;base64,' . htmlspecialchars($listitem) . '" /></li>';
-					} else {
-						$str .= '<li>' . present_assoc($listitem) . '</li>';
-					}
-				}
-				$str .= '</ul></td></tr>';
-			} elseif(isset($value[0])) {
-				$str .= '<tr class="' . $alternate[($i++ % 2)] . '"><td class="attrname">';
-				if ($nameraw !== $name)
-					$str .= htmlspecialchars($name).'<br/>';
-				$str .= '<tt>'.htmlspecialchars($nameraw).'</tt>';
-				$str .= '</td>';
-				if ($nameraw === 'jpegPhoto') {
-					$str .= '<td class="attrvalue"><img src="data:image/jpeg;base64,' . htmlspecialchars($value[0]) . '" /></td></tr>';
-				} else {
-					$str .= '<td class="attrvalue">' . htmlspecialchars($value[0]) . '</td></tr>';
-				}
-			}
-		}
-		$str .= "\n";
-	}
-	$str .= '</table>';
-	return $str;
+$nameid = $this->data['nameid'];
+if ( $nameid !== FALSE ) {
+    echo "<h2>" .$this->t('{status:subject_header}') . "</h2>";
+    if ( !isset($nameid['Value']) ) {
+        $list = array("NameID" => array($this->t('{status:subject_notset}')));
+        echo "<p>NameID: <span class=\"notset\">" . $this->t('{status:subject_notset}') . "</span></p>";
+    } else {
+        $list = array(
+            "NameId" => array($nameid['Value']),
+            $this->t('{status:subject_format}') => array($nameid['Format']) );
+    }
+    echo(present_attributes($this, $list, ''));
 }
-	
-echo(present_attributes($this, $attributes, ''));
-// consent style listing end
 
 if (isset($this->data['logout'])) {
 	echo('<h2>' . $this->t('{status:logout}') . '</h2>');
diff --git a/www/admin/hostnames.php b/www/admin/hostnames.php
index 87e5ca4220111d03b57e1c1bc983142d32ad6d70..0bbf599f353a026b53340b9ba344fd3b33f5dd80 100644
--- a/www/admin/hostnames.php
+++ b/www/admin/hostnames.php
@@ -9,13 +9,8 @@ $session = SimpleSAML_Session::getInstance();
 /* Check if valid local session exists.. */
 SimpleSAML_Utilities::requireAdmin();
 
-
-
-
-
 $attributes = array();
 
-
 $attributes['HTTP_HOST'] = array($_SERVER['HTTP_HOST']);
 $attributes['HTTPS'] = array($_SERVER['HTTPS']);
 $attributes['SERVER_PROTOCOL'] = array($_SERVER['SERVER_PROTOCOL']);
@@ -29,11 +24,7 @@ $attributes['Utilities_getSelfHostWithPath()'] = array(SimpleSAML_Utilities::get
 $attributes['Utilities_getFirstPathElement()'] = array(SimpleSAML_Utilities::getFirstPathElement());
 $attributes['Utilities_selfURL()'] = array(SimpleSAML_Utilities::selfURL());
 
-
-
-
-
-$et = new SimpleSAML_XHTML_Template($config, 'status.php');
+$et = new SimpleSAML_XHTML_Template($config, 'hostnames.php');
 
 $et->data['header'] = '{status:header_diagnostics}';
 $et->data['remaining'] = 'na';
@@ -42,6 +33,3 @@ $et->data['valid'] = 'na';
 $et->data['logout'] = null;
 
 $et->show();
-
-
-?>
\ No newline at end of file