diff --git a/lib/SimpleSAML/Auth/TimeLimitedToken.php b/lib/SimpleSAML/Auth/TimeLimitedToken.php
index 2c48723f8a2ad649396729325623b2fe8b9717b6..c4b126d39ecd6a6ce9055c5d7116a37e5b2344b0 100644
--- a/lib/SimpleSAML/Auth/TimeLimitedToken.php
+++ b/lib/SimpleSAML/Auth/TimeLimitedToken.php
@@ -14,7 +14,7 @@ class SimpleSAML_Auth_TimeLimitedToken {
 	 */
 	public function __construct( $lifetime = 900, $secretSalt = NULL, $skew = 1) {
 		if ($secretSalt === NULL) {
-			$secretSalt = SimpleSAML_Utils_Config::getSecretSalt();
+			$secretSalt = SimpleSAML\Utils\Config::getSecretSalt();
 		}
 	
 		$this->secretSalt = $secretSalt;
diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php
index 673c5057e47d8b3100297a0cfc2253bceb314a81..6dff8e3fe71dc9e8376da7afb47b2f8c29da3f46 100644
--- a/lib/SimpleSAML/Utilities.php
+++ b/lib/SimpleSAML/Utilities.php
@@ -979,10 +979,10 @@ class SimpleSAML_Utilities {
 
 
 	/**
-	 * @deprecated This function will be removed in SSP 2.0. Please use SimpleSAML_Utils_Config::getSecretSalt() instead.
+	 * @deprecated This function will be removed in SSP 2.0. Please use SimpleSAML\Utils\Config::getSecretSalt() instead.
 	 */
 	public static function getSecretSalt() {
-		return SimpleSAML_Utils_Config::getSecretSalt();
+		return SimpleSAML\Utils\Config::getSecretSalt();
 	}
 
 
diff --git a/lib/SimpleSAML/Utils/Config.php b/lib/SimpleSAML/Utils/Config.php
index 43ade2aa672a63fe598f2089798fb557e3e2781f..0330c92cdcd4b58dc87f585ffda398bbaededb20 100644
--- a/lib/SimpleSAML/Utils/Config.php
+++ b/lib/SimpleSAML/Utils/Config.php
@@ -1,12 +1,12 @@
 <?php
-
+namespace SimpleSAML\Utils;
 
 /**
  * Utility class for SimpleSAMLphp configuration management and manipulation.
  *
  * @package SimpleSAMLphp
  */
-class SimpleSAML_Utils_Config
+class Config
 {
 
     /**
@@ -21,14 +21,14 @@ class SimpleSAML_Utils_Config
      *
      * @return string The secret salt.
      *
-     * @throws SimpleSAML_Error_Exception If the secret salt hasn't been configured.
-     * @author Olav Morken, UNINETT AS <olav.morken@uninett.no> 
+     * @throws \SimpleSAML_Error_Exception If the secret salt hasn't been configured.
+     * @author Olav Morken, UNINETT AS <olav.morken@uninett.no>
      */
     public static function getSecretSalt()
     {
-        $secretSalt = SimpleSAML_Configuration::getInstance()->getString('secretsalt');
+        $secretSalt = \SimpleSAML_Configuration::getInstance()->getString('secretsalt');
         if ($secretSalt === 'defaultsecretsalt') {
-            throw new SimpleSAML_Error_Exception('The "secretsalt" configuration option must be set to a secret value.');
+            throw new \SimpleSAML_Error_Exception('The "secretsalt" configuration option must be set to a secret value.');
         }
 
         return $secretSalt;
diff --git a/lib/SimpleSAML/Utils/Crypto.php b/lib/SimpleSAML/Utils/Crypto.php
index d7eee79abdd844846743153df41e02d39eea577f..d54dfddd9547cc6b339d7b81114973f76e2aa314 100644
--- a/lib/SimpleSAML/Utils/Crypto.php
+++ b/lib/SimpleSAML/Utils/Crypto.php
@@ -34,7 +34,7 @@ class SimpleSAML_Utils_Crypto
         $ivSize = mcrypt_get_iv_size($enc, $mode);
         $keySize = mcrypt_get_key_size($enc, $mode);
 
-        $key = hash('sha256', SimpleSAML_Utils_Config::getSecretSalt(), true);
+        $key = hash('sha256', SimpleSAML\Utils\Config::getSecretSalt(), true);
         $key = substr($key, 0, $keySize);
 
         $iv = substr($ciphertext, 0, $ivSize);
@@ -75,7 +75,7 @@ class SimpleSAML_Utils_Crypto
         $ivSize = mcrypt_get_iv_size($enc, $mode);
         $keySize = mcrypt_get_key_size($enc, $mode);
 
-        $key = hash('sha256', SimpleSAML_Utils_Config::getSecretSalt(), true);
+        $key = hash('sha256', SimpleSAML\Utils\Config::getSecretSalt(), true);
         $key = substr($key, 0, $keySize);
 
         $len = strlen($data);
diff --git a/lib/SimpleSAML/Utils/Random.php b/lib/SimpleSAML/Utils/Random.php
index 794c02a7ebe7bd105fe459b09401e7556a4a9bc8..fc87dcf7c27b994b31683654d61f0292202054cb 100644
--- a/lib/SimpleSAML/Utils/Random.php
+++ b/lib/SimpleSAML/Utils/Random.php
@@ -1,12 +1,11 @@
 <?php
+namespace SimpleSAML\Utils;
+
 /**
  * Utility class for random data generation and manipulation.
  *
  * @package SimpleSAMLphp
  */
-
-namespace SimpleSAML\Utils;
-
 class Random
 {
 
diff --git a/modules/consent/lib/Auth/Process/Consent.php b/modules/consent/lib/Auth/Process/Consent.php
index 87c954d525778624ff84412e060196e95f614f13..051459aedf4fcd5d5d5092357ab6f717caf8a9f2 100644
--- a/modules/consent/lib/Auth/Process/Consent.php
+++ b/modules/consent/lib/Auth/Process/Consent.php
@@ -290,7 +290,7 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt
      */
     public static function getHashedUserID($userid, $source)
     {
-        return hash('sha1', $userid . '|' . SimpleSAML_Utils_Config::getSecretSalt() . '|' . $source);
+        return hash('sha1', $userid . '|' . SimpleSAML\Utils\Config::getSecretSalt() . '|' . $source);
     }
 
     /**
@@ -304,7 +304,7 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt
      */
     public static function getTargetedID($userid, $source, $destination)
     {
-        return hash('sha1', $userid . '|' . SimpleSAML_Utils_Config::getSecretSalt() . '|' . $source . '|' . $destination);
+        return hash('sha1', $userid . '|' . SimpleSAML\Utils\Config::getSecretSalt() . '|' . $source . '|' . $destination);
     }
 
     /**
diff --git a/modules/consent/lib/Consent/Store/Cookie.php b/modules/consent/lib/Consent/Store/Cookie.php
index 81ce16fbd1ed4a6ef7341a72da38a14894d22e9b..b8ca9ba482a89079b49988f91fa4e01b847d011a 100644
--- a/modules/consent/lib/Consent/Store/Cookie.php
+++ b/modules/consent/lib/Consent/Store/Cookie.php
@@ -199,7 +199,7 @@ class sspmod_consent_Consent_Store_Cookie extends sspmod_consent_Store
     {
         assert('is_string($data)');
 
-        $secretSalt = SimpleSAML_Utils_Config::getSecretSalt();
+        $secretSalt = SimpleSAML\Utils\Config::getSecretSalt();
 
         return sha1($secretSalt . $data . $secretSalt) . ':' . $data;
     }
diff --git a/modules/core/lib/Auth/Process/TargetedID.php b/modules/core/lib/Auth/Process/TargetedID.php
index 4cc86ff539a3f818e266f38744d5239892af6130..1151a24c990d36cea1bbc05ee7fd18f16530e836 100644
--- a/modules/core/lib/Auth/Process/TargetedID.php
+++ b/modules/core/lib/Auth/Process/TargetedID.php
@@ -100,7 +100,7 @@ class sspmod_core_Auth_Process_TargetedID extends SimpleSAML_Auth_ProcessingFilt
 		}
 
 
-		$secretSalt = SimpleSAML_Utils_Config::getSecretSalt();
+		$secretSalt = SimpleSAML\Utils\Config::getSecretSalt();
 
 		if (array_key_exists('Source', $state)) {
 			$srcID = self::getEntityId($state['Source']);
diff --git a/modules/saml/lib/Auth/Process/PersistentNameID.php b/modules/saml/lib/Auth/Process/PersistentNameID.php
index 3f0f478f343181d345ee1448ba201302b43eaeae..255764f3417476a7500d191c0a7db65211453935 100644
--- a/modules/saml/lib/Auth/Process/PersistentNameID.php
+++ b/modules/saml/lib/Auth/Process/PersistentNameID.php
@@ -64,7 +64,7 @@ class sspmod_saml_Auth_Process_PersistentNameID extends sspmod_saml_BaseNameIDGe
 		$uid = array_values($state['Attributes'][$this->attribute]); /* Just in case the first index is no longer 0. */
 		$uid = $uid[0];
 
-		$secretSalt = SimpleSAML_Utils_Config::getSecretSalt();
+		$secretSalt = SimpleSAML\Utils\Config::getSecretSalt();
 
 		$uidData = 'uidhashbase' . $secretSalt;
 		$uidData .= strlen($idpEntityId) . ':' . $idpEntityId;
diff --git a/modules/saml/lib/IdP/SAML2.php b/modules/saml/lib/IdP/SAML2.php
index c67ecf5a3f0fae439a130789e2228e2bf1d6f3ec..ae9a6d4fbd5f7dedc81eee0261631cf10f9fdc6c 100644
--- a/modules/saml/lib/IdP/SAML2.php
+++ b/modules/saml/lib/IdP/SAML2.php
@@ -628,7 +628,7 @@ class sspmod_saml_IdP_SAML2 {
 				$idpEntityId = $idpMetadata->getString('entityid');
 				$spEntityId = $spMetadata->getString('entityid');
 
-				$secretSalt = SimpleSAML_Utils_Config::getSecretSalt();
+				$secretSalt = SimpleSAML\Utils\Config::getSecretSalt();
 
 				$uidData = 'uidhashbase' . $secretSalt;
 				$uidData .= strlen($idpEntityId) . ':' . $idpEntityId;