diff --git a/bin/initMDSPdo.php b/bin/initMDSPdo.php
index f3e685e74f2f8cf636b2f085c2e449a2ee74253a..6e5159a63448a31f2aa143463d1b7d3a9de269f5 100755
--- a/bin/initMDSPdo.php
+++ b/bin/initMDSPdo.php
@@ -1,10 +1,10 @@
 #!/usr/bin/env php
 <?php
 
-/* This is the base directory of the SimpleSAMLphp installation. */
+// This is the base directory of the SimpleSAMLphp installation
 $baseDir = dirname(dirname(__FILE__));
 
-/* Add library autoloader and configuration. */
+// Add library autoloader and configuration
 require_once $baseDir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . '_autoload.php';
 require_once $baseDir . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php';
 
diff --git a/bin/memcacheSync.php b/bin/memcacheSync.php
index 01b4e0b3d8c01e5917c356306a5ccd2b9da1aeff..2de186ae5f4fdf74750b6909d848ece87aa338db 100755
--- a/bin/memcacheSync.php
+++ b/bin/memcacheSync.php
@@ -2,7 +2,7 @@
 <?php
 
 
-/* Check that the memcache library is enabled. */
+// Check that the memcache library is enabled
 if(!class_exists('Memcache')) {
 	echo("Error: the memcache library appears to be unavailable.\n");
 	echo("\n");
@@ -17,21 +17,21 @@ if(!class_exists('Memcache')) {
 	exit(1);
 }
 
-/* This is the base directory of the SimpleSAMLphp installation. */
+// This is the base directory of the SimpleSAMLphp installation
 $baseDir = dirname(dirname(__FILE__));
 
-/* Add library autoloader. */
+// Add library autoloader
 require_once($baseDir . '/lib/_autoload.php');
 
-/* Initialize the configuration. */
+// Initialize the configuration
 $configdir = SimpleSAML\Utils\Config::getConfigDir();
 SimpleSAML_Configuration::setConfigDir($configdir);
 
-/* Things we should warn the user about. */
+// Things we should warn the user about
 $warnServerDown = 0;
 $warnBigSlab = 0;
 
-/* We use the stats interface to determine which servers exists. */
+// We use the stats interface to determine which servers exists
 $stats = SimpleSAML_Memcache::getRawStats();
 
 $keys = array();
@@ -105,7 +105,7 @@ function getServerKeys($server) {
 		exit(1);
 	}
 
-	/* Read list of slabs. */
+	// Read list of slabs
 	$slabs = array();
 	while( ($line = fgets($socket)) !== FALSE) {
 		$line = rtrim($line);
@@ -121,7 +121,7 @@ function getServerKeys($server) {
 		}
 	}
 
-	/* Dump keys in slabs. */
+	// Dump keys in slabs
 	$keys = array();
 	foreach($slabs as $slab) {
 
diff --git a/bin/pwgen.php b/bin/pwgen.php
index fddca593dc0aedc21bcd74e5fea9c56c0a53576a..a91df060d923da0630d1c8f5c027832c1978dc13 100755
--- a/bin/pwgen.php
+++ b/bin/pwgen.php
@@ -6,10 +6,10 @@
  */
 
 
-/* This is the base directory of the SimpleSAMLphp installation. */
+// This is the base directory of the SimpleSAMLphp installation
 $baseDir = dirname(dirname(__FILE__));
 
-/* Add library autoloader. */
+// Add library autoloader
 require_once($baseDir . '/lib/_autoload.php');
 
 
diff --git a/bin/translation.php b/bin/translation.php
index d07a0c05a949bd3b762952a4d714f9bccfa3629b..82c60a04b9b2c53afa3461bea54990ceb169766f 100755
--- a/bin/translation.php
+++ b/bin/translation.php
@@ -1,10 +1,10 @@
 #!/usr/bin/env php
 <?php
 
-/* This is the base directory of the SimpleSAMLphp installation. */
+// This is the base directory of the SimpleSAMLphp installation
 $baseDir = dirname(dirname(__FILE__));
 
-/* Add library autoloader. */
+// Add library autoloader
 require_once($baseDir . '/lib/_autoload.php');
 
 if (count($argv) !== 3) {
diff --git a/config-templates/acl.php b/config-templates/acl.php
index ce901cefeddf7c078c29affdaf3d5ee0d71b03bc..7dcca16535c3781a73af7fb67aad132d224257db 100644
--- a/config-templates/acl.php
+++ b/config-templates/acl.php
@@ -9,34 +9,34 @@ $config = array(
 	'adminlist' => array(
 		//array('allow', 'equals', 'mail', 'admin1@example.org'),
 		//array('allow', 'has', 'groups', 'admin'),
-		/* The default action is to deny access. */
+		// The default action is to deny access.
 	),
 
 	'example-simple' => array(
 		array('allow', 'equals', 'mail', 'admin1@example.org'),
 		array('allow', 'equals', 'mail', 'admin2@example.org'),
-		/* The default action is to deny access. */
+		// The default action is to deny access.
 	),
 
 	'example-deny-some' => array(
 		array('deny', 'equals', 'mail', 'eviluser@example.org'),
-		array('allow'), /* Allow everybody else. */
+		array('allow'), // Allow everybody else.
 	),
 
 	'example-maildomain' => array(
 		array('allow', 'equals-preg', 'mail', '/@example\.org$/'),
-		/* The default action is to deny access. */
+		// The default action is to deny access.
 	),
 
 	'example-allow-employees' => array(
 		array('allow', 'has', 'eduPersonAffiliation', 'employee'),
-		/* The default action is to deny access. */
+		// The default action is to deny access.
 	),
 
 	'example-allow-employees-not-students' => array(
 		array('deny', 'has', 'eduPersonAffiliation', 'student'),
 		array('allow', 'has', 'eduPersonAffiliation', 'employee'),
-		/* The default action is to deny access. */
+		// The default action is to deny access.
 	),
 
 	'example-deny-student-except-one' => array(
diff --git a/config-templates/ldap.php b/config-templates/ldap.php
index 5f5b0b9dbd8748cca6bd18fcfba10785e5fe09b1..799f584285edcfd5b6bf875ed6e75f63795b9b45 100644
--- a/config-templates/ldap.php
+++ b/config-templates/ldap.php
@@ -20,10 +20,10 @@ $config = array (
 	 * Searching the DN of the user.
 	 */
 
-	/* Set this to TRUE to enable searching. */
+	// Set this to TRUE to enable searching.
 	'auth.ldap.search.enable' => FALSE,
 
-	/* The base DN for the search. */
+	// The base DN for the search.
 	'auth.ldap.search.base' => NULL,
 
 	/* The attribute(s) to search for.
diff --git a/config-templates/ldapmulti.php b/config-templates/ldapmulti.php
index e7c8b0cf8df7c37bc2325f522732fd90fe22ef17..ce16cdee8d19ceef87c408079c5e095efe3364f0 100644
--- a/config-templates/ldapmulti.php
+++ b/config-templates/ldapmulti.php
@@ -9,7 +9,7 @@ $ldapmulti = array (
 
 	'feide.no' => array(
 		'description'		=> 'Feide',
-		/* for a description of options see equivalent options in ldap.php starting with auth.ldap. */
+		// for a description of options see equivalent options in ldap.php starting with auth.ldap.
 		'dnpattern'			=> 'uid=%username%,dc=feide,dc=no,ou=feide,dc=uninett,dc=no',
 		'hostname'			=> 'ldap.uninett.no',
 		'attributes'		=> NULL,
diff --git a/lib/SimpleSAML/Auth/Default.php b/lib/SimpleSAML/Auth/Default.php
index 39950a8e181d2c94e1c98c3c55d668dcded8104f..3e7814b4d0987df343e7f608074e545959a4161f 100644
--- a/lib/SimpleSAML/Auth/Default.php
+++ b/lib/SimpleSAML/Auth/Default.php
@@ -60,7 +60,7 @@ class SimpleSAML_Auth_Default {
 
 		$as = SimpleSAML_Auth_Source::getById($authority);
 		if ($as === NULL) {
-			/* The authority wasn't an authentication source... */
+			// The authority wasn't an authentication source...
 			self::logoutCompleted($state);
  		}
 
diff --git a/lib/SimpleSAML/Auth/LDAP.php b/lib/SimpleSAML/Auth/LDAP.php
index 87c46afbe1f539363786915822e71732edf6a37d..794e84392e8dacd71102f34539506578df2ce7f3 100644
--- a/lib/SimpleSAML/Auth/LDAP.php
+++ b/lib/SimpleSAML/Auth/LDAP.php
@@ -54,10 +54,10 @@ class SimpleSAML_Auth_LDAP {
      * @param int $port
      * @param bool $referrals
      */
-    // TODO: Flesh out documentation.
+    // TODO: Flesh out documentation
     public function __construct($hostname, $enable_tls = TRUE, $debug = FALSE, $timeout = 0, $port = 389, $referrals = TRUE) {
 
-        // Debug.
+        // Debug
         SimpleSAML_Logger::debug('Library - LDAP __construct(): Setup LDAP with ' .
                         'host=\'' . $hostname .
                         '\', tls=' . var_export($enable_tls, true) .
@@ -84,18 +84,18 @@ class SimpleSAML_Auth_LDAP {
             throw $this->makeException('Library - LDAP __construct(): Unable to connect to \'' . $hostname . '\'', ERR_INTERNAL);
         }
 
-        /* Enable LDAP protocol version 3. */
+        // Enable LDAP protocol version 3
         if (!@ldap_set_option($this->ldap, LDAP_OPT_PROTOCOL_VERSION, 3)) {
             throw $this->makeException('Library - LDAP __construct(): Failed to set LDAP Protocol version (LDAP_OPT_PROTOCOL_VERSION) to 3', ERR_INTERNAL);
         }
 
-        /* Set referral option */
+        // Set referral option
         if (!@ldap_set_option($this->ldap, LDAP_OPT_REFERRALS, $referrals)) {
             throw $this->makeException('Library - LDAP __construct(): Failed to set LDAP Referrals (LDAP_OPT_REFERRALS) to '.$referrals, ERR_INTERNAL);
         }
 
-        // Set timeouts, if supported.
-        // (OpenLDAP 2.x.x or Netscape Directory SDK x.x needed).
+        // Set timeouts, if supported
+        // (OpenLDAP 2.x.x or Netscape Directory SDK x.x needed)
         $this->timeout = $timeout;
         if ($timeout > 0) {
             if (!@ldap_set_option($this->ldap, LDAP_OPT_NETWORK_TIMEOUT, $timeout)) {
@@ -106,7 +106,7 @@ class SimpleSAML_Auth_LDAP {
             }
         }
 
-        // Enable TLS, if needed.
+        // Enable TLS, if needed
         if (stripos($hostname, "ldaps:") === FALSE and $enable_tls) {
             if (!@ldap_start_tls($this->ldap)) {
                 throw $this->makeException('Library - LDAP __construct(): Unable to force TLS', ERR_INTERNAL);
@@ -126,7 +126,7 @@ class SimpleSAML_Auth_LDAP {
     private function makeException($description, $type = NULL) {
         $errNo = 0x00;
 
-        // Log LDAP code and description, if possible.
+        // Log LDAP code and description, if possible
         if (empty($this->ldap)) {
             SimpleSAML_Logger::error($description);
         } else {
@@ -136,7 +136,7 @@ class SimpleSAML_Auth_LDAP {
         // Decide exception type and return
         if ($type) {
             if ($errNo !== 0) {
-                // Only log real LDAP errors; not success.
+                // Only log real LDAP errors; not success
                 SimpleSAML_Logger::error($description . '; cause: \'' . ldap_error($this->ldap) . '\' (0x' . dechex($errNo) . ')');
             } else {
                 SimpleSAML_Logger::error($description);
@@ -204,7 +204,7 @@ class SimpleSAML_Auth_LDAP {
      */
     private function search($base, $attribute, $value) {
 
-        // Create the search filter.
+        // Create the search filter
         $attribute = self::escape_filter_value($attribute, FALSE);
         $value = self::escape_filter_value($value);
         $filter = '';
@@ -213,7 +213,7 @@ class SimpleSAML_Auth_LDAP {
         }
         $filter = '(|' . $filter . ')';
 
-        // Search using generated filter.
+        // Search using generated filter
         SimpleSAML_Logger::debug('Library - LDAP search(): Searching base \'' . $base . '\' for \'' . $filter . '\'');
         // TODO: Should aliases be dereferenced?
         $result = @ldap_search($this->ldap, $base, $filter, array(), 0, 0, $this->timeout);
@@ -221,7 +221,7 @@ class SimpleSAML_Auth_LDAP {
             throw $this->makeException('Library - LDAP search(): Failed search on base \'' . $base . '\' for \'' . $filter . '\'');
         }
 
-        // Sanity checks on search results.
+        // Sanity checks on search results
         $count = @ldap_count_entries($this->ldap, $result);
         if ($count === FALSE) {
             throw $this->makeException('Library - LDAP search(): Failed to get number of entries returned');
@@ -234,7 +234,7 @@ class SimpleSAML_Auth_LDAP {
         }
 
 
-        // Resolve the DN from the search result.
+        // Resolve the DN from the search result
         $entry = @ldap_first_entry($this->ldap, $result);
         if ($entry === FALSE) {
             throw $this->makeException('Library - LDAP search(): Unable to retrieve result after searching base \'' . $base . '\' for \'' . $filter . '\'');
@@ -273,29 +273,29 @@ class SimpleSAML_Auth_LDAP {
      */
     public function searchfordn($base, $attribute, $value, $allowZeroHits = FALSE) {
 
-        // Traverse all search bases, returning DN if found.
+        // Traverse all search bases, returning DN if found
         $bases = SimpleSAML\Utils\Arrays::arrayize($base);
         $result = NULL;
         foreach ($bases AS $current) {
             try {
-                // Single base search.
+                // Single base search
                 $result = $this->search($current, $attribute, $value);
                 // We don't hawe to look any futher if user is found
                 if (!empty($result)) {
                     return $result;
                 }
-                // If search failed, attempt the other base DNs.
+                // If search failed, attempt the other base DNs
             } catch (SimpleSAML_Error_UserNotFound $e) {
                 // Just continue searching
             }
         }
-        // Decide what to do for zero entries.
+        // Decide what to do for zero entries
         SimpleSAML_Logger::debug('Library - LDAP searchfordn(): No entries found');
         if ($allowZeroHits) {
-            // Zero hits allowed.
+            // Zero hits allowed
             return NULL;
         } else {
-            // Zero hits not allowed.
+            // Zero hits not allowed
             throw $this->makeException('Library - LDAP searchfordn(): LDAP search returned zero entries for filter \'(' .
                 $attribute . ' = ' . $value . ')\' on base(s) \'(' . join(' & ', $bases) . ')\'', 2);
         }
@@ -427,7 +427,7 @@ class SimpleSAML_Auth_LDAP {
                 throw $this->makeException($ex_msg);
             }
 
-            // SASL Bind, with error handling.
+            // SASL Bind, with error handling
             $authz_id = $sasl_args['authz_id'];
             $error = @ldap_sasl_bind($this->ldap, $dn, $password,
                 $sasl_args['mech'],
@@ -436,13 +436,13 @@ class SimpleSAML_Auth_LDAP {
                 $sasl_args['authz_id'],
                 $sasl_args['props']);
         } else {
-            // Simple Bind, with error handling.
+            // Simple Bind, with error handling
             $authz_id = $dn;
             $error = @ldap_bind($this->ldap, $dn, $password);
         }
 
         if ($error === TRUE) {
-            // Good.
+            // Good
             $this->authz_id = $authz_id;
             SimpleSAML_Logger::debug('Library - LDAP bind(): Bind successful with DN \'' . $dn . '\'');
             return TRUE;
@@ -452,22 +452,22 @@ class SimpleSAML_Auth_LDAP {
          * LDAP_INVALID_CREDENTIALS
          * LDAP_INSUFFICIENT_ACCESS */
         switch(ldap_errno($this->ldap)) {
-            case 32:	/* LDAP_NO_SUCH_OBJECT */
+            case 32:	// LDAP_NO_SUCH_OBJECT
                 // no break
-            case 47:	/* LDAP_X_PROXY_AUTHZ_FAILURE */
+            case 47:	// LDAP_X_PROXY_AUTHZ_FAILURE
                 // no break
-            case 48:	/* LDAP_INAPPROPRIATE_AUTH */
+            case 48:	// LDAP_INAPPROPRIATE_AUTH
                 // no break
-            case 49:	/* LDAP_INVALID_CREDENTIALS */
+            case 49:	// LDAP_INVALID_CREDENTIALS
                 // no break
-            case 50:	/* LDAP_INSUFFICIENT_ACCESS */
+            case 50:	// LDAP_INSUFFICIENT_ACCESS
                 return FALSE;
                 break;
         default;
             break;
         }
 
-        // Bad.
+        // Bad
         throw $this->makeException('Library - LDAP bind(): Bind failed with DN \'' . $dn . '\'');
     }
 
@@ -528,7 +528,7 @@ class SimpleSAML_Auth_LDAP {
         }
         SimpleSAML_Logger::debug('Library - LDAP getAttributes(): Getting ' . $description . ' from DN \'' . $dn . '\'');
 
-        // Attempt to get attributes.
+        // Attempt to get attributes
         // TODO: Should aliases be dereferenced?
         $result = @ldap_read($this->ldap, $dn, 'objectClass=*', $attributes, 0, 0, $this->timeout);
         if ($result === false) {
@@ -543,27 +543,27 @@ class SimpleSAML_Auth_LDAP {
             throw $this->makeException('Library - LDAP getAttributes(): Could not get attributes of first entry from DN \'' . $dn . '\'');
         }
 
-        // Parsing each found attribute into our result set.
+        // Parsing each found attribute into our result set
         $result = array();  // Recycling $result... Possibly bad practice.
         for ($i = 0; $i < $attributes['count']; $i++) {
 
-            // Ignore attributes that exceed the maximum allowed size.
+            // Ignore attributes that exceed the maximum allowed size
             $name = $attributes[$i];
             $attribute = $attributes[$name];
 
-            // Deciding whether to base64 encode.
+            // Deciding whether to base64 encode
             $values = array();
             for ($j = 0; $j < $attribute['count']; $j++) {
                 $value = $attribute[$j];
 
                 if (!empty($maxsize) && strlen($value) >= $maxsize) {
-                    // Ignoring and warning.
+                    // Ignoring and warning
                     SimpleSAML_Logger::warning('Library - LDAP getAttributes(): Attribute \'' .
                         $name . '\' exceeded maximum allowed size by ' + ($maxsize - strlen($value)));
                     continue;
                 }
 
-                // Base64 encode binary attributes.
+                // Base64 encode binary attributes
                 if (strtolower($name) === 'jpegphoto' || strtolower($name) === 'objectguid') {
                     $values[] = base64_encode($value);
                 } else {
@@ -572,12 +572,12 @@ class SimpleSAML_Auth_LDAP {
 
             }
 
-            // Adding.
+            // Adding
             $result[$name] = $values;
 
         }
 
-        // We're done.
+        // We're done
         SimpleSAML_Logger::debug('Library - LDAP getAttributes(): Found attributes \'(' . join(',', array_keys($result)) . ')\'');
         return $result;
     }
@@ -591,7 +591,7 @@ class SimpleSAML_Auth_LDAP {
      * @param string $password
      * @return array|bool
      */
-    // TODO: Documentation; only cleared up exception/log messages.
+    // TODO: Documentation; only cleared up exception/log messages
     public function validate($config, $username, $password = null) {
 
         /* Escape any characters with a special meaning in LDAP. The following
@@ -611,7 +611,7 @@ class SimpleSAML_Auth_LDAP {
             $dn = $this->searchfordn($config['searchbase'], $config['searchattributes'], $username);
         }
 
-        if ($password !== null) { /* checking users credentials ... assuming below that she may read her own attributes ... */
+        if ($password !== null) { // checking users credentials ... assuming below that she may read her own attributes ...
             if (!$this->bind($dn, $password)) {
                 SimpleSAML_Logger::info('Library - LDAP validate(): Failed to authenticate \''. $username . '\' using DN \'' . $dn . '\'');
                 return FALSE;
diff --git a/lib/SimpleSAML/Auth/ProcessingChain.php b/lib/SimpleSAML/Auth/ProcessingChain.php
index 86f0afc125672cf0add4330b113fc8b3ec977e2a..9f9da145fe97e67b783646a6ddd9c650cba61a7a 100644
--- a/lib/SimpleSAML/Auth/ProcessingChain.php
+++ b/lib/SimpleSAML/Auth/ProcessingChain.php
@@ -91,10 +91,10 @@ class SimpleSAML_Auth_ProcessingChain {
 		foreach ($src as $filter) {
 			$fp = $filter->priority;
 
-			/* Find insertion position for filter. */
+			// Find insertion position for filter
 			for($i = count($target)-1; $i >= 0; $i--) {
 				if ($target[$i]->priority <= $fp) {
-					/* The new filter should be inserted after this one. */
+					// The new filter should be inserted after this one
 					break;
 				}
 			}
@@ -186,7 +186,7 @@ class SimpleSAML_Auth_ProcessingChain {
 
 			// TODO: remove this in SSP 2.0
 			if (!array_key_exists('UserID', $state)) {
-				/* No unique user ID present. Attempt to add one. */
+				// No unique user ID present. Attempt to add one.
 				self::addUserID($state);
 			}
 
@@ -196,7 +196,7 @@ class SimpleSAML_Auth_ProcessingChain {
 			}
 
 		} catch (SimpleSAML_Error_Exception $e) {
-			/* No need to convert the exception. */
+			// No need to convert the exception
 			throw $e;
 		} catch (Exception $e) {
 			/*
@@ -206,7 +206,7 @@ class SimpleSAML_Auth_ProcessingChain {
 			throw new SimpleSAML_Error_UnserializableException($e);
 		}
 
-		/* Completed. */
+		// Completed
 	}
 
 
@@ -236,7 +236,7 @@ class SimpleSAML_Auth_ProcessingChain {
 			}
 		}
 
-		/* Completed. */
+		// Completed
 
 		assert('array_key_exists("ReturnURL", $state) || array_key_exists("ReturnCall", $state)');
 		assert('!array_key_exists("ReturnURL", $state) || !array_key_exists("ReturnCall", $state)');
@@ -252,7 +252,7 @@ class SimpleSAML_Auth_ProcessingChain {
 		} else {
 			/* Pass the state to the function defined in $state['ReturnCall']. */
 
-			/* We are done with the state array in the session. Delete it. */
+			// We are done with the state array in the session. Delete it.
 			SimpleSAML_Auth_State::deleteState($state);
 
 			$func = $state['ReturnCall'];
@@ -286,7 +286,7 @@ class SimpleSAML_Auth_ProcessingChain {
 
 		// TODO: remove this in SSP 2.0
 		if (!array_key_exists('UserID', $state)) {
-			/* No unique user ID present. Attempt to add one. */
+			// No unique user ID present. Attempt to add one.
 			self::addUserID($state);
 		}
 
@@ -328,7 +328,7 @@ class SimpleSAML_Auth_ProcessingChain {
 			$attributeName = $state['Source']['userid.attribute'];
 			SimpleSAML_Logger::warning("The 'userid.attribute' option has been deprecated.");
 		} else {
-			/* Default attribute. */
+			// Default attribute
 			$attributeName = 'eduPersonPrincipalName';
 		}
 
diff --git a/lib/SimpleSAML/Auth/Simple.php b/lib/SimpleSAML/Auth/Simple.php
index cd3a71c72291a93dab6e8e069f7baae4e837fd3d..32c5bb9f46829300a987d8b7a419b7f7bbaa9a01 100644
--- a/lib/SimpleSAML/Auth/Simple.php
+++ b/lib/SimpleSAML/Auth/Simple.php
@@ -76,7 +76,7 @@ class SimpleSAML_Auth_Simple {
 		$session = SimpleSAML_Session::getSessionFromRequest();
 
 		if ($session->isValid($this->authSource)) {
-			/* Already authenticated. */
+			// Already authenticated
 			return;
 		}
 
@@ -239,11 +239,11 @@ class SimpleSAML_Auth_Simple {
 	public function getAttributes() {
 
 		if (!$this->isAuthenticated()) {
-			/* Not authenticated. */
+			// Not authenticated
 			return array();
 		}
 
-		/* Authenticated. */
+		// Authenticated
 		$session = SimpleSAML_Session::getSessionFromRequest();
 		return $session->getAuthData($this->authSource, 'Attributes');
 	}
diff --git a/lib/SimpleSAML/Auth/State.php b/lib/SimpleSAML/Auth/State.php
index bf9e597ed95f68d168234c4cf3cd7356ca428cbe..1063046956feb91b1bf6c234d486744b8b36784b 100644
--- a/lib/SimpleSAML/Auth/State.php
+++ b/lib/SimpleSAML/Auth/State.php
@@ -149,11 +149,11 @@ class SimpleSAML_Auth_State {
 		$id = $state[self::ID];
 
 		if ($rawId || !array_key_exists(self::RESTART, $state)) {
-			/* Either raw ID or no restart URL. In any case, return the raw ID. */
+			// Either raw ID or no restart URL. In any case, return the raw ID.
 			return $id;
 		}
 
-		/* We have a restart URL. Return the ID with that URL. */
+		// We have a restart URL. Return the ID with that URL.
 		return $id . ':' . $state[self::RESTART];
 	}
 
@@ -192,10 +192,10 @@ class SimpleSAML_Auth_State {
 		$return = self::getStateId($state, $rawId);
 		$id = $state[self::ID];
 
-		/* Save stage. */
+		// Save stage
 		$state[self::STAGE] = $stage;
 
-		/* Save state. */
+		// Save state
 		$serializedState = serialize($state);
 		$session = SimpleSAML_Session::getSessionFromRequest();
 		$session->setData('SimpleSAML_Auth_State', $id, $serializedState, self::getStateTimeout());
@@ -254,7 +254,7 @@ class SimpleSAML_Auth_State {
 		$state = $session->getData('SimpleSAML_Auth_State', $sid['id']);
 
 		if ($state === NULL) {
-			/* Could not find saved data. */
+			// Could not find saved data
 			if ($allowMissing) {
 				return NULL;
 			}
@@ -271,7 +271,7 @@ class SimpleSAML_Auth_State {
 		assert('array_key_exists(self::ID, $state)');
 		assert('array_key_exists(self::STAGE, $state)');
 
-		/* Verify stage. */
+		// Verify stage
 		if ($state[self::STAGE] !== $stage) {
 			/* This could be a user trying to bypass security, but most likely it is just
 			 * someone using the back-button in the browser. We try to restart the
@@ -305,7 +305,7 @@ class SimpleSAML_Auth_State {
 		assert('is_array($state)');
 
 		if (!array_key_exists(self::ID, $state)) {
-			/* This state hasn't been saved. */
+			// This state hasn't been saved
 			return;
 		}
 
@@ -327,15 +327,15 @@ class SimpleSAML_Auth_State {
 
 		if (array_key_exists(self::EXCEPTION_HANDLER_URL, $state)) {
 
-			/* Save the exception. */
+			// Save the exception
 			$state[self::EXCEPTION_DATA] = $exception;
 			$id = self::saveState($state, self::EXCEPTION_STAGE);
 
-			/* Redirect to the exception handler. */
+			// Redirect to the exception handler
 			\SimpleSAML\Utils\HTTP::redirectTrustedURL($state[self::EXCEPTION_HANDLER_URL], array(self::EXCEPTION_PARAM => $id));
 
 		} elseif (array_key_exists(self::EXCEPTION_HANDLER_FUNC, $state)) {
-			/* Call the exception handler. */
+			// Call the exception handler
 			$func = $state[self::EXCEPTION_HANDLER_FUNC];
 			assert('is_callable($func)');
 
@@ -363,7 +363,7 @@ class SimpleSAML_Auth_State {
 
 		if ($id === NULL) {
 			if (!array_key_exists(self::EXCEPTION_PARAM, $_REQUEST)) {
-				/* No exception. */
+				// No exception
 				return NULL;
 			}
 			$id = $_REQUEST[self::EXCEPTION_PARAM];
diff --git a/lib/SimpleSAML/Auth/TimeLimitedToken.php b/lib/SimpleSAML/Auth/TimeLimitedToken.php
index 5a59b7a85aca91335d7a81f90b9a4d44bd6ab551..d89bff922a54668ac7a709a2ab74786e05b4af60 100644
--- a/lib/SimpleSAML/Auth/TimeLimitedToken.php
+++ b/lib/SimpleSAML/Auth/TimeLimitedToken.php
@@ -47,7 +47,7 @@ class SimpleSAML_Auth_TimeLimitedToken {
 	 * Calculates a token value for a given offset
 	 */
 	private function calculate_tokenvalue($offset) {
-		// A secret salt that should be randomly generated for each installation.
+		// A secret salt that should be randomly generated for each installation
 		return sha1( $this->calculate_time_slot($offset) . ':' . $this->secretSalt);
 	}
 	
diff --git a/lib/SimpleSAML/Bindings/Shib13/Artifact.php b/lib/SimpleSAML/Bindings/Shib13/Artifact.php
index d3aa4862dccb514654dafbd48aafd37187eefcd3..38fd0641a3903bd20ca0dba511b1a3263bf19df5 100644
--- a/lib/SimpleSAML/Bindings/Shib13/Artifact.php
+++ b/lib/SimpleSAML/Bindings/Shib13/Artifact.php
@@ -18,7 +18,7 @@ class SimpleSAML_Bindings_Shib13_Artifact {
 	private static function getArtifacts() {
 		assert('array_key_exists("QUERY_STRING", $_SERVER)');
 
-		/* We need to process the query string manually, to capture all SAMLart parameters. */
+		// We need to process the query string manually, to capture all SAMLart parameters
 
 		$artifacts = array();
 
@@ -161,7 +161,7 @@ class SimpleSAML_Bindings_Shib13_Artifact {
 			),
 		);
 
-		/* Fetch the artifact. */
+		// Fetch the artifact
 		$response = \SimpleSAML\Utils\HTTP::fetch($url, $opts);
 		if ($response === FALSE) {
 			throw new SimpleSAML_Error_Exception('Failed to retrieve assertion from IdP.');
@@ -169,7 +169,7 @@ class SimpleSAML_Bindings_Shib13_Artifact {
 
 		\SimpleSAML\Utils\XML::debugSAMLMessage($response, 'in');
 
-		/* Find the response in the SOAP message. */
+		// Find the response in the SOAP message
 		$response = self::extractResponse($response);
 
 		return $response;
diff --git a/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php b/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php
index 0cd3e16885cb6580e44f761e55b902ed443a17c8..c92e0f1bfb011aab60e8be57ce876fcda6fa09e3 100644
--- a/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php
+++ b/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php
@@ -97,7 +97,7 @@ class SimpleSAML_Bindings_Shib13_HTTPPost
             assert('count($statusElements) === 1');
             $signer->sign($responseroot, $responseroot, $statusElements[0]);
         } else {
-            /* Sign the assertion */
+            // Sign the assertion
             $signer->sign($firstassertionroot, $firstassertionroot);
         }
 
diff --git a/lib/SimpleSAML/Configuration.php b/lib/SimpleSAML/Configuration.php
index 4f9bf36cbd19a4ade7b20330385467b97247828b..64512ef25c4a1f41fd33f6106151683f5266ec18 100644
--- a/lib/SimpleSAML/Configuration.php
+++ b/lib/SimpleSAML/Configuration.php
@@ -526,7 +526,7 @@ class SimpleSAML_Configuration
 
         $dir = dirname($dir);
 
-        /* Add trailing slash. */
+        // Add trailing slash
         $dir .= '/';
 
         return $dir;
@@ -1216,7 +1216,7 @@ class SimpleSAML_Configuration
                     continue;
                 }
                 if (isset($key['X509Certificate'])) {
-                    /* Strip whitespace from key. */
+                    // Strip whitespace from key
                     $key['X509Certificate'] = preg_replace('/\s+/', '', $key['X509Certificate']);
                 }
                 $ret[] = $key;
diff --git a/lib/SimpleSAML/Error/Error.php b/lib/SimpleSAML/Error/Error.php
index 7a570a52f7a8d8e0a5195f1ecf69f1b149d4948b..69662ab94c670b276c43c8a0566f9e2725fdccad 100644
--- a/lib/SimpleSAML/Error/Error.php
+++ b/lib/SimpleSAML/Error/Error.php
@@ -172,7 +172,7 @@ class SimpleSAML_Error_Error extends SimpleSAML_Error_Exception
      */
     protected function setHTTPCode()
     {
-        // Some mostly used HTTP codes.
+        // Some mostly used HTTP codes
         $httpCodesMap = array(
             400 => 'HTTP/1.0 400 Bad Request',
             403 => 'HTTP/1.0 403 Forbidden',
diff --git a/lib/SimpleSAML/Error/UnserializableException.php b/lib/SimpleSAML/Error/UnserializableException.php
index 97e5c57359e9eb4ca5346a881c6f44bdbe46fd02..6c55bece1381dcc74eac1ada769fcf65d5333002 100644
--- a/lib/SimpleSAML/Error/UnserializableException.php
+++ b/lib/SimpleSAML/Error/UnserializableException.php
@@ -34,7 +34,7 @@ class SimpleSAML_Error_UnserializableException extends SimpleSAML_Error_Exceptio
 		$code = $original->getCode();
 
 		if (!is_int($code)) {
-			/* PDOException uses a string as the code. Filter it out here. */
+			// PDOException uses a string as the code. Filter it out here.
 			$code = -1;
 		}
 
diff --git a/lib/SimpleSAML/IdP/LogoutTraditional.php b/lib/SimpleSAML/IdP/LogoutTraditional.php
index d36206739e5af183756dec340fa77fe8bef518e0..1160908da877587b714f39adcff947cf34b05845 100644
--- a/lib/SimpleSAML/IdP/LogoutTraditional.php
+++ b/lib/SimpleSAML/IdP/LogoutTraditional.php
@@ -37,7 +37,7 @@ class SimpleSAML_IdP_LogoutTraditional extends SimpleSAML_IdP_LogoutHandler
             $this->idp->terminateAssociation($id);
             $state['core:Failed'] = true;
 
-            /* Try the next SP. */
+            // Try the next SP
             $this->logoutNextSP($state);
             assert('FALSE');
         }
diff --git a/lib/SimpleSAML/Logger.php b/lib/SimpleSAML/Logger.php
index 7cfe442784a7bc3276c92cb7007ad70606d6177a..11d275dd696cec46e82bbe22da06fff7ac8cd6e5 100644
--- a/lib/SimpleSAML/Logger.php
+++ b/lib/SimpleSAML/Logger.php
@@ -320,7 +320,7 @@ class SimpleSAML_Logger
         }
 
         if (self::$loggingHandler === null) {
-            /* Initialize logging. */
+            // Initialize logging
             self::createLoggingHandler();
 
             if (!empty(self::$earlyLog)) {
diff --git a/lib/SimpleSAML/Logger/LoggingHandlerSyslog.php b/lib/SimpleSAML/Logger/LoggingHandlerSyslog.php
index 8fbc1d7a17832d8fe75fb0de28c4dcca41d98acb..c0a94ea22c2bf40611332eb6f45c562aaed5a49c 100644
--- a/lib/SimpleSAML/Logger/LoggingHandlerSyslog.php
+++ b/lib/SimpleSAML/Logger/LoggingHandlerSyslog.php
@@ -26,7 +26,7 @@ class SimpleSAML_Logger_LoggingHandlerSyslog implements SimpleSAML_Logger_Loggin
 
         $processname = $config->getString('logging.processname', 'SimpleSAMLphp');
 
-        // Setting facility to LOG_USER (only valid in Windows), enable log level rewrite on windows systems.
+        // Setting facility to LOG_USER (only valid in Windows), enable log level rewrite on windows systems
         if (SimpleSAML\Utils\System::getOS() === SimpleSAML\Utils\System::WINDOWS) {
             $this->isWindows = TRUE;
             $facility = LOG_USER;
diff --git a/lib/SimpleSAML/Memcache.php b/lib/SimpleSAML/Memcache.php
index 52000735f83b7eafc3c7f43ecc341f13370fa2fa..9eb628f186b8354cc8de49f379e09d61198e8c65 100644
--- a/lib/SimpleSAML/Memcache.php
+++ b/lib/SimpleSAML/Memcache.php
@@ -99,7 +99,7 @@ class SimpleSAML_Memcache
                 continue;
             }
 
-            // different data from different servers. We need to update at least one of them to maintain sync.
+            // different data from different servers. We need to update at least one of them to maintain sync
             $mustUpdate = true;
 
             // update if data in $info is newer than $latestData
diff --git a/lib/SimpleSAML/Metadata/SAMLBuilder.php b/lib/SimpleSAML/Metadata/SAMLBuilder.php
index 22cc6a99f2d5635056f3ab150969d2559fa9bb90..59b3264042aa4bf3bcac9318e7d032bc3697b2fe 100644
--- a/lib/SimpleSAML/Metadata/SAMLBuilder.php
+++ b/lib/SimpleSAML/Metadata/SAMLBuilder.php
@@ -348,7 +348,7 @@ class SimpleSAML_Metadata_SAMLBuilder
 
             if ($indexed) {
                 if (!isset($ep['index'])) {
-                    /* Find the maximum index. */
+                    // Find the maximum index
                     $maxIndex = -1;
                     foreach ($endpoints as $ep) {
                         if (!isset($ep['index'])) {
@@ -678,7 +678,7 @@ class SimpleSAML_Metadata_SAMLBuilder
         assert('is_array($details)');
         assert('in_array($type, array("technical", "support", "administrative", "billing", "other"), TRUE)');
 
-        // TODO: remove this check as soon as getContact() is called always before calling this function.
+        // TODO: remove this check as soon as getContact() is called always before calling this function
         $details = \SimpleSAML\Utils\Config\Metadata::getContact($details);
 
         $e = new SAML2_XML_md_ContactPerson();
diff --git a/lib/SimpleSAML/Metadata/SAMLParser.php b/lib/SimpleSAML/Metadata/SAMLParser.php
index 1002fe2b0c08460ba009b38e36a367c8f7448a30..ad725e8b22bb8aeffbbef9a926807ddba6d165af 100644
--- a/lib/SimpleSAML/Metadata/SAMLParser.php
+++ b/lib/SimpleSAML/Metadata/SAMLParser.php
@@ -1009,7 +1009,7 @@ class SimpleSAML_Metadata_SAMLParser
                 if ($e instanceof SAML2_XML_mdattr_EntityAttributes && !empty($e->children)) {
                     foreach ($e->children as $attr) {
                         // only saml:Attribute are currently supported here. The specifications also allows
-                        // saml:Assertions, which more complex processing.
+                        // saml:Assertions, which more complex processing
                         if ($attr instanceof SAML2_XML_saml_Attribute) {
                             if (empty($attr->Name) || empty($attr->AttributeValue)) {
                                 continue;
diff --git a/lib/SimpleSAML/Store/SQL.php b/lib/SimpleSAML/Store/SQL.php
index 976a81226e74c358b0fe4a8c0f1b55e34e754fda..2766892c3eb8d58cf141c0460c8af99b5af6b430 100644
--- a/lib/SimpleSAML/Store/SQL.php
+++ b/lib/SimpleSAML/Store/SQL.php
@@ -91,7 +91,7 @@ class SimpleSAML_Store_SQL extends SimpleSAML_Store {
 	private function initKVTable() {
 
 		if ($this->getTableVersion('kvstore') === 1) {
-			/* Table initialized. */
+			// Table initialized
 			return;
 		}
 
@@ -167,7 +167,7 @@ class SimpleSAML_Store_SQL extends SimpleSAML_Store {
 			return;
 		}
 
-		/* Default implementation. Try INSERT, and UPDATE if that fails. */
+		// Default implementation. Try INSERT, and UPDATE if that fails.
 
 		$insertQuery = 'INSERT INTO ' . $table . ' ' . $colNames . ' ' . $values;
 		$insertQuery = $this->pdo->prepare($insertQuery);
@@ -177,7 +177,7 @@ class SimpleSAML_Store_SQL extends SimpleSAML_Store {
 		} catch (PDOException $e) {
 			$ecode = (string)$e->getCode();
 			switch ($ecode) {
-			case '23505': /* PostgreSQL */
+			case '23505': // PostgreSQL
 				break;
 			default:
 				SimpleSAML_Logger::error('Error while saving data: ' . $e->getMessage());
diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php
index c2816a35f2bd865dca4390086a5c09f9212c63cd..0aea5f28475dd1551f7c8b33a746f45767f6cedf 100644
--- a/lib/SimpleSAML/Utilities.php
+++ b/lib/SimpleSAML/Utilities.php
@@ -143,7 +143,7 @@ class SimpleSAML_Utilities
 
         if (!empty($start)) {
             $startTime = SAML2_Utils::xsDateTimeToTimestamp($start);
-            /* Allow for a 10 minute difference in Time */
+            // Allow for a 10 minute difference in Time
             if (($startTime < 0) || (($startTime - 600) > $currentTime)) {
                 return false;
             }
@@ -230,14 +230,14 @@ class SimpleSAML_Utilities
             SimpleSAML_Logger::warning('Redirecting to a URL longer than 2048 bytes.');
         }
 
-        /* Set the location header. */
+        // Set the location header
         header('Location: '.$url, true, $code);
 
-        /* Disable caching of this response. */
+        // Disable caching of this response
         header('Pragma: no-cache');
         header('Cache-Control: no-cache, must-revalidate');
 
-        /* Show a minimal web page with a clickable link to the URL. */
+        // Show a minimal web page with a clickable link to the URL
         echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
         echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'.
             ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";
@@ -257,7 +257,7 @@ class SimpleSAML_Utilities
         echo '</body>';
         echo '</html>';
 
-        /* End script execution. */
+        // End script execution
         exit;
     }
 
diff --git a/lib/SimpleSAML/Utils/HTTP.php b/lib/SimpleSAML/Utils/HTTP.php
index 0c4e5e82453edd085b6b3a1c61b17fde60e73745..7aaa1977987efa1fd10b67d636136af3f2195430 100644
--- a/lib/SimpleSAML/Utils/HTTP.php
+++ b/lib/SimpleSAML/Utils/HTTP.php
@@ -400,7 +400,7 @@ class HTTP
             throw new \SimpleSAML_Error_Exception('Error fetching '.var_export($url, true).':'.$error['message']);
         }
 
-        // data and headers.
+        // data and headers
         if ($getHeaders) {
             if (isset($http_response_header)) {
                 $headers = array();
@@ -830,7 +830,7 @@ class HTTP
      *
      * This function supports these forms of relative URLs:
      * - ^\w+: Absolute URL. E.g. "http://www.example.com:port/path?query#fragment".
-     * - ^// Same protocol. E.g. "//www.example.com:port/path?query#fragment".
+     * - ^// Same protocol. E.g. "//www.example.com:port/path?query#fragment"
      * - ^/ Same protocol and host. E.g. "/path?query#fragment".
      * - ^? Same protocol, host and path, replace query string & fragment. E.g. "?query#fragment".
      * - ^# Same protocol, host, path and query, replace fragment. E.g. "#fragment".
diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php
index 4b6488ada0fee587adaa48b7eea7d60a6d0889ac..ab20e116982aa3d7746bffdfb3dc5b706e2b609b 100644
--- a/lib/SimpleSAML/XHTML/Template.php
+++ b/lib/SimpleSAML/XHTML/Template.php
@@ -64,7 +64,7 @@ class SimpleSAML_XHTML_Template {
         }
 
         if($defaultDictionary !== NULL && substr($defaultDictionary, -4) === '.php') {
-            /* For backwards compatibility - print warning. */
+            // For backwards compatibility - print warning
             $backtrace = debug_backtrace();
             $where = $backtrace[0]['file'] . ':' . $backtrace[0]['line'];
             SimpleSAML_Logger::warning('Deprecated use of new SimpleSAML_Template(...) at ' . $where .
@@ -124,13 +124,13 @@ class SimpleSAML_XHTML_Template {
             return $languageCookie;
         }
 
-        /* Check if we can find a good language from the Accept-Language http header. */
+        // Check if we can find a good language from the Accept-Language http header
         $httpLanguage = $this->getHTTPLanguage();
         if ($httpLanguage !== NULL) {
             return $httpLanguage;
         }
 
-        // Language is not set, and we get the default language from the configuration.
+        // Language is not set, and we get the default language from the configuration
         return $this->getDefaultLanguage();
     }
 
@@ -149,19 +149,19 @@ class SimpleSAML_XHTML_Template {
          */
         $languageMap = self::$defaultLanguageMap;
 
-        /* Find the available language with the best score. */
+        // Find the available language with the best score
         $bestLanguage = NULL;
         $bestScore = -1.0;
 
         foreach($languageScore as $language => $score) {
 
-            /* Apply the language map to the language code. */
+            // Apply the language map to the language code
             if(array_key_exists($language, $languageMap)) {
                 $language = $languageMap[$language];
             }
 
             if(!in_array($language, $this->availableLanguages, TRUE)) {
-                /* Skip this language - we don't have it. */
+                // Skip this language - we don't have it
                 continue;
             }
 
@@ -266,19 +266,19 @@ class SimpleSAML_XHTML_Template {
     public function getTag($tag) {
         assert('is_string($tag)');
 
-        /* First check translations loaded by the includeInlineTranslation and includeLanguageFile methods. */
+        // First check translations loaded by the includeInlineTranslation and includeLanguageFile methods
         if(array_key_exists($tag, $this->langtext)) {
             return $this->langtext[$tag];
         }
 
-        /* Check whether we should use the default dictionary or a dictionary specified in the tag. */
+        // Check whether we should use the default dictionary or a dictionary specified in the tag
         if(substr($tag, 0, 1) === '{' && preg_match('/^{((?:\w+:)?\w+?):(.*)}$/D', $tag, $matches)) {
             $dictionary = $matches[1];
             $tag = $matches[2];
         } else {
             $dictionary = $this->defaultDictionary;
             if($dictionary === NULL) {
-                /* We don't have any dictionary to load the tag from. */
+                // We don't have any dictionary to load the tag from
                 return NULL;
             }
         }
@@ -301,30 +301,30 @@ class SimpleSAML_XHTML_Template {
     public function getTranslation($translations) {
         assert('is_array($translations)');
 
-        /* Look up translation of tag in the selected language. */
+        // Look up translation of tag in the selected language
         $selected_language = $this->getLanguage();
         if (array_key_exists($selected_language, $translations)) {
             return $translations[$selected_language];
         }
 
-        /* Look up translation of tag in the default language. */
+        // Look up translation of tag in the default language
         $default_language = $this->getDefaultLanguage();
         if(array_key_exists($default_language, $translations)) {
             return $translations[$default_language];
         }
 
-        /* Check for english translation. */
+        // Check for english translation
         if(array_key_exists('en', $translations)) {
             return $translations['en'];
         }
 
-        /* Pick the first translation available. */
+        // Pick the first translation available
         if(count($translations) > 0) {
             $languages = array_keys($translations);
             return $translations[$languages[0]];
         }
 
-        /* We don't have anything to return. */
+        // We don't have anything to return
         throw new Exception('Nothing to return from translation.');
     }
 
@@ -337,11 +337,11 @@ class SimpleSAML_XHTML_Template {
      */
     public function getAttributeTranslation($name) {
 
-        /* Normalize attribute name. */
+        // Normalize attribute name
         $normName = strtolower($name);
         $normName = str_replace(":", "_", $normName);
 
-        /* Check for an extra dictionary. */
+        // Check for an extra dictionary
         $extraDict = $this->configuration->getString('attributes.extradictionary', NULL);
         if ($extraDict !== NULL) {
             $dict = $this->getDictionary($extraDict);
@@ -350,13 +350,13 @@ class SimpleSAML_XHTML_Template {
             }
         }
 
-        /* Search the default attribute dictionary. */
+        // Search the default attribute dictionary
         $dict = $this->getDictionary('attributes');
         if (array_key_exists('attribute_' . $normName, $dict)) {
             return $this->getTranslation($dict['attribute_' . $normName]);
         }
 
-        /* No translations found. */
+        // No translations found
         return $name;
     }
 
@@ -384,13 +384,13 @@ class SimpleSAML_XHTML_Template {
     public function t($tag, $replacements = array(), $fallbackdefault = true, $oldreplacements = array(), $striptags = FALSE) {
         if(!is_array($replacements)) {
 
-            /* Old style call to t(...). Print warning to log. */
+            // Old style call to t(...). Print warning to log.
             $backtrace = debug_backtrace();
             $where = $backtrace[0]['file'] . ':' . $backtrace[0]['line'];
             SimpleSAML_Logger::warning('Deprecated use of SimpleSAML_Template::t(...) at ' . $where .
                 '. Please update the code to use the new style of parameters.');
 
-            /* For backwards compatibility. */
+            // For backwards compatibility
             if(!$replacements && $this->getTag($tag) === NULL) {
                 SimpleSAML_Logger::warning('Code which uses $fallbackdefault === FALSE shouls be' .
                     ' updated to use the getTag-method instead.');
@@ -405,7 +405,7 @@ class SimpleSAML_XHTML_Template {
         } else {
             $tagData = $this->getTag($tag);
             if($tagData === NULL) {
-                /* Tag not found. */
+                // Tag not found
                 SimpleSAML_Logger::info('Template: Looking up [' . $tag . ']: not translated at all.');
                 return $this->t_not_translated($tag, $fallbackdefault);
             }
@@ -414,7 +414,7 @@ class SimpleSAML_XHTML_Template {
         $translated = $this->getTranslation($tagData);
 
         foreach ($replacements as $k => $v) {
-            /* try to translate if no replacement is given */
+            // try to translate if no replacement is given
             if ($v == NULL) $v = $this->t($k);
             $translated = str_replace($k, $v, $translated);
         }
@@ -558,7 +558,7 @@ class SimpleSAML_XHTML_Template {
     }
 
 
-    // Merge two translation arrays.
+    // Merge two translation arrays
     public static function lang_merge($def, $lang) {
         foreach($def AS $key => $value) {
             if (array_key_exists($key, $lang))
@@ -615,16 +615,16 @@ class SimpleSAML_XHTML_Template {
         }
 
 
-        /* First check the current theme. */
+        // First check the current theme
         if ($themeModule !== NULL) {
-            /* .../module/<themeModule>/themes/<themeName>/<templateModule>/<templateName> */
+            // .../module/<themeModule>/themes/<themeName>/<templateModule>/<templateName>
 
             $filename = SimpleSAML_Module::getModuleDir($themeModule) . '/themes/' . $themeName . '/' . $templateModule . '/' . $templateName;
         } elseif ($templateModule !== 'default') {
-            /* .../module/<templateModule>/templates/<themeName>/<templateName> */
+            // .../module/<templateModule>/templates/<themeName>/<templateName>
             $filename = SimpleSAML_Module::getModuleDir($templateModule) . '/templates/' . $templateName;
         } else {
-            /* .../templates/<theme>/<templateName> */
+            // .../templates/<theme>/<templateName>
             $filename = $this->configuration->getPathValue('templatedir', 'templates/') . $templateName;
         }
 
@@ -633,17 +633,17 @@ class SimpleSAML_XHTML_Template {
         }
 
 
-        /* Not found in current theme. */
+        // Not found in current theme
         SimpleSAML_Logger::debug($_SERVER['PHP_SELF'].' - Template: Could not find template file [' .
             $template . '] at [' . $filename . '] - now trying the base template');
 
 
-        /* Try default theme. */
+        // Try default theme
         if ($templateModule !== 'default') {
-            /* .../module/<templateModule>/templates/<templateName> */
+            // .../module/<templateModule>/templates/<templateName>
             $filename = SimpleSAML_Module::getModuleDir($templateModule) . '/templates/' . $templateName;
         } else {
-            /* .../templates/<templateName> */
+            // .../templates/<templateName>
             $filename = $this->configuration->getPathValue('templatedir', 'templates/') . '/' . $templateName;
         }
 
@@ -652,7 +652,7 @@ class SimpleSAML_XHTML_Template {
         }
 
 
-        /* Not found in default template - log error and throw exception. */
+        // Not found in default template - log error and throw exception
         $error = 'Template: Could not find template file [' . $template . '] at [' . $filename . ']';
         SimpleSAML_Logger::critical($_SERVER['PHP_SELF'] . ' - ' . $error);
 
diff --git a/lib/SimpleSAML/XML/Errors.php b/lib/SimpleSAML/XML/Errors.php
index 0ef5529104f36c3f815f7d672d6e80f0df50738c..c56d95b74b8ec8679f1c2a78aac349d6f06ed609 100644
--- a/lib/SimpleSAML/XML/Errors.php
+++ b/lib/SimpleSAML/XML/Errors.php
@@ -44,13 +44,13 @@ class SimpleSAML_XML_Errors {
 	 */
 	public static function begin() {
 
-		/* Check whether the error access functions are present. */
+		// Check whether the error access functions are present
 		if(!function_exists('libxml_use_internal_errors')) {
 			return;
 		}
 
 		if(count(self::$errorStack) === 0) {
-			/* No error logging is currently in progress. Initialize it. */
+			// No error logging is currently in progress. Initialize it.
 			self::$xmlErrorState = libxml_use_internal_errors(TRUE);
 			libxml_clear_errors();
 		} else {
@@ -60,7 +60,7 @@ class SimpleSAML_XML_Errors {
 			self::addErrors();
 		}
 
-		/* Add a new level to the error stack. */
+		// Add a new level to the error stack
 		self::$errorStack[] = array();
 	}
 
@@ -72,20 +72,20 @@ class SimpleSAML_XML_Errors {
 	 */
 	public static function end() {
 
-		/* Check whether the error access functions are present. */
+		// Check whether the error access functions are present
 		if(!function_exists('libxml_use_internal_errors')) {
-			/* Pretend that no errors occurred. */
+			// Pretend that no errors occurred
 			return array();
 		}
 
-		/* Add any errors which may have occurred. */
+		// Add any errors which may have occurred
 		self::addErrors();
 
 
 		$ret = array_pop(self::$errorStack);
 
 		if(count(self::$errorStack) === 0) {
-			/* Disable our error logging and restore the previous state. */
+			// Disable our error logging and restore the previous state
 			libxml_use_internal_errors(self::$xmlErrorState);
 		}
 
diff --git a/lib/SimpleSAML/XML/Parser.php b/lib/SimpleSAML/XML/Parser.php
index db1eb40614fe67fa50f74b0722f679b166caf39c..42b4731b9de159f75d8c4b3817e64a7183556f7d 100644
--- a/lib/SimpleSAML/XML/Parser.php
+++ b/lib/SimpleSAML/XML/Parser.php
@@ -20,7 +20,7 @@ class SimpleSAML_XML_Parser  {
 	
 	public static function fromSimpleXMLElement(SimpleXMLElement $element) {
 		
-		// Traverse all existing namespaces in element.
+		// Traverse all existing namespaces in element
 		$namespaces = $element->getNamespaces();
 		foreach ($namespaces AS $prefix => $ns) {
 			$element[(($prefix === '') ? 'xmlns' : 'xmlns:' . $prefix)] = $ns;
diff --git a/lib/SimpleSAML/XML/Shib13/AuthnResponse.php b/lib/SimpleSAML/XML/Shib13/AuthnResponse.php
index 4a4346e08a8c672c064b170cbff5381077bdcd13..6f6dd8a96c079ffd57a6f59ee9c1ed331d829e8f 100644
--- a/lib/SimpleSAML/XML/Shib13/AuthnResponse.php
+++ b/lib/SimpleSAML/XML/Shib13/AuthnResponse.php
@@ -75,17 +75,17 @@ class SimpleSAML_XML_Shib13_AuthnResponse {
 		assert('$this->dom instanceof DOMDocument');
 
 		if ($this->messageValidated) {
-			/* This message was validated externally. */
+			// This message was validated externally
 			return TRUE;
 		}
 
-		/* Validate the signature. */
+		// Validate the signature
 		$this->validator = new SimpleSAML_XML_Validator($this->dom, array('ResponseID', 'AssertionID'));
 
-		// Get the issuer of the response.
+		// Get the issuer of the response
 		$issuer = $this->getIssuer();
 
-		/* Get the metadata of the issuer. */
+		// Get the metadata of the issuer
 		$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 		$md = $metadata->getMetaDataConfig($issuer, 'shib13-idp-remote');
 
@@ -102,10 +102,10 @@ class SimpleSAML_XML_Shib13_AuthnResponse {
 		} elseif ($md->hasValue('certFingerprint')) {
 			$certFingerprints = $md->getArrayizeString('certFingerprint');
 
-			/* Validate the fingerprint. */
+			// Validate the fingerprint
 			$this->validator->validateFingerprint($certFingerprints);
 		} elseif ($md->hasValue('caFile')) {
-			/* Validate against CA. */
+			// Validate against CA
 			$this->validator->validateCA(\SimpleSAML\Utils\Config::getCertPath($md->getString('caFile')));
 		} else {
 			throw new SimpleSAML_Error_Exception('Missing certificate in Shibboleth 1.3 IdP Remote metadata for identity provider [' . $issuer . '].');
@@ -123,7 +123,7 @@ class SimpleSAML_XML_Shib13_AuthnResponse {
 	private function isNodeValidated($node) {
 
 		if ($this->messageValidated) {
-			/* This message was validated externally. */
+			// This message was validated externally
 			return TRUE;
 		}
 
@@ -131,7 +131,7 @@ class SimpleSAML_XML_Shib13_AuthnResponse {
 			return FALSE;
 		}
 
-		/* Convert the node to a DOM node if it is an element from SimpleXML. */
+		// Convert the node to a DOM node if it is an element from SimpleXML
 		if($node instanceof SimpleXMLElement) {
 			$node = dom_import_simplexml($node);
 		}
@@ -308,7 +308,7 @@ class SimpleSAML_XML_Shib13_AuthnResponse {
 		
 		$issueInstant = SimpleSAML\Utils\Time::generateTimestamp();
 		
-		// 30 seconds timeskew back in time to allow differing clocks.
+		// 30 seconds timeskew back in time to allow differing clocks
 		$notBefore = SimpleSAML\Utils\Time::generateTimestamp(time() - 30);
 		
 		
diff --git a/lib/SimpleSAML/XML/Signer.php b/lib/SimpleSAML/XML/Signer.php
index 39cc09bbfa45b115155ab314f5a9fc9a48a8495b..04f176c3d56d7532966f36e8470753f023cfbcde 100644
--- a/lib/SimpleSAML/XML/Signer.php
+++ b/lib/SimpleSAML/XML/Signer.php
@@ -146,11 +146,11 @@ class SimpleSAML_XML_Signer {
 		assert('is_array($publickey)');
 
 		if (!array_key_exists('PEM', $publickey)) {
-			/* We have a public key with only a fingerprint. */
+			// We have a public key with only a fingerprint
 			throw new Exception('Tried to add a certificate fingerprint in a signature.');
 		}
 
-		/* For now, we only assume that the public key is an X509 certificate. */
+		// For now, we only assume that the public key is an X509 certificate
 		$this->certificate = $publickey['PEM'];
 	}
 
@@ -254,11 +254,11 @@ class SimpleSAML_XML_Signer {
 
 
 		if($this->certificate !== FALSE) {
-			/* Add the certificate to the signature. */
+			// Add the certificate to the signature
 			$objXMLSecDSig->add509Cert($this->certificate, TRUE);
 		}
 
-		/* Add extra certificates. */
+		// Add extra certificates
 		foreach($this->extraCertificates as $certificate) {
 			$objXMLSecDSig->add509Cert($certificate, TRUE);
 		}
diff --git a/lib/SimpleSAML/XML/Validator.php b/lib/SimpleSAML/XML/Validator.php
index 05261c2065a20ac071489a1c9d55927c76e10b70..555578600300b643f102931b74e83077967ae0bd 100644
--- a/lib/SimpleSAML/XML/Validator.php
+++ b/lib/SimpleSAML/XML/Validator.php
@@ -50,10 +50,10 @@ class SimpleSAML_XML_Validator {
 			assert('$publickey === FALSE || is_array($publickey)');
 		}
 
-		/* Create an XML security object. */
+		// Create an XML security object
 		$objXMLSecDSig = new XMLSecurityDSig();
 
-		/* Add the id attribute if the user passed in an id attribute. */
+		// Add the id attribute if the user passed in an id attribute
 		if($idAttribute !== NULL) {
 			if (is_string($idAttribute)) {
 				$objXMLSecDSig->idKeys[] = $idAttribute;
@@ -63,33 +63,33 @@ class SimpleSAML_XML_Validator {
 			}
 		}
 
-		/* Locate the XMLDSig Signature element to be used. */
+		// Locate the XMLDSig Signature element to be used
 		$signatureElement = $objXMLSecDSig->locateSignature($xmlNode);
 		if (!$signatureElement) {
 			throw new Exception('Could not locate XML Signature element.');
 		}
 
-		/* Canonicalize the XMLDSig SignedInfo element in the message. */
+		// Canonicalize the XMLDSig SignedInfo element in the message
 		$objXMLSecDSig->canonicalizeSignedInfo();
 
-		/* Validate referenced xml nodes. */
+		// Validate referenced xml nodes
 		if (!$objXMLSecDSig->validateReference()) {
 			throw new Exception('XMLsec: digest validation failed');
 		}
 
 
-		/* Find the key used to sign the document. */
+		// Find the key used to sign the document
 		$objKey = $objXMLSecDSig->locateKey();
 		if (empty($objKey)) {
 			throw new Exception('Error loading key to handle XML signature');
 		}
 
-		/* Load the key data. */
+		// Load the key data
 		if ($publickey !== FALSE && array_key_exists('PEM', $publickey)) {
-			/* We have PEM data for the public key / certificate. */
+			// We have PEM data for the public key / certificate
 			$objKey->loadKey($publickey['PEM']);
 		} else {
-			/* No PEM data. Search for key in signature. */
+			// No PEM data. Search for key in signature
 
 			if (!XMLSecEnc::staticLocateKeyInfo($objKey, $signatureElement)) {
 				throw new Exception('Error finding key data for XML signature validation.');
@@ -104,25 +104,25 @@ class SimpleSAML_XML_Validator {
 
 				$certificate = $objKey->getX509Certificate();
 				if ($certificate === NULL) {
-					/* Wasn't signed with an X509 certificate. */
+					// Wasn't signed with an X509 certificate
 					throw new Exception('Message wasn\'t signed with an X509 certificate,' .
 						' and no public key was provided in the metadata.');
 				}
 
 				self::validateCertificateFingerprint($certificate, $publickey['certFingerprint']);
-				/* Key OK. */
+				// Key OK
 			}
 		}
 
-		/* Check the signature. */
+		// Check the signature
 		if (! $objXMLSecDSig->verify($objKey)) {
 			throw new Exception("Unable to validate Signature");
 		}
 
-		/* Extract the certificate. */
+		// Extract the certificate
 		$this->x509Certificate = $objKey->getX509Certificate();
 
-		/* Find the list of validated nodes. */
+		// Find the list of validated nodes
 		$this->validNodes = $objXMLSecDSig->getValidatedNodes();
 	}
 
@@ -156,19 +156,19 @@ class SimpleSAML_XML_Validator {
 		$data = '';
 
 		foreach($lines as $line) {
-			/* Remove '\r' from end of line if present. */
+			// Remove '\r' from end of line if present
 			$line = rtrim($line);
 			if($line === '-----BEGIN CERTIFICATE-----') {
-				/* Delete junk from before the certificate. */
+				// Delete junk from before the certificate
 				$data = '';
 			} elseif($line === '-----END CERTIFICATE-----') {
-				/* Ignore data after the certificate. */
+				// Ignore data after the certificate
 				break;
 			} elseif($line === '-----BEGIN PUBLIC KEY-----') {
-				/* This isn't an X509 certificate. */
+				// This isn't an X509 certificate
 				return NULL;
 			} else {
-				/* Append the current line to the certificate data. */
+				// Append the current line to the certificate data
 				$data .= $line;
 			}
 		}
@@ -195,7 +195,7 @@ class SimpleSAML_XML_Validator {
 
 		$certFingerprint = self::calculateX509Fingerprint($certificate);
 		if ($certFingerprint === NULL) {
-			/* Couldn't calculate fingerprint from X509 certificate. Should not happen. */
+			// Couldn't calculate fingerprint from X509 certificate. Should not happen.
 			throw new Exception('Unable to calculate fingerprint from X509' .
 				' certificate. Maybe it isn\'t an X509 certificate?');
 		}
@@ -204,13 +204,13 @@ class SimpleSAML_XML_Validator {
 			assert('is_string($fp)');
 
 			if ($fp === $certFingerprint) {
-				/* The fingerprints matched. */
+				// The fingerprints matched
 				return;
 			}
 
 		}
 
-		/* None of the fingerprints matched. Throw an exception describing the error. */
+		// None of the fingerprints matched. Throw an exception describing the error.
 		throw new Exception('Invalid fingerprint of certificate. Expected one of [' .
 			implode('], [', $fingerprints) . '], but got [' . $certFingerprint . ']');
 	}
@@ -237,11 +237,11 @@ class SimpleSAML_XML_Validator {
 			$fingerprints = array($fingerprints);
 		}
 
-		/* Normalize the fingerprints. */
+		// Normalize the fingerprints
 		foreach($fingerprints as &$fp) {
 			assert('is_string($fp)');
 
-			/* Make sure that the fingerprint is in the correct format. */
+			// Make sure that the fingerprint is in the correct format
 			$fp = strtolower(str_replace(":", "", $fp));
 		}
 
@@ -305,13 +305,13 @@ class SimpleSAML_XML_Validator {
 		assert('is_string($certificate)');
 		assert('is_string($caFile)');
 
-		/* Clear openssl errors. */
+		// Clear openssl errors
 		while(openssl_error_string() !== FALSE);
 
 		$res = openssl_x509_checkpurpose($certificate, X509_PURPOSE_ANY, array($caFile));
 
 		$errors = '';
-		/* Log errors. */
+		// Log errors
 		while( ($error = openssl_error_string()) !== FALSE) {
 			$errors .= ' [' . $error . ']';
 		}
diff --git a/lib/_autoload.php b/lib/_autoload.php
index 03b5ec1808755803963e78f8408508e810d14e3e..018468b550e5071c1a57bb52df3fe2b73918fc8f 100644
--- a/lib/_autoload.php
+++ b/lib/_autoload.php
@@ -11,7 +11,7 @@
 // SSP is loaded as a separate project
 if (file_exists(dirname(dirname(__FILE__)).'/vendor/autoload.php')) {
     require_once dirname(dirname(__FILE__)).'/vendor/autoload.php';
-} else {  // SSP is loaded as a library.
+} else {  // SSP is loaded as a library
     if (file_exists(dirname(dirname(__FILE__)).'/../../autoload.php')) {
         require_once dirname(dirname(__FILE__)).'/../../autoload.php';
     } else {
diff --git a/metadata-templates/saml20-idp-hosted.php b/metadata-templates/saml20-idp-hosted.php
index 27f9c4d6a6fe8d00b3c9ef2c13c83128cf9d7df7..81a2007267ccc0e46573b2a8ba7cb025a626e1df 100644
--- a/metadata-templates/saml20-idp-hosted.php
+++ b/metadata-templates/saml20-idp-hosted.php
@@ -13,7 +13,7 @@ $metadata['__DYNAMIC:1__'] = array(
 	 */
 	'host' => '__DEFAULT__',
 
-	/* X.509 key and certificate. Relative to the cert directory. */
+	// X.509 key and certificate. Relative to the cert directory.
 	'privatekey' => 'server.pem',
 	'certificate' => 'server.crt',
 
diff --git a/metadata-templates/shib13-idp-hosted.php b/metadata-templates/shib13-idp-hosted.php
index c052f11a71361eeffbec84e827b44549eb96235f..7617fd685ac2309d4492a340d41b56dbfd544959 100644
--- a/metadata-templates/shib13-idp-hosted.php
+++ b/metadata-templates/shib13-idp-hosted.php
@@ -14,7 +14,7 @@ $metadata['__DYNAMIC:1__'] = array(
 	 */
 	'host' => '__DEFAULT__',
 
-	/* X.509 key and certificate. Relative to the cert directory. */
+	// X.509 key and certificate. Relative to the cert directory.
 	'privatekey' => 'server.pem',
 	'certificate' => 'server.crt',
 
diff --git a/modules/adfs/lib/IdP/ADFS.php b/modules/adfs/lib/IdP/ADFS.php
index 8fd9699e8e4e93cd040847fd7c544450274960bd..b33907474a5172e46c58687c2af8e1e0bf77b940 100644
--- a/modules/adfs/lib/IdP/ADFS.php
+++ b/modules/adfs/lib/IdP/ADFS.php
@@ -172,7 +172,7 @@ class sspmod_adfs_IdP_ADFS {
 	
 	public static function receiveLogoutMessage(SimpleSAML_IdP $idp) {
 		// if a redirect is to occur based on wreply, we will redirect to url as
-		// this implies an override to normal sp notification.
+		// this implies an override to normal sp notification
 		if(isset($_GET['wreply']) && !empty($_GET['wreply'])) {
 			$idp->doLogoutRedirect(\SimpleSAML\Utils\HTTP::checkURLAllowed($_GET['wreply']));
 			assert(FALSE);
@@ -183,12 +183,12 @@ class sspmod_adfs_IdP_ADFS {
 		);
 		$assocId = NULL;
 		// TODO: verify that this is really no problem for: 
-		//       a) SSP, because there's no caller SP...
-		//       b) ADFS SP because caller will be called back...
+		//       a) SSP, because there's no caller SP.
+		//       b) ADFS SP because caller will be called back..
 		$idp->handleLogoutRequest($state, $assocId);
 	}
 
-	// accepts an association array, and returns a URL that can be accessed to terminate the association.
+	// accepts an association array, and returns a URL that can be accessed to terminate the association
 	public static function getLogoutURL(SimpleSAML_IdP $idp, array $association, $relayState) {
 		$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 		$idpMetadata = $idp->getConfig();
diff --git a/modules/adfs/www/idp/prp.php b/modules/adfs/www/idp/prp.php
index 58c922269c3156b86b5d946df02d83d8f63f5368..9b5f4b82b05320d23cc38bdd10e548c3433a7945 100644
--- a/modules/adfs/www/idp/prp.php
+++ b/modules/adfs/www/idp/prp.php
@@ -21,8 +21,8 @@ if (isset($_GET['wa'])) {
 	assert('FALSE');		
 } elseif(isset($_GET['assocId'])) {
 	// logout response from ADFS SP
-	$assocId = $_GET['assocId']; /* Association ID of the SP that sent the logout response. */
-	$relayState = $_GET['relayState']; /* Data that was sent in the logout request to the SP. Can be null. */
+	$assocId = $_GET['assocId']; // Association ID of the SP that sent the logout response
+	$relayState = $_GET['relayState']; // Data that was sent in the logout request to the SP. Can be null
 	$logoutError = NULL; /* NULL on success, or an instance of a SimpleSAML_Error_Exception on failure. */
 	$idp->handleLogoutResponse($assocId, $relayState, $logoutError);
 }
diff --git a/modules/authX509/lib/Auth/Process/ExpiryWarning.php b/modules/authX509/lib/Auth/Process/ExpiryWarning.php
index d6c96d2c4a35ecd516661ac8a4b06195845bd632..02e89f86f60bbb3ea54122c20cd4296dbdc7f45b 100644
--- a/modules/authX509/lib/Auth/Process/ExpiryWarning.php
+++ b/modules/authX509/lib/Auth/Process/ExpiryWarning.php
@@ -57,7 +57,7 @@ class sspmod_authX509_Auth_Process_ExpiryWarning extends SimpleSAML_Auth_Process
         assert('is_array($state)');
 
         if (isset($state['isPassive']) && $state['isPassive'] === TRUE) {
-            /* We have a passive request. Skip the warning. */
+            // We have a passive request. Skip the warning
             return;
         }
 
@@ -76,7 +76,7 @@ class sspmod_authX509_Auth_Process_ExpiryWarning extends SimpleSAML_Auth_Process
         $now = time();
         $daysleft = (int)(($validTo - $now) / (24*60*60));
         if ($daysleft > $this->warndaysbefore) {
-            /* We have a certificate that will be valid for some time. Skip the warning. */
+            // We have a certificate that will be valid for some time. Skip the warning
             return;
         }
 
diff --git a/modules/authX509/lib/Auth/Source/X509userCert.php b/modules/authX509/lib/Auth/Source/X509userCert.php
index 182def23eda4e4b05b15e53eabf8172a536f5041..fd4895c78467ada21efaf87bcecd30a0113814ae 100644
--- a/modules/authX509/lib/Auth/Source/X509userCert.php
+++ b/modules/authX509/lib/Auth/Source/X509userCert.php
@@ -126,7 +126,7 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
 		    ($_SERVER['SSL_CLIENT_CERT'] == '')) {
 			$state['authX509.error'] = "NOCERT";
 			$this->authFailed($state);
-			assert('FALSE'); /* NOTREACHED */
+			assert('FALSE'); // NOTREACHED
 			return;
 		}
 
@@ -137,7 +137,7 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
 			$state['authX509.error'] = "INVALIDCERT";
 			$this->authFailed($state);
 
-			assert('FALSE'); /* NOTREACHED */
+			assert('FALSE'); // NOTREACHED
 			return;
 		}
 
diff --git a/modules/authX509/www/expirywarning.php b/modules/authX509/www/expirywarning.php
index 9a6c6cf6ecd0afc78a445d944af4a1677b7066ef..68922f5764e97cbe92df940bf81df5f962a5d07d 100644
--- a/modules/authX509/www/expirywarning.php
+++ b/modules/authX509/www/expirywarning.php
@@ -16,7 +16,7 @@ $state = SimpleSAML_Auth_State::loadState($id, 'warning:expire');
 
 
 if (array_key_exists('proceed', $_REQUEST)) {
-    /* The user has pressed the proceed-button. */
+    // The user has pressed the proceed-button
     SimpleSAML_Auth_ProcessingChain::resumeProcessing($state);
 }
 
diff --git a/modules/authYubiKey/lib/Auth/Source/YubiKey.php b/modules/authYubiKey/lib/Auth/Source/YubiKey.php
index f651a61cc4f9fce8dbab35be33be5de91bfaa0e0..79307f7ea04d7514156da141554a6fc0b514b933 100644
--- a/modules/authYubiKey/lib/Auth/Source/YubiKey.php
+++ b/modules/authYubiKey/lib/Auth/Source/YubiKey.php
@@ -73,7 +73,7 @@ class sspmod_authYubiKey_Auth_Source_YubiKey extends SimpleSAML_Auth_Source {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		if (array_key_exists('id', $config)) {
@@ -97,7 +97,7 @@ class sspmod_authYubiKey_Auth_Source_YubiKey extends SimpleSAML_Auth_Source {
 	public function authenticate(&$state) {
 		assert('is_array($state)');
 
-		/* We are going to need the authId in order to retrieve this authentication source later. */
+		// We are going to need the authId in order to retrieve this authentication source later
 		$state[self::AUTHID] = $this->authId;
 
 		$id = SimpleSAML_Auth_State::saveState($state, self::STAGEID);
diff --git a/modules/authYubiKey/libextinc/Yubico.php b/modules/authYubiKey/libextinc/Yubico.php
index 15cd461d375a15347c21c2c51ecc2e8ce80b49d8..81d584b8b482d56f78709121768f6bfb91542101 100644
--- a/modules/authYubiKey/libextinc/Yubico.php
+++ b/modules/authYubiKey/libextinc/Yubico.php
@@ -105,7 +105,7 @@ class Auth_Yubico
 		return $this->_response;
 	}
 
-	/* TODO? Add functions to get parsed parts of server response? */
+	// TODO? Add functions to get parsed parts of server response?
 
 	/**
 	 * Verify Yubico OTP
@@ -117,7 +117,7 @@ class Auth_Yubico
 	function verify($token)
 	{
 		$parameters = "id=" . $this->_id . "&otp=" . $token;
-		/* Generate signature. */
+		// Generate signature
 		if($this->_key <> "") {
 			$signature = base64_encode(hash_hmac('sha1', $parameters, $this->_key, true));
 			$parameters .= '&h=' . $signature;
diff --git a/modules/authYubiKey/www/yubikeylogin.php b/modules/authYubiKey/www/yubikeylogin.php
index 5dbdb3ef3e8c526e9b96afc505a497d186cd8001..010613c251898120183147ff9d99525a5cb4f00d 100644
--- a/modules/authYubiKey/www/yubikeylogin.php
+++ b/modules/authYubiKey/www/yubikeylogin.php
@@ -21,7 +21,7 @@ if (array_key_exists('otp', $_REQUEST)) {
 }
 
 if (!empty($otp)) {
-	/*  attempt to log in. */
+	// attempt to log in
 	$errorCode = sspmod_authYubiKey_Auth_Source_YubiKey::handleLogin($authStateId, $otp);
 } else {
 	$errorCode = NULL;
diff --git a/modules/authcrypt/lib/Auth/Source/Hash.php b/modules/authcrypt/lib/Auth/Source/Hash.php
index 20f7e29ad061147b784f4953bfcb4390c99231c2..cee4797887836aa08a4fbc2abc93ae4684114b21 100644
--- a/modules/authcrypt/lib/Auth/Source/Hash.php
+++ b/modules/authcrypt/lib/Auth/Source/Hash.php
@@ -29,12 +29,12 @@ class sspmod_authcrypt_Auth_Source_Hash extends sspmod_core_Auth_UserPassBase {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		$this->users = array();
 
-		/* Validate and parse our configuration. */
+		// Validate and parse our configuration
 		foreach ($config as $userpass => $attributes) {
 			if (!is_string($userpass)) {
 				throw new Exception('Invalid <username>:<passwordhash> for authentication source ' .
diff --git a/modules/authcrypt/lib/Auth/Source/Htpasswd.php b/modules/authcrypt/lib/Auth/Source/Htpasswd.php
index 83bdad5e08529a8b4a7cc1cbdb9089e18a1a9302..8fc7d53adc540f586086e574a7ce45f50dbb19a3 100644
--- a/modules/authcrypt/lib/Auth/Source/Htpasswd.php
+++ b/modules/authcrypt/lib/Auth/Source/Htpasswd.php
@@ -27,7 +27,7 @@ class sspmod_authcrypt_Auth_Source_Htpasswd extends sspmod_core_Auth_UserPassBas
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		$this->users = array();
diff --git a/modules/authfacebook/extlibinc/base_facebook.php b/modules/authfacebook/extlibinc/base_facebook.php
index 36a1c6f0c75a1671afea36822a211cdd6ac12a57..86dae4497dceff58e4f6fc6794f1176c0bd3d3f8 100644
--- a/modules/authfacebook/extlibinc/base_facebook.php
+++ b/modules/authfacebook/extlibinc/base_facebook.php
@@ -351,7 +351,7 @@ abstract class BaseFacebook
   public function setExtendedAccessToken() {
     try {
       // need to circumvent json_decode by calling _oauthRequest
-      // directly, since response isn't JSON format.
+      // directly, since response isn't JSON format
       $access_token_response = $this->_oauthRequest(
         $this->getUrl('graph', '/oauth/access_token'),
         $params = array(
@@ -363,8 +363,8 @@ abstract class BaseFacebook
       );
     }
     catch (FacebookApiException $e) {
-      // most likely that user very recently revoked authorization.
-      // In any event, we don't have an access token, so say so.
+      // most likely that user very recently revoked authorization
+      // In any event, we don't have an access token, so say so
       return false;
     }
 
@@ -403,7 +403,7 @@ abstract class BaseFacebook
 
     // first establish access token to be the application
     // access token, in case we navigate to the /oauth/access_token
-    // endpoint, where SOME access token is required.
+    // endpoint, where SOME access token is required
     $this->setAccessToken($this->getApplicationAccessToken());
     $user_access_token = $this->getUserAccessToken();
     if ($user_access_token) {
@@ -424,9 +424,9 @@ abstract class BaseFacebook
    *                could not be determined.
    */
   protected function getUserAccessToken() {
-    // first, consider a signed request if it's supplied.
+    // first, consider a signed request if it's supplied
     // if there is a signed request, then it alone determines
-    // the access token.
+    // the access token
     $signed_request = $this->getSignedRequest();
     if ($signed_request) {
       // apps.facebook.com hands the access_token in the signed_request
@@ -453,7 +453,7 @@ abstract class BaseFacebook
       }
 
       // signed request states there's no access token, so anything
-      // stored should be cleared.
+      // stored should be cleared
       $this->clearAllPersistentData();
       return false; // respect the signed request's data, even
                     // if there's an authorization code or something else
@@ -468,7 +468,7 @@ abstract class BaseFacebook
         return $access_token;
       }
 
-      // code was bogus, so everything based on it should be invalidated.
+      // code was bogus, so everything based on it should be invalidated
       $this->clearAllPersistentData();
       return false;
     }
@@ -507,7 +507,7 @@ abstract class BaseFacebook
    */
   public function getUser() {
     if ($this->user !== null) {
-      // we've already determined this and cached the value.
+      // we've already determined this and cached the value
       return $this->user;
     }
 
@@ -524,7 +524,7 @@ abstract class BaseFacebook
    */
   protected function getUserFromAvailableData() {
     // if a signed request is supplied, then it solely determines
-    // who the user is.
+    // who the user is
     $signed_request = $this->getSignedRequest();
     if ($signed_request) {
       if (array_key_exists('user_id', $signed_request)) {
@@ -539,7 +539,7 @@ abstract class BaseFacebook
       }
 
       // if the signed request didn't present a user id, then invalidate
-      // all entries in any persistent store.
+      // all entries in any persistent store
       $this->clearAllPersistentData();
       return 0;
     }
@@ -548,7 +548,7 @@ abstract class BaseFacebook
     $persisted_access_token = $this->getPersistentData('access_token');
 
     // use access_token to fetch user id if we have a user access_token, or if
-    // the cached access token has changed.
+    // the cached access token has changed
     $access_token = $this->getAccessToken();
     if ($access_token &&
         $access_token != $this->getApplicationAccessToken() &&
@@ -646,7 +646,7 @@ abstract class BaseFacebook
    *
    * @return mixed The decoded response
    */
-  public function api(/* polymorphic */) {
+  public function api(// apache + variants specific way of checking for https) {
     $args = func_get_args();
     if (is_array($args[0])) {
       return $this->_restserver($args[0]);
@@ -771,7 +771,7 @@ abstract class BaseFacebook
 
     try {
       // need to circumvent json_decode by calling _oauthRequest
-      // directly, since response isn't JSON format.
+      // directly, since response isn't JSON format
       $access_token_response =
         $this->_oauthRequest(
           $this->getUrl('graph', '/oauth/access_token'),
@@ -934,7 +934,7 @@ abstract class BaseFacebook
     $opts[CURLOPT_URL] = $url;
 
     // disable the 'Expect: 100-continue' behaviour. This causes CURL to wait
-    // for 2 seconds if the server does not support this header.
+    // for 2 seconds if the server does not support this header
     if (isset($opts[CURLOPT_HTTPHEADER])) {
       $existing_headers = $opts[CURLOPT_HTTPHEADER];
       $existing_headers[] = 'Expect:';
@@ -958,7 +958,7 @@ abstract class BaseFacebook
     // have IPv6 enabled but not have IPv6 connectivity.  If this is
     // the case, curl will try IPv4 first and if that fails, then it will
     // fall back to IPv6 and the error EHOSTUNREACH is returned by the
-    // operating system.
+    // operating system
     if ($result === false && empty($opts[CURLOPT_IPRESOLVE])) {
         $matches = array();
         $regex = '/Failed to connect to ([^:].*): Network is unreachable/';
diff --git a/modules/authfacebook/lib/Auth/Source/Facebook.php b/modules/authfacebook/lib/Auth/Source/Facebook.php
index 587189056e7c62daa60d205cd22c9bdde1c334e2..37b5698208523f1fd48dff6020e5e6170542aefc 100644
--- a/modules/authfacebook/lib/Auth/Source/Facebook.php
+++ b/modules/authfacebook/lib/Auth/Source/Facebook.php
@@ -49,7 +49,7 @@ class sspmod_authfacebook_Auth_Source_Facebook extends SimpleSAML_Auth_Source {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		$cfgParse = SimpleSAML_Configuration::loadFromArray($config, 'authsources[' . var_export($this->authId, TRUE) . ']');
@@ -68,7 +68,7 @@ class sspmod_authfacebook_Auth_Source_Facebook extends SimpleSAML_Auth_Source {
 	public function authenticate(&$state) {
 		assert('is_array($state)');
 
-		/* We are going to need the authId in order to retrieve this authentication source later. */
+		// We are going to need the authId in order to retrieve this authentication source later
 		$state[self::AUTHID] = $this->authId;
 		$stateID = SimpleSAML_Auth_State::saveState($state, self::STAGE_INIT);
 		
diff --git a/modules/authfacebook/lib/Facebook.php b/modules/authfacebook/lib/Facebook.php
index 04d47e2bfeb8345e7e03ef2b69d716e3d140d055..d3b329247515b1bb10c4baa4c04110fda3ea920d 100644
--- a/modules/authfacebook/lib/Facebook.php
+++ b/modules/authfacebook/lib/Facebook.php
@@ -11,13 +11,13 @@ class sspmod_authfacebook_Facebook extends BaseFacebook
   const FBSS_COOKIE_NAME = 'fbss';
 
   // We can set this to a high number because the main session
-  // expiration will trump this.
+  // expiration will trump this
   const FBSS_COOKIE_EXPIRE = 31556926; // 1 year
 
-  // Stores the shared session ID if one is set.
+  // Stores the shared session ID if one is set
   protected $sharedSessionID;
 
-  /* SimpleSAMLPhp state array */
+  // SimpleSAMLphp state array
   protected $ssp_state;
 
   /**
diff --git a/modules/authfacebook/www/linkback.php b/modules/authfacebook/www/linkback.php
index aed4404c76f870eb210d89e5b30958bf633e003a..6ca8855bcc9c5d22dacb518933970861dd28412f 100644
--- a/modules/authfacebook/www/linkback.php
+++ b/modules/authfacebook/www/linkback.php
@@ -9,7 +9,7 @@ if (!array_key_exists('AuthState', $_REQUEST) || empty($_REQUEST['AuthState']))
 }
 $state = SimpleSAML_Auth_State::loadState($_REQUEST['AuthState'], sspmod_authfacebook_Auth_Source_Facebook::STAGE_INIT);
 
-/* Find authentication source. */
+// Find authentication source
 if (!array_key_exists(sspmod_authfacebook_Auth_Source_Facebook::AUTHID, $state)) {
 	throw new SimpleSAML_Error_BadRequest('No data in state for ' . sspmod_authfacebook_Auth_Source_Facebook::AUTHID);
 }
diff --git a/modules/authlinkedin/lib/Auth/Source/LinkedIn.php b/modules/authlinkedin/lib/Auth/Source/LinkedIn.php
index 73f4b2e85e676d1c64964b5094ad322e76e7b60b..3a5dbabb291e7cad43491a5bd19c241eac0cfcbb 100644
--- a/modules/authlinkedin/lib/Auth/Source/LinkedIn.php
+++ b/modules/authlinkedin/lib/Auth/Source/LinkedIn.php
@@ -34,7 +34,7 @@ class sspmod_authlinkedin_Auth_Source_LinkedIn extends SimpleSAML_Auth_Source {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		if (!array_key_exists('key', $config))
@@ -58,7 +58,7 @@ class sspmod_authlinkedin_Auth_Source_LinkedIn extends SimpleSAML_Auth_Source {
 	public function authenticate(&$state) {
 		assert('is_array($state)');
 
-		/* We are going to need the authId in order to retrieve this authentication source later. */
+		// We are going to need the authId in order to retrieve this authentication source later
 		$state[self::AUTHID] = $this->authId;
 
 		$stateID = SimpleSAML_Auth_State::getStateId($state);
@@ -97,7 +97,7 @@ class sspmod_authlinkedin_Auth_Source_LinkedIn extends SimpleSAML_Auth_Source {
 		SimpleSAML_Logger::debug("Got an access token from the OAuth service provider [" .
 			$accessToken->key . "] with the secret [" . $accessToken->secret . "]");
 
-		// TODO: configure attributes (http://developer.linkedin.com/docs/DOC-1061) from config? Limited options via LinkedIn.
+		// TODO: configure attributes (http://developer.linkedin.com/docs/DOC-1061) from config? Limited options via LinkedIn
 		$userdata = $consumer->getUserInfo('https://api.linkedin.com/v1/people/~:(id,first-name,last-name,headline,summary,specialties,picture-url)', $accessToken, array('http' => array('header' => 'x-li-format: json')));
 
 		$attributes = array();
diff --git a/modules/authlinkedin/www/linkback.php b/modules/authlinkedin/www/linkback.php
index 8a6c6f4fd8454bf76771f3063d236ddbb4ed1848..85084dffe6e92fd11e993f4f38fe032d11d72679 100644
--- a/modules/authlinkedin/www/linkback.php
+++ b/modules/authlinkedin/www/linkback.php
@@ -16,7 +16,7 @@ if (array_key_exists('oauth_verifier', $_REQUEST)) {
 	throw new Exception('OAuth verifier not returned.');;
 }
 
-/* Find authentication source. */
+// Find authentication source
 assert('array_key_exists(sspmod_authlinkedin_Auth_Source_LinkedIn::AUTHID, $state)');
 $sourceId = $state[sspmod_authlinkedin_Auth_Source_LinkedIn::AUTHID];
 
diff --git a/modules/authmyspace/lib/Auth/Source/MySpace.php b/modules/authmyspace/lib/Auth/Source/MySpace.php
index 1c1624ccb1ad3bbd50183ed874630a89229c86d1..4e35a9e9458817161db9f94a51ce4e8b28a1119d 100644
--- a/modules/authmyspace/lib/Auth/Source/MySpace.php
+++ b/modules/authmyspace/lib/Auth/Source/MySpace.php
@@ -34,7 +34,7 @@ class sspmod_authmyspace_Auth_Source_MySpace extends SimpleSAML_Auth_Source {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		if (!array_key_exists('key', $config))
@@ -57,7 +57,7 @@ class sspmod_authmyspace_Auth_Source_MySpace extends SimpleSAML_Auth_Source {
 	public function authenticate(&$state) {
 		assert('is_array($state)');
 
-		/* We are going to need the authId in order to retrieve this authentication source later. */
+		// We are going to need the authId in order to retrieve this authentication source later
 		$state[self::AUTHID] = $this->authId;
 
 		$consumer = new sspmod_oauth_Consumer($this->key, $this->secret);
diff --git a/modules/authmyspace/www/linkback.php b/modules/authmyspace/www/linkback.php
index da78d125b89f6e67e81161f2aa0cd9c023c255f9..9c530c11335613d392e10e678c1e7dbd01ae4775 100644
--- a/modules/authmyspace/www/linkback.php
+++ b/modules/authmyspace/www/linkback.php
@@ -27,7 +27,7 @@ if (array_key_exists('oauth_verifier', $_REQUEST)) {
 	throw new Exception('OAuth verifier not returned.');;
 }
 
-/* Find authentication source. */
+// Find authentication source
 assert('array_key_exists(sspmod_authmyspace_Auth_Source_MySpace::AUTHID, $state)');
 $sourceId = $state[sspmod_authmyspace_Auth_Source_MySpace::AUTHID];
 
diff --git a/modules/authorize/lib/Auth/Process/Authorize.php b/modules/authorize/lib/Auth/Process/Authorize.php
index 60c37ece410c22ef9240bf62bac17752109606dd..6b7fc2a25c637be8038c85ba2ae9a24f12ef9d3a 100644
--- a/modules/authorize/lib/Auth/Process/Authorize.php
+++ b/modules/authorize/lib/Auth/Process/Authorize.php
@@ -123,7 +123,7 @@ class sspmod_authorize_Auth_Process_Authorize extends SimpleSAML_Auth_Processing
 	 * @param array $request
 	 */
 	protected function unauthorized(&$request) {
-		/* Save state and redirect to 403 page. */
+		// Save state and redirect to 403 page
 		$id = SimpleSAML_Auth_State::saveState($request,
 			'authorize:Authorize');
 		$url = SimpleSAML_Module::getModuleURL(
diff --git a/modules/authtwitter/lib/Auth/Source/Twitter.php b/modules/authtwitter/lib/Auth/Source/Twitter.php
index e5cf9438772ad4266de14dcc89158743c7d0a2ed..76287b7bfa9a4c6839b2c4f2298a7db55790acb1 100644
--- a/modules/authtwitter/lib/Auth/Source/Twitter.php
+++ b/modules/authtwitter/lib/Auth/Source/Twitter.php
@@ -35,7 +35,7 @@ class sspmod_authtwitter_Auth_Source_Twitter extends SimpleSAML_Auth_Source {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		$configObject = SimpleSAML_Configuration::loadFromArray($config, 'authsources[' . var_export($this->authId, TRUE) . ']');
@@ -54,7 +54,7 @@ class sspmod_authtwitter_Auth_Source_Twitter extends SimpleSAML_Auth_Source {
 	public function authenticate(&$state) {
 		assert('is_array($state)');
 
-		/* We are going to need the authId in order to retrieve this authentication source later. */
+		// We are going to need the authId in order to retrieve this authentication source later
 		$state[self::AUTHID] = $this->authId;
 		
 		$stateID = SimpleSAML_Auth_State::saveState($state, self::STAGE_INIT);
diff --git a/modules/authtwitter/www/linkback.php b/modules/authtwitter/www/linkback.php
index 5afca477d969f52c564a6d3f3f087d7a0decb553..2886f8d9aea04f9565d6e1082a049c7db03bcc3c 100644
--- a/modules/authtwitter/www/linkback.php
+++ b/modules/authtwitter/www/linkback.php
@@ -9,7 +9,7 @@ if (!array_key_exists('AuthState', $_REQUEST) || empty($_REQUEST['AuthState']))
 }
 $state = SimpleSAML_Auth_State::loadState($_REQUEST['AuthState'], sspmod_authtwitter_Auth_Source_Twitter::STAGE_INIT);
 
-/* Find authentication source. */
+// Find authentication source
 if (!array_key_exists(sspmod_authtwitter_Auth_Source_Twitter::AUTHID, $state)) {
 	throw new SimpleSAML_Error_BadRequest('No data in state for ' . sspmod_authtwitter_Auth_Source_Twitter::AUTHID);
 }
diff --git a/modules/authwindowslive/lib/Auth/Source/LiveID.php b/modules/authwindowslive/lib/Auth/Source/LiveID.php
index 177d362d6c781e1328b3ad75ebbe2907c54b795f..68c1a26250b84e1c84ee83a78f2bd8c1c4567d94 100644
--- a/modules/authwindowslive/lib/Auth/Source/LiveID.php
+++ b/modules/authwindowslive/lib/Auth/Source/LiveID.php
@@ -32,7 +32,7 @@ class sspmod_authwindowslive_Auth_Source_LiveID extends SimpleSAML_Auth_Source {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		if (!array_key_exists('key', $config))
@@ -55,7 +55,7 @@ class sspmod_authwindowslive_Auth_Source_LiveID extends SimpleSAML_Auth_Source {
 	public function authenticate(&$state) {
 		assert('is_array($state)');
 
-		/* We are going to need the authId in order to retrieve this authentication source later. */
+		// We are going to need the authId in order to retrieve this authentication source later
 		$state[self::AUTHID] = $this->authId;
 
 		$stateID = SimpleSAML_Auth_State::saveState($state, self::STAGE_INIT);
diff --git a/modules/authwindowslive/www/linkback.php b/modules/authwindowslive/www/linkback.php
index d2d1d077ac92de1abcf01795504d2f3a5d61ba5e..fcfd3d66e6cf08248bb84ab5192fed60a390110d 100644
--- a/modules/authwindowslive/www/linkback.php
+++ b/modules/authwindowslive/www/linkback.php
@@ -30,7 +30,7 @@ if (array_key_exists('wrap_verification_code', $_REQUEST)) {
 	throw new Exception('Authentication failed: [' . $_REQUEST['error_code'] . '] ' . $_REQUEST['wrap_error_reason']);
 }
 
-/* Find authentication source. */
+// Find authentication source
 assert('array_key_exists(sspmod_authwindowslive_Auth_Source_LiveID::AUTHID, $state)');
 $sourceId = $state[sspmod_authwindowslive_Auth_Source_LiveID::AUTHID];
 
diff --git a/modules/cas/lib/Auth/Source/CAS.php b/modules/cas/lib/Auth/Source/CAS.php
index 052886af8da459e08402b1d6ca15239fefb91abc..7677bbb218731421a64df2ac8ca7741d7129fd99 100644
--- a/modules/cas/lib/Auth/Source/CAS.php
+++ b/modules/cas/lib/Auth/Source/CAS.php
@@ -51,7 +51,7 @@ class sspmod_cas_Auth_Source_CAS  extends SimpleSAML_Auth_Source  {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		if (!array_key_exists('cas', $config)){
@@ -196,7 +196,7 @@ class sspmod_cas_Auth_Source_CAS  extends SimpleSAML_Auth_Source  {
 	public function authenticate(&$state) {
 		assert('is_array($state)');
 
-		/* We are going to need the authId in order to retrieve this authentication source later. */
+		// We are going to need the authId in order to retrieve this authentication source later
 		$state[self::AUTHID] = $this->authId;
 
 		$stateID = SimpleSAML_Auth_State::saveState($state, self::STAGE_INIT);
diff --git a/modules/cas/www/linkback.php b/modules/cas/www/linkback.php
index 3f87b7b6f392b97acc82e5bf47759dfee5fcc57f..c32ba477cd7647fab1b8c2f1200888418ab388c3 100644
--- a/modules/cas/www/linkback.php
+++ b/modules/cas/www/linkback.php
@@ -14,7 +14,7 @@ if (!isset($_GET['ticket'])) {
 }
 $state['cas:ticket'] = (string)$_GET['ticket'];
 
-/* Find authentication source. */
+// Find authentication source
 assert('array_key_exists(sspmod_cas_Auth_Source_CAS::AUTHID, $state)');
 $sourceId = $state[sspmod_cas_Auth_Source_CAS::AUTHID];
 
diff --git a/modules/casserver/www/serviceValidate.php b/modules/casserver/www/serviceValidate.php
index 7cdb345959cb841efc9457109adaaca023429b7d..cf4bd0af22c7d00bf416c458369cfb2d32bf1ea4 100644
--- a/modules/casserver/www/serviceValidate.php
+++ b/modules/casserver/www/serviceValidate.php
@@ -21,7 +21,7 @@ if (array_key_exists('service', $_GET)) {
 }
 
 try {
-/* Load SimpleSAMLphp, configuration and metadata */
+// Load SimpleSAMLphp, configuration and metadata
 	$casconfig = SimpleSAML_Configuration::getConfig('module_casserver.php');
 	
 	$path = $casconfig->resolvePath($casconfig->getValue('ticketcache', 'ticketcache'));
diff --git a/modules/cdc/lib/Auth/Process/CDC.php b/modules/cdc/lib/Auth/Process/CDC.php
index 99201f6d2f082199efb4535bcd4a7e052cadd95e..406b03736b158a4f07ad416e6a7e85395383f8f0 100644
--- a/modules/cdc/lib/Auth/Process/CDC.php
+++ b/modules/cdc/lib/Auth/Process/CDC.php
@@ -56,7 +56,7 @@ class sspmod_cdc_Auth_Process_CDC extends SimpleSAML_Auth_ProcessingFilter {
 			return;
 		}
 
-		/* Save state and build request. */
+		// Save state and build request
 		$id = SimpleSAML_Auth_State::saveState($state, 'cdc:resume');
 
 		$returnTo = SimpleSAML_Module::getModuleURL('cdc/resume.php', array('domain' => $this->domain));
diff --git a/modules/cdc/lib/Server.php b/modules/cdc/lib/Server.php
index ec133e1d90f5f8454b0ffa4f02c47b6693d5b3af..97371ee2eb300780d38f8c4c65f8ca6d473a0f43 100644
--- a/modules/cdc/lib/Server.php
+++ b/modules/cdc/lib/Server.php
@@ -362,7 +362,7 @@ class sspmod_cdc_Server {
 		foreach ($ret as &$idp) {
 			$idp = base64_decode($idp);
 			if ($idp === FALSE) {
-				/* Not properly base64 encoded. */
+				// Not properly base64 encoded
 				SimpleSAML_Logger::warning('CDC - Invalid base64-encoding of CDC entry.');
 				return array();
 			}
@@ -387,7 +387,7 @@ class sspmod_cdc_Server {
 		$cookie = implode(' ', $list);
 
 		while (strlen($cookie) > 4000) {
-			/* The cookie is too long. Remove the oldest elements until it is short enough. */
+			// The cookie is too long. Remove the oldest elements until it is short enough
 			$tmp = explode(' ', $cookie, 2);
 			if (count($tmp) === 1) {
 				/*
diff --git a/modules/consent/lib/Consent/Store/Cookie.php b/modules/consent/lib/Consent/Store/Cookie.php
index 97dfcf699da3b51ebc532dd4226037e3fe3c1b25..11aece09902a7840b0adabb59a250d7c748077c4 100644
--- a/modules/consent/lib/Consent/Store/Cookie.php
+++ b/modules/consent/lib/Consent/Store/Cookie.php
@@ -273,7 +273,7 @@ class sspmod_consent_Consent_Store_Cookie extends sspmod_consent_Store
         );
 
         if (\SimpleSAML\Utils\HTTP::isHTTPS()) {
-            /* Enable secure cookie for https-requests. */
+            // Enable secure cookie for https-requests
             $params['secure'] = true;
         } else {
             $params['secure'] = false;
diff --git a/modules/consent/lib/Consent/Store/Database.php b/modules/consent/lib/Consent/Store/Database.php
index b6eaabb145e5564c85ac3b974f0cf114ab751637..4f24707b7fe492a941d00a8d0bce1c77a5788674 100644
--- a/modules/consent/lib/Consent/Store/Database.php
+++ b/modules/consent/lib/Consent/Store/Database.php
@@ -194,7 +194,7 @@ class sspmod_consent_Consent_Store_Database extends sspmod_consent_Store
         assert('is_string($destinationId)');
         assert('is_string($attributeSet)');
 
-        /* Check for old consent (with different attribute set). */
+        // Check for old consent (with different attribute set)
         $st = $this->_execute(
             'UPDATE ' . $this->_table . ' ' .
             'SET consent_date = ' . $this->_dateTime . ', usage_date = ' . $this->_dateTime . ', attribute = ? ' .
diff --git a/modules/consent/www/getconsent.php b/modules/consent/www/getconsent.php
index d17bd3b8765c7a95e999235d758d73f8ce70042d..79fe3ce71f481e09cd326f42abeaf41e82109134 100644
--- a/modules/consent/www/getconsent.php
+++ b/modules/consent/www/getconsent.php
@@ -61,7 +61,7 @@ if (array_key_exists('yes', $_REQUEST)) {
         && array_key_exists('saveconsent', $_REQUEST)
         && $_REQUEST['saveconsent'] === '1'
     ) {
-        /* Save consent. */
+        // Save consent
         $store = $state['consent:store'];
         $userId = $state['consent:store.userId'];
         $targetedId = $state['consent:store.destination'];
diff --git a/modules/consentAdmin/config-templates/module_consentAdmin.php b/modules/consentAdmin/config-templates/module_consentAdmin.php
index 041756554e0ba2083b311ebe9143778e7542b3ff..418065c14ec2ddb421cc9809a0ce39a8156693da 100644
--- a/modules/consentAdmin/config-templates/module_consentAdmin.php
+++ b/modules/consentAdmin/config-templates/module_consentAdmin.php
@@ -19,7 +19,7 @@ $config = array(
 	// Hash attributes including values or not
 	'attributes.hash' => TRUE,
 
-	// Where to direct the user after logout.
+	// Where to direct the user after logout
     // REMEMBER to prefix with http:// otherwise the relaystate is only appended 
     // to saml2 logout URL
 	'returnURL' => 'http://www.wayf.dk',
diff --git a/modules/consentAdmin/www/consentAdmin.php b/modules/consentAdmin/www/consentAdmin.php
index f277feb3ee3c395b972c7d66d972a160a96f8feb..717fa3c28c7971446afc74776f2002aa834d44b4 100644
--- a/modules/consentAdmin/www/consentAdmin.php
+++ b/modules/consentAdmin/www/consentAdmin.php
@@ -61,7 +61,7 @@ function driveProcessingChain(
     SimpleSAML_Logger::info('consentAdmin: target: '.$targeted_id);
     SimpleSAML_Logger::info('consentAdmin: attribute: '.$attribute_hash);
 
-    /* Return values */
+    // Return values
     return array($targeted_id, $attribute_hash, $attributes);
 }
 
@@ -80,7 +80,7 @@ if (array_key_exists('logout', $_REQUEST)) {
 
 $hashAttributes = $cA_config->getValue('attributes.hash');
 
-/* Check if valid local session exists */
+// Check if valid local session exists
 $as->requireAuth();
 
 // Get released attributes
diff --git a/modules/core/lib/ACL.php b/modules/core/lib/ACL.php
index 8cb444538085265fc3272bcc3b28e59b5be07944..fcfa7ecadc238ec34d9b5403b849098750940f93 100644
--- a/modules/core/lib/ACL.php
+++ b/modules/core/lib/ACL.php
@@ -99,7 +99,7 @@ class sspmod_core_ACL {
 
 		$op = array_shift($rule);
 		if ($op === NULL) {
-			/* An empty rule always matches. */
+			// An empty rule always matches
 			return TRUE;
 		}
 
@@ -139,7 +139,7 @@ class sspmod_core_ACL {
 			}
 		}
 
-		/* All matches. */
+		// All matches
 		return TRUE;
 	}
 
diff --git a/modules/core/lib/Auth/Process/AttributeLimit.php b/modules/core/lib/Auth/Process/AttributeLimit.php
index 71b882e22dd97e68a5e7d3f6f78cb5830a8cf5ca..46d664bc1f0f9221d1ea727a6b4a7d86cf2af79b 100644
--- a/modules/core/lib/Auth/Process/AttributeLimit.php
+++ b/modules/core/lib/Auth/Process/AttributeLimit.php
@@ -65,11 +65,11 @@ class sspmod_core_Auth_Process_AttributeLimit extends SimpleSAML_Auth_Processing
 	private static function getSPIdPAllowed(array &$request) {
 
 		if (array_key_exists('attributes', $request['Destination'])) {
-			/* SP Config. */
+			// SP Config
 			return $request['Destination']['attributes'];
 		}
 		if (array_key_exists('attributes', $request['Source'])) {
-			/* IdP Config. */
+			// IdP Config
 			return $request['Source']['attributes'];
 		}
 		return NULL;
diff --git a/modules/core/lib/Auth/Process/AttributeMap.php b/modules/core/lib/Auth/Process/AttributeMap.php
index 335d73f0d83b06607b12db18e916694a0561e319..e4ee73621453a060723424daba7c016626dc3388 100644
--- a/modules/core/lib/Auth/Process/AttributeMap.php
+++ b/modules/core/lib/Auth/Process/AttributeMap.php
@@ -35,7 +35,7 @@ class sspmod_core_Auth_Process_AttributeMap extends SimpleSAML_Auth_ProcessingFi
 				if($newName === '%duplicate') {
 					$this->duplicate = TRUE;
 				} else {
-					/* No index given - this is a map file. */
+					// No index given - this is a map file
 					$mapFiles[] = $newName;
 				}
 				continue;
diff --git a/modules/core/lib/Auth/Process/ExtendIdPSession.php b/modules/core/lib/Auth/Process/ExtendIdPSession.php
index 7a6df577753515f08e23373e48af6da510055106..3945741189f1c4157403857b7a432cf28e4edb14 100644
--- a/modules/core/lib/Auth/Process/ExtendIdPSession.php
+++ b/modules/core/lib/Auth/Process/ExtendIdPSession.php
@@ -18,12 +18,12 @@ class sspmod_core_Auth_Process_ExtendIdPSession extends SimpleSAML_Auth_Processi
 		$globalConfig = SimpleSAML_Configuration::getInstance();
 		$sessionDuration = $globalConfig->getInteger('session.duration', 8*60*60);
 
-		/* Extend only if half of session duration already passed */
+		// Extend only if half of session duration already passed
 		if ($delta >= ($sessionDuration * 0.5)) {
 			return;
 		}
 
-		/* Update authority expire time */
+		// Update authority expire time
 		$session = SimpleSAML_Session::getSessionFromRequest();
 		$session->setAuthorityExpire($state['Authority']);
 
diff --git a/modules/core/lib/Auth/Process/GenerateGroups.php b/modules/core/lib/Auth/Process/GenerateGroups.php
index 097481c62d913696aeffe3cef8fc6470cec679ae..35cbc9f99a01d92c84ab7ab4001ae98464f87d54 100644
--- a/modules/core/lib/Auth/Process/GenerateGroups.php
+++ b/modules/core/lib/Auth/Process/GenerateGroups.php
@@ -27,7 +27,7 @@ class sspmod_core_Auth_Process_GenerateGroups extends SimpleSAML_Auth_Processing
 		assert('is_array($config)');
 
 		if (count($config) === 0) {
-			/* Use default groups. */
+			// Use default groups
 			$this->generateGroupsFrom = array(
 				'eduPersonAffiliation',
 				'eduPersonOrgUnitDN',
@@ -35,7 +35,7 @@ class sspmod_core_Auth_Process_GenerateGroups extends SimpleSAML_Auth_Processing
 			);
 
 		} else {
-			/* Validate configuration. */
+			// Validate configuration
 			foreach ($config as $attributeName) {
 				if (!is_string($attributeName)) {
 					throw new Exception('Invalid attribute name for core:GenerateGroups filter: ' .
diff --git a/modules/core/lib/Auth/Process/LanguageAdaptor.php b/modules/core/lib/Auth/Process/LanguageAdaptor.php
index cf9b3d25c94d2e721b1c05b2c2d193ea85139e3e..347a1fd4a0bc4b0ce303a2d4662a80d986517fdf 100644
--- a/modules/core/lib/Auth/Process/LanguageAdaptor.php
+++ b/modules/core/lib/Auth/Process/LanguageAdaptor.php
@@ -54,10 +54,10 @@ class sspmod_core_Auth_Process_LanguageAdaptor extends SimpleSAML_Auth_Processin
 
 
 		if (isset($attrlang) && !isset($lang)) {
-			/* Language set in attribute but not in cookie - update cookie. */
+			// Language set in attribute but not in cookie - update cookie
 			SimpleSAML_XHTML_Template::setLanguageCookie($attrlang);
 		} elseif (!isset($attrlang) && isset($lang)) {
-			/* Language set in cookie, but not in attribute. Update attribute. */
+			// Language set in cookie, but not in attribute. Update attribute
 			$request['Attributes'][$this->langattr] = array($lang);
 		}
 
diff --git a/modules/core/lib/Auth/Process/ScopeAttribute.php b/modules/core/lib/Auth/Process/ScopeAttribute.php
index 55052d1372e9161c232062c84f42ab52c43868e3..9c8c571ac40107b25074d5d774c68475f1d413cd 100644
--- a/modules/core/lib/Auth/Process/ScopeAttribute.php
+++ b/modules/core/lib/Auth/Process/ScopeAttribute.php
@@ -83,7 +83,7 @@ class sspmod_core_Auth_Process_ScopeAttribute extends SimpleSAML_Auth_Processing
 				$value = $value . '@' . $scope;
 
 				if (in_array($value, $attributes[$this->targetAttribute], TRUE)) {
-					/* Already present. */
+					// Already present
 					continue;
 				}
 
diff --git a/modules/core/lib/Auth/Process/ScopeFromAttribute.php b/modules/core/lib/Auth/Process/ScopeFromAttribute.php
index 1693130fc1c1331a58090720d965cce731603a4e..cc0b92c6f287709673c2381fad210321302963c1 100644
--- a/modules/core/lib/Auth/Process/ScopeFromAttribute.php
+++ b/modules/core/lib/Auth/Process/ScopeFromAttribute.php
@@ -43,7 +43,7 @@ class sspmod_core_Auth_Process_ScopeFromAttribute extends SimpleSAML_Auth_Proces
 		$config = SimpleSAML_Configuration::loadFromArray($config, 'ScopeFromAttribute');
 		$this->targetAttribute = $config->getString('targetAttribute');
 		$this->sourceAttribute = $config->getString('sourceAttribute');
-	} /* end constructor */
+	} // end constructor
 
 
 	/**
@@ -61,7 +61,7 @@ class sspmod_core_Auth_Process_ScopeFromAttribute extends SimpleSAML_Auth_Proces
 			return;
 		}
 
-		/* will not overwrite existing attribute */
+		// will not overwrite existing attribute
 		if (isset($attributes[$this->targetAttribute])) {
 			return;
 		}
diff --git a/modules/core/lib/Auth/Process/StatisticsWithAttribute.php b/modules/core/lib/Auth/Process/StatisticsWithAttribute.php
index 3151d92e4e4750304ff0774159db8b1a9ea419b3..32e1bf4a620c8eef57c82da7028a97164e137a97 100644
--- a/modules/core/lib/Auth/Process/StatisticsWithAttribute.php
+++ b/modules/core/lib/Auth/Process/StatisticsWithAttribute.php
@@ -75,7 +75,7 @@ class sspmod_core_Auth_Process_StatisticsWithAttribute extends SimpleSAML_Auth_P
 		}
 
 		if (!array_key_exists('PreviousSSOTimestamp', $state)) {
-			/* The user hasn't authenticated with this SP earlier in this session. */
+			// The user hasn't authenticated with this SP earlier in this session
 			SimpleSAML_Logger::stats($this->typeTag . '-first ' . $dest . ' ' . $source . ' ' . $logAttribute);
 		}
 
diff --git a/modules/core/lib/Auth/Process/TargetedID.php b/modules/core/lib/Auth/Process/TargetedID.php
index a42660c189179a62c0983e3d38357062eea2d206..4c9dea90946b4408a3acc5d6444d8865d536def0 100644
--- a/modules/core/lib/Auth/Process/TargetedID.php
+++ b/modules/core/lib/Auth/Process/TargetedID.php
@@ -123,7 +123,7 @@ class sspmod_core_Auth_Process_TargetedID extends SimpleSAML_Auth_ProcessingFilt
 		$uid = hash('sha1', $uidData);
 
 		if ($this->generateNameId) {
-			/* Convert the targeted ID to a SAML 2.0 name identifier element. */
+			// Convert the targeted ID to a SAML 2.0 name identifier element
 			$nameId = array(
 				'Format' => SAML2_Const::NAMEID_PERSISTENT,
 				'Value' => $uid,
diff --git a/modules/core/lib/Auth/Process/WarnShortSSOInterval.php b/modules/core/lib/Auth/Process/WarnShortSSOInterval.php
index 8adf492c25d8feeab517a5182bae0389925c3510..615619e3d231c214d331636a28789d74fc51a356 100644
--- a/modules/core/lib/Auth/Process/WarnShortSSOInterval.php
+++ b/modules/core/lib/Auth/Process/WarnShortSSOInterval.php
@@ -28,7 +28,7 @@ class sspmod_core_Auth_Process_WarnShortSSOInterval extends SimpleSAML_Auth_Proc
 
 		$timeDelta = time() - $state['PreviousSSOTimestamp'];
 		if ($timeDelta >= 10) {
-			/* At least 10 seconds since last attempt. */
+			// At least 10 seconds since last attempt
 			return;
 		}
 
@@ -43,7 +43,7 @@ class sspmod_core_Auth_Process_WarnShortSSOInterval extends SimpleSAML_Auth_Proc
 			' seconds since last SSO for this user from the SP ' .
 			var_export($entityId, TRUE));
 
-		/* Save state and redirect. */
+		// Save state and redirect
 		$id = SimpleSAML_Auth_State::saveState($state, 'core:short_sso_interval');
 		$url = SimpleSAML_Module::getModuleURL('core/short_sso_interval.php');
 		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id));
diff --git a/modules/core/lib/Auth/Source/AdminPassword.php b/modules/core/lib/Auth/Source/AdminPassword.php
index 9ce8e0dd3205a18038ee3e3d0fcc57ad97b9c825..7059ecbb1317b3b630f2be705254965dce9efdae 100644
--- a/modules/core/lib/Auth/Source/AdminPassword.php
+++ b/modules/core/lib/Auth/Source/AdminPassword.php
@@ -19,7 +19,7 @@ class sspmod_core_Auth_Source_AdminPassword extends sspmod_core_Auth_UserPassBas
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		$this->setForcedUsername("admin");
@@ -46,7 +46,7 @@ class sspmod_core_Auth_Source_AdminPassword extends sspmod_core_Auth_UserPassBas
 		$config = SimpleSAML_Configuration::getInstance();
 		$adminPassword = $config->getString('auth.adminpassword', '123');
 		if ($adminPassword === '123') {
-			/* We require that the user changes the password. */
+			// We require that the user changes the password
 			throw new SimpleSAML_Error_Error('NOTSET');
 		}
 
diff --git a/modules/core/lib/Auth/UserPassBase.php b/modules/core/lib/Auth/UserPassBase.php
index 199430c9e1d8aeb987248a915c2f3fa7826de8f4..bc2a865addcbb616f7f30b5ecef769171c0fcdca 100644
--- a/modules/core/lib/Auth/UserPassBase.php
+++ b/modules/core/lib/Auth/UserPassBase.php
@@ -89,7 +89,7 @@ abstract class sspmod_core_Auth_UserPassBase extends SimpleSAML_Auth_Source {
 			$this->loginLinks = $config['core:loginpage_links'];
 		}
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		// Get the remember username config options
@@ -176,7 +176,7 @@ abstract class sspmod_core_Auth_UserPassBase extends SimpleSAML_Auth_Source {
 		 */
 		$state[self::AUTHID] = $this->authId;
 
-		/* What username we should force, if any. */
+		// What username we should force, if any
 		if ($this->forcedUsername !== NULL) {
 			/*
 			 * This is accessed by the login form, to determine if the user
diff --git a/modules/core/lib/Auth/UserPassOrgBase.php b/modules/core/lib/Auth/UserPassOrgBase.php
index 4e9defab3e712c42fb69844f0390f8bd15d9a57c..dab93807f08c348a5558a5174c15cf6fd2f6495a 100644
--- a/modules/core/lib/Auth/UserPassOrgBase.php
+++ b/modules/core/lib/Auth/UserPassOrgBase.php
@@ -71,7 +71,7 @@ abstract class sspmod_core_Auth_UserPassOrgBase extends SimpleSAML_Auth_Source {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		// Get the remember username config options
@@ -149,7 +149,7 @@ abstract class sspmod_core_Auth_UserPassOrgBase extends SimpleSAML_Auth_Source {
 	public function authenticate(&$state) {
 		assert('is_array($state)');
 
-		/* We are going to need the authId in order to retrieve this authentication source later. */
+		// We are going to need the authId in order to retrieve this authentication source later
 		$state[self::AUTHID] = $this->authId;
 
 		$id = SimpleSAML_Auth_State::saveState($state, self::STAGEID);
diff --git a/modules/core/lib/Stats/Output/File.php b/modules/core/lib/Stats/Output/File.php
index 4956c82ef9049bd6e7806d0d26b4d32fa65b30fe..acd661496c09d3ae61251a4eaec377e4de01c2b3 100644
--- a/modules/core/lib/Stats/Output/File.php
+++ b/modules/core/lib/Stats/Output/File.php
@@ -64,7 +64,7 @@ class sspmod_core_Stats_Output_File extends SimpleSAML_Stats_Output {
 			throw new SimpleSAML_Error_Exception('Error opening log file: ' . var_export($fileName, TRUE));
 		}
 
-		/* Disable output buffering. */
+		// Disable output buffering
 		stream_set_write_buffer($this->file, 0);
 
 		$this->fileDate = $date;
@@ -84,7 +84,7 @@ class sspmod_core_Stats_Output_File extends SimpleSAML_Stats_Output {
 
 		$timestamp = gmdate('Y-m-d\TH:i:s', $time) . sprintf('.%03dZ', $milliseconds);
 
-		$outDate = substr($timestamp, 0, 10); /* The date-part of the timstamp. */
+		$outDate = substr($timestamp, 0, 10); // The date-part of the timstamp
 
 		if ($outDate !== $this->fileDate) {
 			$this->openLog($outDate);
diff --git a/modules/core/templates/logout-iframe-wrapper.php b/modules/core/templates/logout-iframe-wrapper.php
index 97d65f71dbb871c523a1713f63c5a15db7947eb6..1890ee583c01f91e630a7aa1325f1984f78ece8f 100644
--- a/modules/core/templates/logout-iframe-wrapper.php
+++ b/modules/core/templates/logout-iframe-wrapper.php
@@ -5,7 +5,7 @@ $SPs = $this->data['SPs'];
 
 $iframeURL = 'logout-iframe.php?type=embed&id=' . urlencode($id);
 
-/* Pretty arbitrary height, but should have enough safety margins for most cases. */
+// Pretty arbitrary height, but should have enough safety margins for most cases
 $iframeHeight = 25 + count($SPs) * 4;
 
 $this->data['header'] = $this->t('{logout:progress}');
diff --git a/modules/core/www/authenticate.php b/modules/core/www/authenticate.php
index 606095058973964e330e958c721106c326cb2c5e..3e114e6e9b842ba0b0b43f94a36fb3f5cb132498 100644
--- a/modules/core/www/authenticate.php
+++ b/modules/core/www/authenticate.php
@@ -21,7 +21,7 @@ if(array_key_exists('logout', $_REQUEST)) {
 }
 
 if (array_key_exists(SimpleSAML_Auth_State::EXCEPTION_PARAM, $_REQUEST)) {
-	/* This is just a simple example of an error. */
+	// This is just a simple example of an error
 
 	$state = SimpleSAML_Auth_State::loadExceptionState();
 	assert('array_key_exists(SimpleSAML_Auth_State::EXCEPTION_DATA, $state)');
diff --git a/modules/core/www/cleardiscochoices.php b/modules/core/www/cleardiscochoices.php
index b3f64187f23a8c51b7f9a41b3f4de2adc555f441..a5616d84e2bdb0a1c49f4af4e1f6404ffa798c2f 100644
--- a/modules/core/www/cleardiscochoices.php
+++ b/modules/core/www/cleardiscochoices.php
@@ -6,11 +6,11 @@ require_once('_include.php');
  * This page clears the user's IdP discovery choices.
  */
 
-/* The base path for cookies. This should be the installation directory for SimpleSAMLphp. */
+// The base path for cookies. This should be the installation directory for SimpleSAMLphp.
 $config = SimpleSAML_Configuration::getInstance();
 $cookiePath = '/' . $config->getBaseUrl();
 
-/* We delete all cookies which starts with 'idpdisco_' */
+// We delete all cookies which starts with 'idpdisco_'
 foreach($_COOKIE as $cookieName => $value) {
 	if (substr($cookieName, 0, 9) !== 'idpdisco_') {
 		/* Not a idpdisco cookie. */
diff --git a/modules/core/www/frontpage_auth.php b/modules/core/www/frontpage_auth.php
index ae2d683c781509d34913ed9852894dbee7e2f0cb..dc47ed233090976c85170c536557c112ede92722 100644
--- a/modules/core/www/frontpage_auth.php
+++ b/modules/core/www/frontpage_auth.php
@@ -1,11 +1,11 @@
 <?php
 
 
-/* Load SimpleSAMLphp, configuration */
+// Load SimpleSAMLphp, configuration
 $config = SimpleSAML_Configuration::getInstance();
 $session = SimpleSAML_Session::getSessionFromRequest();
 
-/* Check if valid local session exists.. */
+// Check if valid local session exists
 if ($config->getBoolean('admin.protectindexpage', false)) {
     SimpleSAML\Utils\Auth::requireAdmin();
 }
diff --git a/modules/core/www/frontpage_config.php b/modules/core/www/frontpage_config.php
index 61b9d174051d878d19f3f111ba84c4db7032deb9..e53015d041b8c7667f98b02c371ff69e9faebff5 100644
--- a/modules/core/www/frontpage_config.php
+++ b/modules/core/www/frontpage_config.php
@@ -2,11 +2,11 @@
 
 
 
-/* Load SimpleSAMLphp, configuration */
+// Load SimpleSAMLphp, configuration
 $config = SimpleSAML_Configuration::getInstance();
 $session = SimpleSAML_Session::getSessionFromRequest();
 
-/* Check if valid local session exists.. */
+// Check if valid local session exists.
 if ($config->getBoolean('admin.protectindexpage', false)) {
     SimpleSAML\Utils\Auth::requireAdmin();
 }
diff --git a/modules/core/www/frontpage_federation.php b/modules/core/www/frontpage_federation.php
index 84824cdc90ac2f3989899eb9983cc465aa153a28..3834f800112999a643743558029872b14668c21e 100644
--- a/modules/core/www/frontpage_federation.php
+++ b/modules/core/www/frontpage_federation.php
@@ -2,11 +2,11 @@
 
 
 
-/* Load SimpleSAMLphp, configuration */
+// Load SimpleSAMLphp, configuration
 $config = SimpleSAML_Configuration::getInstance();
 $session = SimpleSAML_Session::getSessionFromRequest();
 
-/* Check if valid local session exists.. */
+// Check if valid local session exists.
 if ($config->getBoolean('admin.protectindexpage', false)) {
     SimpleSAML\Utils\Auth::requireAdmin();
 }
diff --git a/modules/core/www/frontpage_welcome.php b/modules/core/www/frontpage_welcome.php
index e98d3b97832ec6032870bf6faef7f4cc211a2d6d..7de50eb69b7df224bea97b5dbcff9a9dee9748b9 100644
--- a/modules/core/www/frontpage_welcome.php
+++ b/modules/core/www/frontpage_welcome.php
@@ -1,11 +1,11 @@
 <?php
 
 
-/* Load SimpleSAMLphp, configuration */
+// Load SimpleSAMLphp, configuration
 $config = SimpleSAML_Configuration::getInstance();
 $session = SimpleSAML_Session::getSessionFromRequest();
 
-/* Check if valid local session exists.. */
+// Check if valid local session exists.
 if ($config->getBoolean('admin.protectindexpage', false)) {
     SimpleSAML\Utils\Auth::requireAdmin();
 }
diff --git a/modules/core/www/idp/logout-iframe-done.php b/modules/core/www/idp/logout-iframe-done.php
index eeb4f2b0a85bff2308da13808d4dc7ee4557f823..f35ae8add13ed6a7f249407de4bead2f1575f149 100644
--- a/modules/core/www/idp/logout-iframe-done.php
+++ b/modules/core/www/idp/logout-iframe-done.php
@@ -13,10 +13,10 @@ if (!isset($_REQUEST['cancel'])) {
 	SimpleSAML_Stats::log('core:idp:logout-iframe:page', array('type' => 'done'));
 	$SPs = $state['core:Logout-IFrame:Associations'];
 } else {
-	/* User skipped global logout. */
+	// User skipped global logout
 	SimpleSAML_Logger::stats('slo-iframe skip');
 	SimpleSAML_Stats::log('core:idp:logout-iframe:page', array('type' => 'skip'));
-	$SPs = array(); /* No SPs should have been logged out. */
+	$SPs = array(); // No SPs should have been logged out
 	$state['core:Failed'] = TRUE; /* Mark as partial logout. */
 }
 
diff --git a/modules/core/www/idp/logout-iframe.php b/modules/core/www/idp/logout-iframe.php
index b181b7f9b9ea068d8cc7d7709a564306e0416e28..f25b08cc3221a9e6a034a22fddea6456c7713e2f 100644
--- a/modules/core/www/idp/logout-iframe.php
+++ b/modules/core/www/idp/logout-iframe.php
@@ -22,7 +22,7 @@ $state = SimpleSAML_Auth_State::loadState($_REQUEST['id'], 'core:Logout-IFrame')
 $idp = SimpleSAML_IdP::getByState($state);
 
 if ($type !== 'init') {
-	/* Update association state. */
+	// Update association state
 
 	$associations = $idp->getAssociations();
 
@@ -30,7 +30,7 @@ if ($type !== 'init') {
 
 		$spId = sha1($assocId);
 
-		/* Move SPs from 'onhold' to 'inprogress'. */
+		// Move SPs from 'onhold' to 'inprogress'
 		if ($sp['core:Logout-IFrame:State'] === 'onhold') {
 			$sp['core:Logout-IFrame:State'] = 'inprogress';
 		}
diff --git a/modules/core/www/loginuserpass.php b/modules/core/www/loginuserpass.php
index ec305a0abbac5248b6da38471ccc1c176614435f..545032027b9d4ce5898e87b384713de5e1ab9ba6 100644
--- a/modules/core/www/loginuserpass.php
+++ b/modules/core/www/loginuserpass.php
@@ -9,7 +9,7 @@
  * @package SimpleSAMLphp
  */
 
-/* Retrieve the authentication state. */
+// Retrieve the authentication state
 if (!array_key_exists('AuthState', $_REQUEST)) {
 	throw new SimpleSAML_Error_BadRequest('Missing AuthState parameter.');
 }
@@ -42,7 +42,7 @@ $errorCode = NULL;
 $errorParams = NULL;
 
 if (!empty($_REQUEST['username']) || !empty($password)) {
-	/* Either username or password set - attempt to log in. */
+	// Either username or password set - attempt to log in
 
 	if (array_key_exists('forcedUsername', $state)) {
 		$username = $state['forcedUsername'];
diff --git a/modules/core/www/loginuserpassorg.php b/modules/core/www/loginuserpassorg.php
index e2a3a6539cf37dad62fb5224338b33ab50c23fe9..800a83a6084f453ed38cc3e75adff9e46b216837 100644
--- a/modules/core/www/loginuserpassorg.php
+++ b/modules/core/www/loginuserpassorg.php
@@ -9,7 +9,7 @@
  * @package SimpleSAMLphp
  */
 
-/* Retrieve the authentication state. */
+// Retrieve the authentication state
 if (!array_key_exists('AuthState', $_REQUEST)) {
 	throw new SimpleSAML_Error_BadRequest('Missing AuthState parameter.');
 }
@@ -63,7 +63,7 @@ if ($organizations === NULL || !empty($organization)) {
 		try {
 			sspmod_core_Auth_UserPassOrgBase::handleLogin($authStateId, $username, $password, $organization);
 		} catch (SimpleSAML_Error_Error $e) {
-			/* Login failed. Extract error code and parameters, to display the error. */
+			// Login failed. Extract error code and parameters, to display the error
 			$errorCode = $e->getErrorCode();
 			$errorParams = $e->getParameters();
 		}
diff --git a/modules/core/www/postredirect.php b/modules/core/www/postredirect.php
index d4a16bb2c3dc747704c792122492e38d46dec582..ec4cefb7f91c1a476f57d97999127d740b9340fd 100644
--- a/modules/core/www/postredirect.php
+++ b/modules/core/www/postredirect.php
@@ -34,7 +34,7 @@ if ($session === NULL) {
 $postData = $session->getData('core_postdatalink', $postId);
 
 if ($postData === NULL) {
-	/* The post data is missing, probably because it timed out. */
+	// The post data is missing, probably because it timed out
 	throw new Exception('The POST data we should restore was lost.');
 }
 
diff --git a/modules/core/www/short_sso_interval.php b/modules/core/www/short_sso_interval.php
index 6808183711cf305f0f384dc13664385a2fc3e7f0..12fdb755185a80a39f84120155b6c595d0ed6c29 100644
--- a/modules/core/www/short_sso_interval.php
+++ b/modules/core/www/short_sso_interval.php
@@ -14,7 +14,7 @@ $state = SimpleSAML_Auth_State::loadState($id, 'core:short_sso_interval');
 $session = SimpleSAML_Session::getSessionFromRequest();
 
 if (array_key_exists('continue', $_REQUEST)) {
-	/* The user has pressed the continue/retry-button. */
+	// The user has pressed the continue/retry-button
 	SimpleSAML_Auth_ProcessingChain::resumeProcessing($state);
 }
 
diff --git a/modules/cron/www/croninfo.php b/modules/cron/www/croninfo.php
index c90f7edcfdf44984a935c7ce278c46777f8f7e77..79ad1d0f6acc90bcc19ca0ac74e5840fa431fa20 100644
--- a/modules/cron/www/croninfo.php
+++ b/modules/cron/www/croninfo.php
@@ -7,7 +7,7 @@
 require_once('_include.php');
 
 
-/* Load SimpleSAMLphp, configuration and metadata */
+// Load SimpleSAMLphp, configuration and metadata
 $config = SimpleSAML_Configuration::getInstance();
 $session = SimpleSAML_Session::getSessionFromRequest();
 
diff --git a/modules/discopower/config-templates/module_discopower.php b/modules/discopower/config-templates/module_discopower.php
index 4a17e1f7b633645ebdcb68a7fac32215a1e37ce4..5f5507f764e2e522e58b767b68a301dacae476b1 100644
--- a/modules/discopower/config-templates/module_discopower.php
+++ b/modules/discopower/config-templates/module_discopower.php
@@ -5,7 +5,7 @@
 
 $config = array (
 
-	// Which tab should be set as default. 0 is the first tab.
+	// Which tab should be set as default. 0 is the first tab
 	'defaulttab' => 0,
 	
 	/*
@@ -39,7 +39,7 @@ $config = array (
 	 *
 	 * If this is NULL (the default), the common domain cookie will be deleted when the browser closes.
 	 *
-	 * Example: 'cdc.lifetime' => 180*24*60*60, // 180 days.
+	 * Example: 'cdc.lifetime' => 180*24*60*60, // 180 days
 	 */
 	'cdc.lifetime' => NULL,
 
diff --git a/modules/discopower/lib/PowerIdPDisco.php b/modules/discopower/lib/PowerIdPDisco.php
index 18a5b8ee0cf21580f95cc17a0993cb26e32cf4b4..15f6a9f915c5b11c1b8cd551acd12856efb6f13c 100644
--- a/modules/discopower/lib/PowerIdPDisco.php
+++ b/modules/discopower/lib/PowerIdPDisco.php
@@ -320,7 +320,7 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco
             // the cookie is too long. Remove the oldest elements until it is short enough
             $tmp = explode(' ', $newCookie, 2);
             if (count($tmp) === 1) {
-                // we are left with a single entityID whose base64 representation is too long to fit in a cookie.
+                // we are left with a single entityID whose base64 representation is too long to fit in a cookie
                 break;
             }
             $newCookie = $tmp[1];
diff --git a/modules/discopower/templates/disco-tpl.php b/modules/discopower/templates/disco-tpl.php
index 86f7776cafb7a912ad581eec4ca5c7c99bc0293c..752badc741ed5f08d37966aac2077dc36d44cc0c 100644
--- a/modules/discopower/templates/disco-tpl.php
+++ b/modules/discopower/templates/disco-tpl.php
@@ -82,7 +82,7 @@ function showEntry($t, $metadata, $favourite = FALSE) {
 function getTranslatedName($t, $metadata) {
 	if (isset($metadata['UIInfo']['DisplayName'])) {
 		$displayName = $metadata['UIInfo']['DisplayName'];
-		assert('is_array($displayName)'); // Should always be an array of language code -> translation.
+		assert('is_array($displayName)'); // Should always be an array of language code -> translation
 		if (!empty($displayName)) {
 			return $t->getTranslation($displayName);
 		}
diff --git a/modules/discopower/www/disco.php b/modules/discopower/www/disco.php
index 5e8b82d1ec594ae74db3c4bfb9e900fd22940ea2..bfadb7c986dd9b5bb342d0b33cdd629b8d94cb99 100644
--- a/modules/discopower/www/disco.php
+++ b/modules/discopower/www/disco.php
@@ -3,13 +3,13 @@
 try {
 	$discoHandler = new sspmod_discopower_PowerIdPDisco(array('saml20-idp-remote', 'shib13-idp-remote'), 'poweridpdisco');
 } catch (Exception $exception) {
-	/* An error here should be caused by invalid query parameters. */
+	// An error here should be caused by invalid query parameters
 	throw new SimpleSAML_Error_Error('DISCOPARAMS', $exception);
 }
 
 try {
 	$discoHandler->handleRequest();
 } catch(Exception $exception) {
-	/* An error here should be caused by metadata. */
+	// An error here should be caused by metadata
 	throw new SimpleSAML_Error_Error('METADATA', $exception);
 }
diff --git a/modules/exampleattributeserver/www/attributeserver.php b/modules/exampleattributeserver/www/attributeserver.php
index d56c86973f555e2a44d3037e18c29c065a066673..9b207f5eba8bbeb03114089bd16168cda37a23f6 100644
--- a/modules/exampleattributeserver/www/attributeserver.php
+++ b/modules/exampleattributeserver/www/attributeserver.php
@@ -19,10 +19,10 @@ if ($spEntityId === NULL) {
 $idpMetadata = $metadata->getMetadataConfig($idpEntityId, 'saml20-idp-hosted');
 $spMetadata = $metadata->getMetaDataConfig($spEntityId, 'saml20-sp-remote');
 
-/* The endpoint we should deliver the message to. */
+// The endpoint we should deliver the message to
 $endpoint = $spMetadata->getString('testAttributeEndpoint');
 
-/* The attributes we will return. */
+// The attributes we will return
 $attributes = array(
 	'name' => array('value1', 'value2', 'value3'),
 	'test' => array('test'),
diff --git a/modules/exampleauth/lib/Auth/Process/RedirectTest.php b/modules/exampleauth/lib/Auth/Process/RedirectTest.php
index 28751cd2047c17a8b591ae9d7456588817c7ef74..23ad3bee121a3da30dcc4314270f7a3dfb1a58f8 100644
--- a/modules/exampleauth/lib/Auth/Process/RedirectTest.php
+++ b/modules/exampleauth/lib/Auth/Process/RedirectTest.php
@@ -16,10 +16,10 @@ class sspmod_exampleauth_Auth_Process_RedirectTest extends SimpleSAML_Auth_Proce
 		assert('is_array($state)');
 		assert('array_key_exists("Attributes", $state)');
 
-		/* To check whether the state is saved correctly. */
+		// To check whether the state is saved correctly
 		$state['Attributes']['RedirectTest1'] = array('OK');
 
-		/* Save state and redirect. */
+		// Save state and redirect
 		$id = SimpleSAML_Auth_State::saveState($state, 'exampleauth:redirectfilter-test');
 		$url = SimpleSAML_Module::getModuleURL('exampleauth/redirecttest.php');
 		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id));
diff --git a/modules/exampleauth/lib/Auth/Source/External.php b/modules/exampleauth/lib/Auth/Source/External.php
index 3df0b939d182b0a43dca46c47c4c130431c32c97..ad007473f2ce1586c14d13e09c36d625c1b6c595 100644
--- a/modules/exampleauth/lib/Auth/Source/External.php
+++ b/modules/exampleauth/lib/Auth/Source/External.php
@@ -32,10 +32,10 @@ class sspmod_exampleauth_Auth_Source_External extends SimpleSAML_Auth_Source {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
-		/* Do any other configuration we need here. */
+		// Do any other configuration we need here
 	}
 
 
diff --git a/modules/exampleauth/lib/Auth/Source/Static.php b/modules/exampleauth/lib/Auth/Source/Static.php
index f2f9e8a2e94c545a9447721cf6c438051295f42b..4f7513f738acba14982c85a3af6c83b591d3a6b3 100644
--- a/modules/exampleauth/lib/Auth/Source/Static.php
+++ b/modules/exampleauth/lib/Auth/Source/Static.php
@@ -28,11 +28,11 @@ class sspmod_exampleauth_Auth_Source_Static extends SimpleSAML_Auth_Source {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 
-		/* Parse attributes. */
+		// Parse attributes
 		try {
 			$this->attributes = SimpleSAML\Utils\Attributes::normalizeAttributesArray($config);
 		} catch(Exception $e) {
diff --git a/modules/exampleauth/lib/Auth/Source/UserPass.php b/modules/exampleauth/lib/Auth/Source/UserPass.php
index 5c464d32fffc080dc94a964802b6f63668876bc1..857d8ef2ad673bfdfb08166b5e46c37484e20904 100644
--- a/modules/exampleauth/lib/Auth/Source/UserPass.php
+++ b/modules/exampleauth/lib/Auth/Source/UserPass.php
@@ -29,12 +29,12 @@ class sspmod_exampleauth_Auth_Source_UserPass extends sspmod_core_Auth_UserPassB
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		$this->users = array();
 
-		/* Validate and parse our configuration. */
+		// Validate and parse our configuration
 		foreach ($config as $userpass => $attributes) {
 			if (!is_string($userpass)) {
 				throw new Exception('Invalid <username>:<password> for authentication source ' .
diff --git a/modules/exampleauth/www/authpage.php b/modules/exampleauth/www/authpage.php
index 209a9b83f19bcab27ec995beb87788f74ddafd8f..73fcb131ecd9df5ce0bd4b82a41ad5502e0e95a1 100644
--- a/modules/exampleauth/www/authpage.php
+++ b/modules/exampleauth/www/authpage.php
@@ -76,7 +76,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
 		$user = $users[$username];
 
 		if (!session_id()) {
-			/* session_start not called before. Do it here. */
+			// session_start not called before. Do it here.
 			session_start();
 		}
 
diff --git a/modules/expirycheck/lib/Auth/Process/ExpiryDate.php b/modules/expirycheck/lib/Auth/Process/ExpiryDate.php
index 15db10de780c40c0e91791d4256ced5d04befcf9..11a8847de88678eb8bfde93976d2976236d4158e 100644
--- a/modules/expirycheck/lib/Auth/Process/ExpiryDate.php
+++ b/modules/expirycheck/lib/Auth/Process/ExpiryDate.php
@@ -122,14 +122,14 @@ class sspmod_expirycheck_Auth_Process_ExpiryDate extends SimpleSAML_Auth_Process
 		if (self::shWarning($state, $expireOnDate, $this->warndaysbefore)) {
 			assert('is_array($state)');
 			if (isset($state['isPassive']) && $state['isPassive'] === TRUE) {
-				/* We have a passive request. Skip the warning. */
+				// We have a passive request. Skip the warning.
 				return;
 			}
 
 			SimpleSAML_Logger::warning('expirycheck: NetID ' . $netId .
 			                           ' is about to expire!');
 
-			/* Save state and redirect. */
+			// Save state and redirect
 			$state['expireOnDate'] = date($this->date_format, $expireOnDate);
 			$state['netId'] = $netId;
 			$id = SimpleSAML_Auth_State::saveState($state, 'expirywarning:about2expire');
diff --git a/modules/expirycheck/www/about2expire.php b/modules/expirycheck/www/about2expire.php
index 441f6f590fae662e4ca82ed409d54280b1f19470..9aeeb9fcbce5d6110434c8b304579b4a4a74bd17 100644
--- a/modules/expirycheck/www/about2expire.php
+++ b/modules/expirycheck/www/about2expire.php
@@ -15,7 +15,7 @@ $id = $_REQUEST['StateId'];
 $state = SimpleSAML_Auth_State::loadState($id, 'expirywarning:about2expire');
 
 if (array_key_exists('yes', $_REQUEST)) {
-	/* The user has pressed the yes-button. */
+	// The user has pressed the yes-button
 	SimpleSAML_Auth_ProcessingChain::resumeProcessing($state);
 }
 
diff --git a/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php b/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php
index bb44ba2483d7bd7b858039def02bab9594dee2ee..367948bb0fbdb90baeed2038c25ed1fd9ce22ba7 100644
--- a/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php
+++ b/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php
@@ -83,7 +83,7 @@ class sspmod_ldap_Auth_Process_AttributeAddUsersGroups extends sspmod_ldap_Auth_
 			$this->title . 'Checking for groups based on the best method for the LDAP product.'
 		);
 
-		// Based on the directory service, search LDAP for groups.
+		// Based on the directory service, search LDAP for groups
 		// If any attributes are needed, prepare them before calling search method
 		switch ($this->product) {
 
diff --git a/modules/ldap/lib/Auth/Source/LDAP.php b/modules/ldap/lib/Auth/Source/LDAP.php
index 66597c459518e199e33bf07b1ef87d5f8754d3bc..83b35faf930bd6f9648cbe1e4b16cfdc6caedf40 100644
--- a/modules/ldap/lib/Auth/Source/LDAP.php
+++ b/modules/ldap/lib/Auth/Source/LDAP.php
@@ -28,7 +28,7 @@ class sspmod_ldap_Auth_Source_LDAP extends sspmod_core_Auth_UserPassBase {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		$this->ldapConfig = new sspmod_ldap_ConfigHelper($config,
diff --git a/modules/ldap/lib/Auth/Source/LDAPMulti.php b/modules/ldap/lib/Auth/Source/LDAPMulti.php
index c30438bbbcf8e225f756ea8c95e3d772d790f514..8fdbdf9f1435e78c10c4bbc78d9571f60b3f0cff 100644
--- a/modules/ldap/lib/Auth/Source/LDAPMulti.php
+++ b/modules/ldap/lib/Auth/Source/LDAPMulti.php
@@ -38,7 +38,7 @@ class sspmod_ldap_Auth_Source_LDAPMulti extends sspmod_core_Auth_UserPassOrgBase
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		$cfgHelper = SimpleSAML_Configuration::loadFromArray($config,
@@ -94,7 +94,7 @@ class sspmod_ldap_Auth_Source_LDAPMulti extends sspmod_core_Auth_UserPassOrgBase
 		assert('is_string($org)');
 
 		if (!array_key_exists($org, $this->ldapOrgs)) {
-			/* The user has selected an organization which doesn't exist anymore. */
+			// The user has selected an organization which doesn't exist anymore.
 			SimpleSAML_Logger::warning('Authentication source ' . var_export($this->authId, TRUE) .
 				': Organization seems to have disappeared while the user logged in.' .
 				' Organization was ' . var_export($org, TRUE));
diff --git a/modules/ldap/lib/ConfigHelper.php b/modules/ldap/lib/ConfigHelper.php
index ed277b9d093d9d1b547b1d1d275ae4909bbfceb0..c39d1ddd178ae58b94c8f2ec550bb7e90379bbe4 100644
--- a/modules/ldap/lib/ConfigHelper.php
+++ b/modules/ldap/lib/ConfigHelper.php
@@ -130,7 +130,7 @@ class sspmod_ldap_ConfigHelper {
 
 		$this->location = $location;
 
-		/* Parse configuration. */
+		// Parse configuration
 		$config = SimpleSAML_Configuration::loadFromArray($config, $location);
 
 		$this->hostname = $config->getString('hostname');
@@ -155,7 +155,7 @@ class sspmod_ldap_ConfigHelper {
 			$this->dnPattern = $config->getString('dnpattern');
 		}
 
-		/* Are privs needed to get to the attributes? */
+		// Are privs needed to get to the attributes?
 		if ($this->privRead) {
 			$this->privUsername = $config->getString('priv.username');
 			$this->privPassword = $config->getString('priv.password');
diff --git a/modules/memcacheMonitor/templates/memcachestat.tpl.php b/modules/memcacheMonitor/templates/memcachestat.tpl.php
index e763fedf986baacf0aff26a133fb492330c49b98..dc0a71e26eec9c102f7d46d512b32e1cf86494cf 100644
--- a/modules/memcacheMonitor/templates/memcachestat.tpl.php
+++ b/modules/memcacheMonitor/templates/memcachestat.tpl.php
@@ -29,7 +29,7 @@ $title = $this->data['title'];
 $table = $this->data['table'];
 
 
-/* Identify column headings. */
+// Identify column headings
 $column_titles = array();
 foreach($table as $row_title => $row_data) {
 	foreach($row_data as $ct => $foo) {
diff --git a/modules/memcacheMonitor/www/memcachestat.php b/modules/memcacheMonitor/www/memcachestat.php
index d925e2cca53efc8dd7164c8ad46915e0408660de..d8c7644a4c88a4aef7803edfbd7aafe966d7a51e 100644
--- a/modules/memcacheMonitor/www/memcachestat.php
+++ b/modules/memcacheMonitor/www/memcachestat.php
@@ -74,7 +74,7 @@ function humanreadable($input) {
 
 $config = SimpleSAML_Configuration::getInstance();
 
-/* Make sure that the user has admin access rights. */
+// Make sure that the user has admin access rights
 SimpleSAML\Utils\Auth::requireAdmin();
 
 
diff --git a/modules/metarefresh/bin/metarefresh.php b/modules/metarefresh/bin/metarefresh.php
index 707ff05f9937220433f187a1c879750267b16d97..d05531e9efa493b5f2ea03ee2b9e2cf67686be54 100755
--- a/modules/metarefresh/bin/metarefresh.php
+++ b/modules/metarefresh/bin/metarefresh.php
@@ -7,10 +7,10 @@
  */
 
 
-/* This is the base directory of the SimpleSAMLphp installation. */
+// This is the base directory of the SimpleSAMLphp installation
 $baseDir = dirname(dirname(dirname(dirname(__FILE__))));
 
-/* Add library autoloader. */
+// Add library autoloader.
 require_once($baseDir . '/lib/_autoload.php');
 
 SimpleSAML_Session::useTransientSession(); /* No need to try to create a session here. */
diff --git a/modules/metarefresh/config-templates/config-metarefresh.php b/modules/metarefresh/config-templates/config-metarefresh.php
index 377c514d42b293f92d9c8418130105ee9b6edfaa..0147b1850763e5d258728bbf3191ded5340de1d2 100644
--- a/modules/metarefresh/config-templates/config-metarefresh.php
+++ b/modules/metarefresh/config-templates/config-metarefresh.php
@@ -67,7 +67,7 @@ $config = array(
 					//'types' => array(),
 				),
 			),
-			'expireAfter' 		=> 60*60*24*4, // Maximum 4 days cache time.
+			'expireAfter' 		=> 60*60*24*4, // Maximum 4 days cache time
 			'outputDir' 	=> 'metadata/metadata-kalmar-consuming/',
 
 			/*
diff --git a/modules/metarefresh/hooks/hook_cron.php b/modules/metarefresh/hooks/hook_cron.php
index 9f18ffea458e7f771f42c0fa0191196584b86308..0d0ef20dbec4e13f66b0ab884fe68633c322aad3 100644
--- a/modules/metarefresh/hooks/hook_cron.php
+++ b/modules/metarefresh/hooks/hook_cron.php
@@ -19,7 +19,7 @@ function metarefresh_hook_cron(&$croninfo) {
 		$stateFile = $config->getPathValue('datadir', 'data/') . 'metarefresh-state.php';
 
 		foreach ($sets AS $setkey => $set) {
-			// Only process sets where cron matches the current cron tag.
+			// Only process sets where cron matches the current cron tag
 			$cronTags = $set->getArray('cron');
 			if (!in_array($croninfo['tag'], $cronTags)) continue;
 
diff --git a/modules/metarefresh/lib/MetaLoader.php b/modules/metarefresh/lib/MetaLoader.php
index df88e8e95131072df0cc55d6432e72893aa024d2..e9bfc3a3ef586384058294e444e296f814822b20 100644
--- a/modules/metarefresh/lib/MetaLoader.php
+++ b/modules/metarefresh/lib/MetaLoader.php
@@ -99,18 +99,18 @@ class sspmod_metarefresh_MetaLoader {
 				$this->addCachedMetadata($source);
 				return;
 			} elseif(!preg_match('@^HTTP/1\.[01]\s200\s@', $responseHeaders[0])) {
-				// Other error.
+				// Other error
 				SimpleSAML_Logger::debug('Error from ' . $source['src'] . ' - attempting to re-use cached metadata');
 				$this->addCachedMetadata($source);
 				return;
 			}
 		} else {
-			/* Local file. */
+			// Local file.
 			$data = file_get_contents($source['src']);
 			$responseHeaders = NULL;
 		}
 
-		/* Everything OK. Proceed. */
+		// Everything OK. Proceed.
 		if (isset($source['conditionalGET']) && $source['conditionalGET']) {
 			// Stale or no metadata, so a fresh copy
 			SimpleSAML_Logger::debug('Downloaded fresh copy');
diff --git a/modules/multiauth/lib/Auth/Source/MultiAuth.php b/modules/multiauth/lib/Auth/Source/MultiAuth.php
index 4fcfc47ee01cb5b011c35e1796255d8b77b30cba..6a3c1dfcfe919cf006780522582f7188f22ade27 100644
--- a/modules/multiauth/lib/Auth/Source/MultiAuth.php
+++ b/modules/multiauth/lib/Auth/Source/MultiAuth.php
@@ -45,7 +45,7 @@ class sspmod_multiauth_Auth_Source_MultiAuth extends SimpleSAML_Auth_Source {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		if (!array_key_exists('sources', $config)) {
@@ -72,7 +72,7 @@ class sspmod_multiauth_Auth_Source_MultiAuth extends SimpleSAML_Auth_Source {
 			if (array_key_exists('css-class', $info)) {
 				$css_class = $info['css-class'];
 			} else {
-				/* Use the authtype as the css class */
+				// Use the authtype as the css class
 				$authconfig = $authsources->getArray($source, NULL);
 				if (!array_key_exists(0, $authconfig) || !is_string($authconfig[0])) {
 					$css_class = "";
diff --git a/modules/multiauth/www/selectsource.php b/modules/multiauth/www/selectsource.php
index da1568cb43e05778416e58cfda067980639a8979..db09029f89a18ecc50d38de81213afac86a67a0d 100644
--- a/modules/multiauth/www/selectsource.php
+++ b/modules/multiauth/www/selectsource.php
@@ -10,7 +10,7 @@
  * @package SimpleSAMLphp
  */
 
-/* Retrieve the authentication state. */
+// Retrieve the authentication state
 if (!array_key_exists('AuthState', $_REQUEST)) {
 	throw new SimpleSAML_Error_BadRequest('Missing AuthState parameter.');
 }
diff --git a/modules/negotiate/lib/Auth/Source/Negotiate.php b/modules/negotiate/lib/Auth/Source/Negotiate.php
index 55d3e7413cecfa5ed39d20c1a06b9021f1c86da3..0103d54392dd6fca3e740ae1bc3af9071acaeef8 100644
--- a/modules/negotiate/lib/Auth/Source/Negotiate.php
+++ b/modules/negotiate/lib/Auth/Source/Negotiate.php
@@ -153,7 +153,7 @@ class sspmod_negotiate_Auth_Source_Negotiate extends SimpleSAML_Auth_Source
                 $lookup = $this->lookupUserData($user);
                 if ($lookup) {
                     $state['Attributes'] = $lookup;
-                    // Override the backend so logout will know what to look for.
+                    // Override the backend so logout will know what to look for
                     $state['LogoutState'] = array(
                         'negotiate:backend' => null,
                     );
diff --git a/modules/oauth/bin/demo.php b/modules/oauth/bin/demo.php
index 01e166f7e10aea246fbd51e12729e5ccb24be59c..a49521969846547b18d7b7104946682e35a14431 100755
--- a/modules/oauth/bin/demo.php
+++ b/modules/oauth/bin/demo.php
@@ -10,10 +10,10 @@ function _readline($prompt = '') {
 try {
 
 
-	/* This is the base directory of the SimpleSAMLphp installation. */
+	// This is the base directory of the SimpleSAMLphp installation
 	$baseDir = dirname(dirname(dirname(dirname(__FILE__))));
 
-	/* Add library autoloader. */
+	// Add library autoloader.
 	require_once($baseDir . '/lib/_autoload.php');
 
 
diff --git a/modules/oauth/lib/Consumer.php b/modules/oauth/lib/Consumer.php
index 21bc7eb58fd8fde6d64969bfa3bef15f89b2cf50..f358767823e8e5c802b56310157bd24f0f4dc4ca 100644
--- a/modules/oauth/lib/Consumer.php
+++ b/modules/oauth/lib/Consumer.php
@@ -18,7 +18,7 @@ class sspmod_oauth_Consumer {
 		$this->signer = new OAuthSignatureMethod_HMAC_SHA1();
 	}
 	
-	// Used only to load the libextinc library early.
+	// Used only to load the libextinc library early
 	public static function dummy() {}
 	
 	
diff --git a/modules/oauth/libextinc/OAuth.php b/modules/oauth/libextinc/OAuth.php
index a4c438f8aca3149e262debb2a0b6921dd5d88b26..c90e4f914e5f9446e2f483f634dd4be0116a9fe5 100644
--- a/modules/oauth/libextinc/OAuth.php
+++ b/modules/oauth/libextinc/OAuth.php
@@ -1,8 +1,8 @@
 <?php
 // vim: foldmethod=marker
 
-/* Generic exception class
- */
+// Generic exception class
+
 class OAuthException extends Exception {
   // pass
 }
@@ -266,7 +266,7 @@ class OAuthRequest {
     $http_method = ($http_method) ? $http_method : $_SERVER['REQUEST_METHOD'];
 
     // We weren't handed any parameters, so let's find the ones relevant to
-    // this request.
+    // this request
     // If you run XML-RPC or similar you should use this to provide your own
     // parsed parameter-list
     if (!$parameters) {
diff --git a/modules/oauth/www/registry.edit.php b/modules/oauth/www/registry.edit.php
index 93ea85b40f18d8f5bed7382c7465448e331ae2d8..ef8e42ff43bb68eca426ccd3459f4cec0e950462 100644
--- a/modules/oauth/www/registry.edit.php
+++ b/modules/oauth/www/registry.edit.php
@@ -1,6 +1,6 @@
 <?php
 
-/* Load SimpleSAMLphp, configuration and metadata */
+// Load SimpleSAMLphp, configuration and metadata
 $config = SimpleSAML_Configuration::getInstance();
 $session = SimpleSAML_Session::getSessionFromRequest();
 $oauthconfig = SimpleSAML_Configuration::getOptionalConfig('module_oauth.php');
diff --git a/modules/oauth/www/registry.php b/modules/oauth/www/registry.php
index 14d778eaed26c7da9bc567552916557a9f810152..b53a76f9eb6318ab9001f232cb9175aad4be1c5d 100644
--- a/modules/oauth/www/registry.php
+++ b/modules/oauth/www/registry.php
@@ -1,6 +1,6 @@
 <?php
 
-/* Load SimpleSAMLphp, configuration and metadata */
+// Load SimpleSAMLphp, configuration and metadata
 $config = SimpleSAML_Configuration::getInstance();
 $session = SimpleSAML_Session::getSessionFromRequest();
 $oauthconfig = SimpleSAML_Configuration::getOptionalConfig('module_oauth.php');
diff --git a/modules/portal/hooks/hook_htmlinject.php b/modules/portal/hooks/hook_htmlinject.php
index 597dd4c7444229e8cc45b506e68d7817c28ff404..b358ac2033181d3e4b99cb40fab6f00b07499737 100644
--- a/modules/portal/hooks/hook_htmlinject.php
+++ b/modules/portal/hooks/hook_htmlinject.php
@@ -29,7 +29,7 @@ function portal_hook_htmlinject(&$hookinfo) {
 	
 	if (!$portal->isPortalized($hookinfo['page'])) return;
 
-	// Include jquery UI CSS files in header.
+	// Include jquery UI CSS files in header
 	$hookinfo['jquery']['css'] = TRUE;
 
 	// Header
diff --git a/modules/preprodwarning/lib/Auth/Process/Warning.php b/modules/preprodwarning/lib/Auth/Process/Warning.php
index 161918ba02ba552bb1a58a50722d3b6a5d25ae11..89d1fc4ec57939076858e67618900e9cc34942bb 100644
--- a/modules/preprodwarning/lib/Auth/Process/Warning.php
+++ b/modules/preprodwarning/lib/Auth/Process/Warning.php
@@ -21,11 +21,11 @@ class sspmod_preprodwarning_Auth_Process_Warning extends SimpleSAML_Auth_Process
 		assert('is_array($state)');
 
 		if (isset($state['isPassive']) && $state['isPassive'] === TRUE) {
-			/* We have a passive request. Skip the warning. */
+			// We have a passive request. Skip the warning
 			return;
 		}
 
-		/* Save state and redirect. */
+		// Save state and redirect.
 		$id = SimpleSAML_Auth_State::saveState($state, 'warning:request');
 		$url = SimpleSAML_Module::getModuleURL('preprodwarning/showwarning.php');
 		\SimpleSAML\Utils\HTTP::redirectTrustedURL($url, array('StateId' => $id));
diff --git a/modules/preprodwarning/www/showwarning.php b/modules/preprodwarning/www/showwarning.php
index 65116b5a6a3ac051a2c4e0ef6426101b36a2430b..79d8e1d81b0df3a0debed7bf588a021e114a1ae8 100644
--- a/modules/preprodwarning/www/showwarning.php
+++ b/modules/preprodwarning/www/showwarning.php
@@ -17,7 +17,7 @@ $state = SimpleSAML_Auth_State::loadState($id, 'warning:request');
 
 
 if (array_key_exists('yes', $_REQUEST)) {
-	/* The user has pressed the yes-button. */
+	// The user has pressed the yes-button
 
 	SimpleSAML_Auth_ProcessingChain::resumeProcessing($state);
 }
diff --git a/modules/radius/lib/Auth/Source/Radius.php b/modules/radius/lib/Auth/Source/Radius.php
index bcb9a68ed71c0df339606a8bbcef8ef662e68623..fbe719126bc23bba6afe8269b7bf6a88720b5ba0 100644
--- a/modules/radius/lib/Auth/Source/Radius.php
+++ b/modules/radius/lib/Auth/Source/Radius.php
@@ -68,10 +68,10 @@ class sspmod_radius_Auth_Source_Radius extends sspmod_core_Auth_UserPassBase {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
-		/* Parse configuration. */
+		// Parse configuration.
 		$config = SimpleSAML_Configuration::loadFromArray($config,
 			'Authentication source ' . var_export($this->authId, TRUE));
 
diff --git a/modules/saml/lib/Auth/Source/SP.php b/modules/saml/lib/Auth/Source/SP.php
index 1747ffe4bb51a860d6ea48e79cdac7be63bde379..81fecd3f624e9f8472c31f2ad67f301dbb89afbd 100644
--- a/modules/saml/lib/Auth/Source/SP.php
+++ b/modules/saml/lib/Auth/Source/SP.php
@@ -44,7 +44,7 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
 		if (!isset($config['entityID'])) {
@@ -115,7 +115,7 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source {
 
 		$metadataHandler = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 
-		/* First, look in saml20-idp-remote. */
+		// First, look in saml20-idp-remote.
 		try {
 			return $metadataHandler->getMetaDataConfig($entityId, 'saml20-idp-remote');
 		} catch (Exception $e) {
diff --git a/modules/saml/lib/Error.php b/modules/saml/lib/Error.php
index e3916ee9c4bd5b77b41c4c43fdab25ed0d452507..2b6c9190bf1bc59f8c5bdb11e14adaa0bc4acb68 100644
--- a/modules/saml/lib/Error.php
+++ b/modules/saml/lib/Error.php
@@ -101,7 +101,7 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception {
 	public static function fromException(Exception $exception) {
 
 		if ($exception instanceof sspmod_saml_Error) {
-			/* Return the original exception unchanged. */
+			// Return the original exception unchanged
 			return $exception;
 
 		} elseif ($exception instanceof SimpleSAML_Error_NoPassive) {
diff --git a/modules/saml/lib/IdP/SAML1.php b/modules/saml/lib/IdP/SAML1.php
index 15fd199e2900f84050a24c660d3628c6c03d23a9..2d7c713ae1ebf48a0377d0a9a5cd7151d8b11d76 100644
--- a/modules/saml/lib/IdP/SAML1.php
+++ b/modules/saml/lib/IdP/SAML1.php
@@ -16,7 +16,7 @@ class sspmod_saml_IdP_SAML1 {
 		assert('isset($state["Attributes"])');
 		assert('isset($state["SPMetadata"])');
 		assert('isset($state["saml:shire"])');
-		assert('array_key_exists("saml:target", $state)'); // Can be NULL.
+		assert('array_key_exists("saml:target", $state)'); // Can be NULL
 
 		$spMetadata = $state["SPMetadata"];
 		$spEntityId = $spMetadata['entityid'];
@@ -46,7 +46,7 @@ class sspmod_saml_IdP_SAML1 {
 		}
 		SimpleSAML_Stats::log('saml:idp:Response', $statsData);
 
-		/* Generate and send response. */
+		// Generate and send response.
 		$ar = new SimpleSAML_XML_Shib13_AuthnResponse();
 		$authnResponseXML = $ar->generate($idpMetadata, $spMetadata, $shire, $attributes);
 
diff --git a/modules/saml/lib/IdP/SAML2.php b/modules/saml/lib/IdP/SAML2.php
index dfe147feb1c32e22a8293e49c88bf31091b41472..a752f025b4938f662a12a482ddc8978126dbecf4 100644
--- a/modules/saml/lib/IdP/SAML2.php
+++ b/modules/saml/lib/IdP/SAML2.php
@@ -16,7 +16,7 @@ class sspmod_saml_IdP_SAML2 {
 		assert('isset($state["Attributes"])');
 		assert('isset($state["SPMetadata"])');
 		assert('isset($state["saml:ConsumerURL"])');
-		assert('array_key_exists("saml:RequestId", $state)'); // Can be NULL.
+		assert('array_key_exists("saml:RequestId", $state)'); // Can be NULL
 		assert('array_key_exists("saml:RelayState", $state)'); // Can be NULL.
 
 		$spMetadata = $state["SPMetadata"];
@@ -41,7 +41,7 @@ class sspmod_saml_IdP_SAML2 {
 			$assertion->setAuthenticatingAuthority($state['saml:AuthenticatingAuthority']);
 		}
 
-		/* Create the session association (for logout). */
+		// Create the session association (for logout).
 		$association = array(
 			'id' => 'saml:' . $spEntityId,
 			'Handler' => 'sspmod_saml_IdP_SAML2',
@@ -51,7 +51,7 @@ class sspmod_saml_IdP_SAML2 {
 			'saml:SessionIndex' => $assertion->getSessionIndex(),
 		);
 
-		/* Maybe encrypt the assertion. */
+		// Maybe encrypt the assertion.
 		$assertion = self::encryptAssertion($idpMetadata, $spMetadata, $assertion);
 
 		/* Create the response. */
diff --git a/modules/saml/lib/IdP/SQLNameID.php b/modules/saml/lib/IdP/SQLNameID.php
index 14ceb65dfb94148f5a06944cb56ca3b691c61b8b..d2ad849fe60da80d48568f30dbab7950e806336f 100644
--- a/modules/saml/lib/IdP/SQLNameID.php
+++ b/modules/saml/lib/IdP/SQLNameID.php
@@ -111,7 +111,7 @@ class sspmod_saml_IdP_SQLNameID  {
 
 		$row = $query->fetch(PDO::FETCH_ASSOC);
 		if ($row === FALSE) {
-			/* No NameID found. */
+			// No NameID found
 			return NULL;
 		}
 
diff --git a/modules/saml/lib/Message.php b/modules/saml/lib/Message.php
index 17bb5b3823cf5cb9ac855a876070666c4dd4b60e..570498c778eda4df195567be2c57c6f6a45a91e9 100644
--- a/modules/saml/lib/Message.php
+++ b/modules/saml/lib/Message.php
@@ -52,12 +52,12 @@ class sspmod_saml_Message {
 		$element->setSignatureKey($privateKey);
 
 		if ($certArray === NULL) {
-			/* We don't have a certificate to add. */
+			// We don't have a certificate to add
 			return;
 		}
 
 		if (!array_key_exists('PEM', $certArray)) {
-			/* We have a public key with only a fingerprint. */
+			// We have a public key with only a fingerprint.
 			return;
 		}
 
diff --git a/modules/saml/lib/SP/LogoutStore.php b/modules/saml/lib/SP/LogoutStore.php
index 9c8b0d4dfd8f93da200037aa81fabaa34b6317a6..f74821a472dc41e06f59f9b0bb95e08b001e5ed8 100644
--- a/modules/saml/lib/SP/LogoutStore.php
+++ b/modules/saml/lib/SP/LogoutStore.php
@@ -107,7 +107,7 @@ class sspmod_saml_SP_LogoutStore {
 			'now' => gmdate('Y-m-d H:i:s'),
 		);
 
-		/* We request the columns in lowercase in order to be compatible with PostgreSQL. */
+		// We request the columns in lowercase in order to be compatible with PostgreSQL
 		$query = 'SELECT _sessionIndex AS _sessionindex, _sessionId AS _sessionid FROM ' . $store->prefix . '_saml_LogoutStore' .
 			' WHERE _authSource = :_authSource AND _nameId = :_nameId AND _expire >= :now';
 		$query = $store->pdo->prepare($query);
@@ -172,7 +172,7 @@ class sspmod_saml_SP_LogoutStore {
 
 		$store = SimpleSAML_Store::getInstance();
 		if ($store === FALSE) {
-			/* We don't have a datastore. */
+			// We don't have a datastore.
 			return;
 		}
 
diff --git a/modules/saml/www/idp/certs.php b/modules/saml/www/idp/certs.php
index 780beb5a70f5030a173fa84c58ea608e745ba29b..a289d96a2cb473ddb5e8d6e3bd40469db50f5d19 100644
--- a/modules/saml/www/idp/certs.php
+++ b/modules/saml/www/idp/certs.php
@@ -1,13 +1,13 @@
 <?php
 
-/* Load SimpleSAMLphp, configuration and metadata */
+// Load SimpleSAMLphp, configuration and metadata
 $config = SimpleSAML_Configuration::getInstance();
 $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
 
 if (!$config->getBoolean('enable.saml20-idp', false))
 	throw new SimpleSAML_Error_Error('NOACCESS');
 
-/* Check if valid local session exists.. */
+// Check if valid local session exists..
 if ($config->getBoolean('admin.protectmetadata', false)) {
     SimpleSAML\Utils\Auth::requireAdmin();
 }
diff --git a/modules/saml/www/sp/discoresp.php b/modules/saml/www/sp/discoresp.php
index a10c5ecd106ec59ccf3fe273b7b13548f96fd8da..078e8add5d749c387d5eb5ee957dcb113cb134c5 100644
--- a/modules/saml/www/sp/discoresp.php
+++ b/modules/saml/www/sp/discoresp.php
@@ -13,7 +13,7 @@ if (!array_key_exists('idpentityid', $_REQUEST)) {
 }
 $state = SimpleSAML_Auth_State::loadState($_REQUEST['AuthID'], 'saml:sp:sso');
 
-/* Find authentication source. */
+// Find authentication source
 assert('array_key_exists("saml:sp:AuthId", $state)');
 $sourceId = $state['saml:sp:AuthId'];
 
diff --git a/modules/saml/www/sp/saml1-acs.php b/modules/saml/www/sp/saml1-acs.php
index bd8d41b939f5cb536f3da93918da94b08eff8137..7aa303babc70bcd1b23899ee2d8543642ee1a1ef 100644
--- a/modules/saml/www/sp/saml1-acs.php
+++ b/modules/saml/www/sp/saml1-acs.php
@@ -26,7 +26,7 @@ SimpleSAML_Logger::debug('Received SAML1 response');
 $target = (string)$_REQUEST['TARGET'];
 
 if (preg_match('@^https?://@i', $target)) {
-	/* Unsolicited response. */
+	// Unsolicited response
 	$state = array(
 		'saml:sp:isUnsolicited' => TRUE,
 		'saml:sp:AuthId' => $sourceId,
@@ -35,7 +35,7 @@ if (preg_match('@^https?://@i', $target)) {
 } else {
 	$state = SimpleSAML_Auth_State::loadState($_REQUEST['TARGET'], 'saml:sp:sso');
 
-	/* Check that the authentication source is correct. */
+	// Check that the authentication source is correct.
 	assert('array_key_exists("saml:sp:AuthId", $state)');
 	if ($state['saml:sp:AuthId'] !== $sourceId) {
 		throw new SimpleSAML_Error_Exception('The authentication source id in the URL does not match the authentication source which sent the request.');
diff --git a/modules/saml/www/sp/saml2-acs.php b/modules/saml/www/sp/saml2-acs.php
index 26e8ceb3e26d57253585571f4de640a3b7a82bc1..ed261ecf3b57de5261309bba0215fc05bab5eb7a 100644
--- a/modules/saml/www/sp/saml2-acs.php
+++ b/modules/saml/www/sp/saml2-acs.php
@@ -16,7 +16,7 @@ try {
     $b = SAML2_Binding::getCurrentBinding();
 } catch (Exception $e) { // TODO: look for a specific exception
     // This is dirty. Instead of checking the message of the exception, SAML2_Binding::getCurrentBinding() should throw
-    // an specific exception when the binding is unknown, and we should capture that here.
+    // an specific exception when the binding is unknown, and we should capture that here
     if ($e->getMessage() === 'Unable to find the current binding.') {
         throw new SimpleSAML_Error_Error('ACSPARAMS', $e, 400);
     } else {
diff --git a/modules/saml/www/sp/saml2-logout.php b/modules/saml/www/sp/saml2-logout.php
index 637009ac4820c2e336b6e15660f01dae49549971..9664d01d01033d57c268f9fceaca4b10a3f99576 100644
--- a/modules/saml/www/sp/saml2-logout.php
+++ b/modules/saml/www/sp/saml2-logout.php
@@ -24,7 +24,7 @@ try {
     $binding = SAML2_Binding::getCurrentBinding();
 } catch (Exception $e) { // TODO: look for a specific exception
     // This is dirty. Instead of checking the message of the exception, SAML2_Binding::getCurrentBinding() should throw
-    // an specific exception when the binding is unknown, and we should capture that here.
+    // an specific exception when the binding is unknown, and we should capture that here
     if ($e->getMessage() === 'Unable to find the current binding.') {
         throw new SimpleSAML_Error_Error('SLOSERVICEPARAMS', $e, 400);
     } else {
@@ -35,7 +35,7 @@ $message = $binding->receive();
 
 $idpEntityId = $message->getIssuer();
 if ($idpEntityId === NULL) {
-	/* Without an issuer we have no way to respond to the message. */
+	// Without an issuer we have no way to respond to the message.
 	throw new SimpleSAML_Error_BadRequest('Received message on logout endpoint without issuer.');
 }
 
@@ -56,7 +56,7 @@ if ($message instanceof SAML2_LogoutResponse) {
 
 	$relayState = $message->getRelayState();
 	if ($relayState === NULL) {
-		/* Somehow, our RelayState has been lost. */
+		// Somehow, our RelayState has been lost.
 		throw new SimpleSAML_Error_BadRequest('Missing RelayState in logout response.');
 	}
 
diff --git a/modules/sqlauth/lib/Auth/Source/SQL.php b/modules/sqlauth/lib/Auth/Source/SQL.php
index abd9a4155b0fe57daefe16f98e90db1c786dff47..29cd9d5f12692056865f9c1af5be2b0ed3a1423f 100644
--- a/modules/sqlauth/lib/Auth/Source/SQL.php
+++ b/modules/sqlauth/lib/Auth/Source/SQL.php
@@ -47,10 +47,10 @@ class sspmod_sqlauth_Auth_Source_SQL extends sspmod_core_Auth_UserPassBase {
 		assert('is_array($info)');
 		assert('is_array($config)');
 
-		/* Call the parent constructor first, as required by the interface. */
+		// Call the parent constructor first, as required by the interface
 		parent::__construct($info, $config);
 
-		/* Make sure that all required parameters are present. */
+		// Make sure that all required parameters are present.
 		foreach (array('dsn', 'username', 'password', 'query') as $param) {
 			if (!array_key_exists($param, $config)) {
 				throw new Exception('Missing required attribute \'' . $param .
diff --git a/modules/statistics/bin/loganalyzer.php b/modules/statistics/bin/loganalyzer.php
index a35348d46fe25309261167479f68264e08347d5f..37578856b2dc07b38383b06893d9e4f12b49f264 100755
--- a/modules/statistics/bin/loganalyzer.php
+++ b/modules/statistics/bin/loganalyzer.php
@@ -2,10 +2,10 @@
 <?php
 
 
-/* This is the base directory of the SimpleSAMLphp installation. */
+// This is the base directory of the SimpleSAMLphp installation
 $baseDir = dirname(dirname(dirname(dirname(__FILE__))));
 
-/* Add library autoloader. */
+// Add library autoloader.
 require_once($baseDir . '/lib/_autoload.php');
 
 /* Initialize the configuration. */
diff --git a/modules/statistics/bin/logcleaner.php b/modules/statistics/bin/logcleaner.php
index ca4acc88b0ac2ec37873ad3e1df76cd800fe6cd2..3ed5e21119e08844831dca1ebbf1f077907f0132 100755
--- a/modules/statistics/bin/logcleaner.php
+++ b/modules/statistics/bin/logcleaner.php
@@ -2,10 +2,10 @@
 <?php
 
 
-/* This is the base directory of the SimpleSAMLphp installation. */
+// This is the base directory of the SimpleSAMLphp installation
 $baseDir = dirname(dirname(dirname(dirname(__FILE__))));
 
-/* Add library autoloader. */
+// Add library autoloader.
 require_once($baseDir . '/lib/_autoload.php');
 
 /* Initialize the configuration. */
diff --git a/modules/statistics/config-templates/module_statistics.php b/modules/statistics/config-templates/module_statistics.php
index 51d3c31cd886d0364636bccf02081572f142ae07..99d1de010b728227334c61d7e45fd8bff88fef6b 100644
--- a/modules/statistics/config-templates/module_statistics.php
+++ b/modules/statistics/config-templates/module_statistics.php
@@ -5,9 +5,9 @@
 
 $config = array (
 
-	/* Authentication & authorization for statistics. */
+	// Authentication & authorization for statistics
 
-	/* Whether the statistics require authentication before use. */
+	// Whether the statistics require authentication before use.
 	'protected' => FALSE,
 
 	/* The authentication source that should be used. */
diff --git a/modules/statistics/lib/AccessCheck.php b/modules/statistics/lib/AccessCheck.php
index cd3c5f4b701fc967941ea4010a2c86ab0479aee1..b37a61474da984fe408ce2a18bd8332c46c76fe4 100644
--- a/modules/statistics/lib/AccessCheck.php
+++ b/modules/statistics/lib/AccessCheck.php
@@ -39,7 +39,7 @@ class sspmod_statistics_AccessCheck {
             SimpleSAML\Utils\Auth::requireAdmin();
 		}
 
-		/* We are using an authsource for login. */
+		// We are using an authsource for login.
 
 		$as = new SimpleSAML_Auth_Simple($authsource);
 		$as->requireAuth();
diff --git a/modules/statistics/lib/Aggregator.php b/modules/statistics/lib/Aggregator.php
index 5e2c5073a80c8d73183e149e39febbfa439d9123..18829878c7d5de2309562428a2e1b2e4daab1260 100644
--- a/modules/statistics/lib/Aggregator.php
+++ b/modules/statistics/lib/Aggregator.php
@@ -105,7 +105,7 @@ class sspmod_statistics_Aggregator {
 			
 			$logline = fgets($file, 4096);
 			
-			// Continue if STAT is not found on line.
+			// Continue if STAT is not found on line
 			if (!preg_match('/STAT/', $logline)) continue;
 			$i++; $lastlogline = $logline;
 			
diff --git a/modules/statistics/lib/Graph/GoogleCharts.php b/modules/statistics/lib/Graph/GoogleCharts.php
index 250161430899c4c24ecd4f4964ccc5a629e50956..b062fe41987b373ecf09853536d207d44f05ce0f 100644
--- a/modules/statistics/lib/Graph/GoogleCharts.php
+++ b/modules/statistics/lib/Graph/GoogleCharts.php
@@ -99,7 +99,7 @@ class sspmod_statistics_Graph_GoogleCharts {
 			// Dimension of graph. Default is 800x350
 			'chs=' . $this->x . 'x' . $this->y . 
 			
-			// Dateset values.
+			// Dateset values
 			'&chd=' . $this->encodedata($datasets) .
 			
 			// Fill area...
diff --git a/modules/statistics/lib/LogCleaner.php b/modules/statistics/lib/LogCleaner.php
index d95ad4ec752a4ebccca3be11727fd92157a52188..9b6646495129f20e6772b0518c69f05688f70874 100644
--- a/modules/statistics/lib/LogCleaner.php
+++ b/modules/statistics/lib/LogCleaner.php
@@ -62,7 +62,7 @@ class sspmod_statistics_LogCleaner {
 			
 			$logline = fgets($file, 4096);
 			
-			// Continue if STAT is not found on line.
+			// Continue if STAT is not found on line
 			if (!preg_match('/STAT/', $logline)) continue;
 			$i++;
 			
@@ -119,9 +119,9 @@ class sspmod_statistics_LogCleaner {
 		
 		$file = fopen($this->inputfile, 'r');
 
-		/* Open the output file in a way that guarantees that we will not overwrite a random file. */
+		// Open the output file in a way that guarantees that we will not overwrite a random file.
 		if (file_exists($outputfile)) {
-			/* Delete existing output file. */
+			// Delete existing output file.
 			unlink($outputfile);
 		}
 		$outfile = fopen($outputfile, 'x'); /* Create the output file. */
diff --git a/modules/statistics/lib/Statistics/Rulesets/BaseRule.php b/modules/statistics/lib/Statistics/Rulesets/BaseRule.php
index 8ddf3ae70279afe4a8b8b5c98066b281987ca1db..66b8da5f3236fa9f6e3641d1e4db9f269651249b 100644
--- a/modules/statistics/lib/Statistics/Rulesets/BaseRule.php
+++ b/modules/statistics/lib/Statistics/Rulesets/BaseRule.php
@@ -68,7 +68,7 @@ class sspmod_statistics_Statistics_Rulesets_BaseRule {
 		$timeresavailable = array_keys($this->available);
 		$timeres = $timeresavailable[0];
 
-		// Then check if the user have provided one that is valid.
+		// Then check if the user have provided one that is valid
 		if (in_array($preferTimeRes, $timeresavailable)) {
 			$timeres = $preferTimeRes;
 		}
diff --git a/templates/post.php b/templates/post.php
index 1018929170c43832d86eb1a06aaafe60d43fd312..733fdf0a52becf3318f905cf1c48bc8903a6b7cb 100644
--- a/templates/post.php
+++ b/templates/post.php
@@ -20,7 +20,7 @@
 if (array_key_exists('post', $this->data)) {
 	$post = $this->data['post'];
 } else {
-	/* For backwards compatibility. */
+	// For backwards compatibility
 	assert('array_key_exists("response", $this->data)');
 	assert('array_key_exists("RelayStateName", $this->data)');
 	assert('array_key_exists("RelayState", $this->data)');
@@ -50,7 +50,7 @@ function printItem($name, $value) {
 		return;
 	}
 
-	/* This is an array... */
+	// This is an array...
 	foreach ($value as $index => $item) {
 		printItem($name . '[' . $index . ']', $item);
 	}
diff --git a/tests/lib/SimpleSAML/DatabaseTest.php b/tests/lib/SimpleSAML/DatabaseTest.php
index 79fb14948f27f363a61ea8a2520237a140f1371b..7ab129fd23f1ea588268dc85534c600b55cf41f9 100644
--- a/tests/lib/SimpleSAML/DatabaseTest.php
+++ b/tests/lib/SimpleSAML/DatabaseTest.php
@@ -62,7 +62,7 @@ class SimpleSAML_DatabaseTest extends PHPUnit_Framework_TestCase
 
         $this->config = new SimpleSAML_Configuration($config, "test/SimpleSAML/DatabaseTest.php");
 
-        // Ensure that we have a functional configuration class.
+        // Ensure that we have a functional configuration class
         $this->assertInstanceOf('SimpleSAML_Configuration', $this->config);
         $this->assertEquals($config['database.dsn'], $this->config->getString('database.dsn'));
 
diff --git a/tests/modules/core/lib/Auth/Process/TargetedIDTest.php b/tests/modules/core/lib/Auth/Process/TargetedIDTest.php
index d006d9ecc47fc15c5b8d9c1f6d97cb1d5657acce..1e5de903351a8aa2276f0cb2f170d4d62e538beb 100644
--- a/tests/modules/core/lib/Auth/Process/TargetedIDTest.php
+++ b/tests/modules/core/lib/Auth/Process/TargetedIDTest.php
@@ -20,7 +20,7 @@ class Test_Core_Auth_Process_TargetedID extends PHPUnit_Framework_TestCase
     }
 
 //    /**
-//     * Test the most basic functionality.
+//     * Test the most basic functionality
 //     */
 //    public function testBasic()
 //    {
diff --git a/www/admin/hostnames.php b/www/admin/hostnames.php
index c326e76c57429395948476909a5dc2256a834893..4baec753b180280140b7c6d7e386bc68bb6587fd 100644
--- a/www/admin/hostnames.php
+++ b/www/admin/hostnames.php
@@ -2,11 +2,11 @@
 
 require_once('../_include.php');
 
-/* Load SimpleSAMLphp, configuration */
+// Load SimpleSAMLphp, configuration
 $config = SimpleSAML_Configuration::getInstance();
 $session = SimpleSAML_Session::getSessionFromRequest();
 
-/* Check if valid local session exists.. */
+// Check if valid local session exists..
 SimpleSAML\Utils\Auth::requireAdmin();
 
 $attributes = array();
diff --git a/www/admin/phpinfo.php b/www/admin/phpinfo.php
index 945172895844f2e666edbe27371218e82794f068..2b6b3d7cc5e0dfdfd6695c6d84a03581d13bc8ad 100644
--- a/www/admin/phpinfo.php
+++ b/www/admin/phpinfo.php
@@ -2,7 +2,7 @@
 
 require_once('../_include.php');
 
-/* Make sure that the user has admin access rights. */
+// Make sure that the user has admin access rights
 SimpleSAML\Utils\Auth::requireAdmin();
 
 phpinfo();
diff --git a/www/saml2/idp/SingleLogoutService.php b/www/saml2/idp/SingleLogoutService.php
index bf3b97828dffee57f13e4e9cc813757f5beac56c..3b730b3be44168d22e7288d1e38c79af2454e239 100644
--- a/www/saml2/idp/SingleLogoutService.php
+++ b/www/saml2/idp/SingleLogoutService.php
@@ -23,7 +23,7 @@ if (isset($_REQUEST['ReturnTo'])) {
         sspmod_saml_IdP_SAML2::receiveLogoutMessage($idp);
     } catch (Exception $e) { // TODO: look for a specific exception
         // This is dirty. Instead of checking the message of the exception, SAML2_Binding::getCurrentBinding() should throw
-        // an specific exception when the binding is unknown, and we should capture that here.
+        // an specific exception when the binding is unknown, and we should capture that here
         if ($e->getMessage() === 'Unable to find the current binding.') {
             throw new SimpleSAML_Error_Error('SLOSERVICEPARAMS', $e, 400);
         } else {
diff --git a/www/saml2/idp/metadata.php b/www/saml2/idp/metadata.php
index fcad630bdc6a60eacf6d249bebd5521f83a40dd2..33197996eec462b8a3b0ccfaf41dc1ad71da0c9f 100644
--- a/www/saml2/idp/metadata.php
+++ b/www/saml2/idp/metadata.php
@@ -104,7 +104,7 @@ try {
     }
 
     if ($idpmeta->getBoolean('saml20.sendartifact', false)) {
-        /* Artifact sending enabled. */
+        // Artifact sending enabled
         $metaArray['ArtifactResolutionService'][] = array(
             'index'    => 0,
             'Location' => \SimpleSAML\Utils\HTTP::getBaseURL().'saml2/idp/ArtifactResolutionService.php',
@@ -113,7 +113,7 @@ try {
     }
 
     if ($idpmeta->getBoolean('saml20.hok.assertion', false)) {
-        /* Prepend HoK SSO Service endpoint. */
+        // Prepend HoK SSO Service endpoint.
         array_unshift($metaArray['SingleSignOnService'], array(
             'hoksso:ProtocolBinding' => SAML2_Const::BINDING_HTTP_REDIRECT,
             'Binding'                => SAML2_Const::BINDING_HOK_SSO,