diff --git a/lib/SimpleSAML/Store.php b/lib/SimpleSAML/Store.php
index 1aa1d1167616fbcabebe1bce66800a9519aa7f66..5ee6e43760d93df31f4d2651cbbd6c857bac4cc8 100644
--- a/lib/SimpleSAML/Store.php
+++ b/lib/SimpleSAML/Store.php
@@ -2,7 +2,6 @@
 
 namespace SimpleSAML;
 
-
 use SimpleSAML\Error\CriticalConfigurationError;
 
 /**
@@ -12,13 +11,12 @@ use SimpleSAML\Error\CriticalConfigurationError;
  */
 abstract class Store
 {
-
     /**
      * Our singleton instance.
      *
      * This is false if the data store isn't enabled, and null if we haven't attempted to initialize it.
      *
-     * @var Store|false|null
+     * @var \SimpleSAML\Store|false|null
      */
     private static $instance;
 
@@ -26,13 +24,12 @@ abstract class Store
     /**
      * Retrieve our singleton instance.
      *
-     * @return false|Store The data store, or false if it isn't enabled.
+     * @return false|\SimpleSAML\Store The data store, or false if it isn't enabled.
      *
-     * @throws CriticalConfigurationError
+     * @throws \SimpleSAML\Error\CriticalConfigurationError
      */
     public static function getInstance()
     {
-
         if (self::$instance !== null) {
             return self::$instance;
         }
@@ -103,5 +100,4 @@ abstract class Store
      * @param string $key The key.
      */
     abstract public function delete($type, $key);
-
 }
diff --git a/lib/SimpleSAML/Store/Memcache.php b/lib/SimpleSAML/Store/Memcache.php
index c4bdd02e8a3096dde067288202d8e323601bf1bd..b8352078268b2933b7ffb12b6c15a1ac39f01b0d 100644
--- a/lib/SimpleSAML/Store/Memcache.php
+++ b/lib/SimpleSAML/Store/Memcache.php
@@ -2,19 +2,16 @@
 
 namespace SimpleSAML\Store;
 
-use SimpleSAML\Store;
+use \SimpleSAML_Configuration as Configuration;
+use \SimpleSAML\Store;
 
 /**
- * A memcache based datastore.
+ * A memcache based data store.
  *
  * @package SimpleSAMLphp
  */
 class Memcache extends Store
 {
-    /**
-     * Initialize the memcache datastore.
-     */
-
     /**
      * This variable contains the session name prefix.
      *
@@ -22,21 +19,23 @@ class Memcache extends Store
      */
     private $prefix;
 
+
     /**
      * This function implements the constructor for this class. It loads the Memcache configuration.
      */
-    protected function __construct() {
-        $config = \SimpleSAML_Configuration::getInstance();
+    protected function __construct()
+    {
+        $config = Configuration::getInstance();
         $this->prefix = $config->getString('memcache_store.prefix', 'simpleSAMLphp');
     }
 
 
     /**
-     * Retrieve a value from the datastore.
+     * Retrieve a value from the data store.
      *
-     * @param string $type  The datatype.
-     * @param string $key  The key.
-     * @return mixed|NULL  The value.
+     * @param string $type The data type.
+     * @param string $key The key.
+     * @return mixed|null The value.
      */
     public function get($type, $key)
     {
@@ -48,11 +47,11 @@ class Memcache extends Store
 
 
     /**
-     * Save a value to the datastore.
+     * Save a value to the data store.
      *
-     * @param string $type  The datatype.
-     * @param string $key  The key.
-     * @param mixed $value  The value.
+     * @param string $type The data type.
+     * @param string $key The key.
+     * @param mixed $value The value.
      * @param int|NULL $expire  The expiration time (unix timestamp), or NULL if it never expires.
      */
     public function set($type, $key, $value, $expire = null)
@@ -70,10 +69,10 @@ class Memcache extends Store
 
 
     /**
-     * Delete a value from the datastore.
+     * Delete a value from the data store.
      *
-     * @param string $type  The datatype.
-     * @param string $key  The key.
+     * @param string $type The data type.
+     * @param string $key The key.
      */
     public function delete($type, $key)
     {
diff --git a/lib/SimpleSAML/Store/SQL.php b/lib/SimpleSAML/Store/SQL.php
index b6cf384f8732706e10d709218b0e5d05a66905b6..4152d7afb8a0e007d123e7bc0d79e83ba096bacc 100644
--- a/lib/SimpleSAML/Store/SQL.php
+++ b/lib/SimpleSAML/Store/SQL.php
@@ -2,9 +2,9 @@
 
 namespace SimpleSAML\Store;
 
-use SimpleSAML\Logger;
-use SimpleSAML\Store;
-
+use \SimpleSAML_Configuration as Configuration;
+use \SimpleSAML\Logger;
+use \SimpleSAML\Store;
 
 /**
  * A data store using a RDBMS to keep the data.
@@ -13,7 +13,6 @@ use SimpleSAML\Store;
  */
 class SQL extends Store
 {
-
     /**
      * The PDO object for our database.
      *
@@ -51,7 +50,7 @@ class SQL extends Store
      */
     protected function __construct()
     {
-        $config = \SimpleSAML_Configuration::getInstance();
+        $config = Configuration::getInstance();
 
         $dsn = $config->getString('store.sql.dsn');
         $username = $config->getString('store.sql.username', null);
@@ -100,7 +99,6 @@ class SQL extends Store
      */
     private function initKVTable()
     {
-
         if ($this->getTableVersion('kvstore') === 1) {
             // Table initialized
             return;
@@ -191,8 +189,7 @@ class SQL extends 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);
         try {
@@ -212,7 +209,6 @@ class SQL extends Store
         $updateCols = array();
         $condCols = array();
         foreach ($data as $col => $value) {
-
             $tmp = $col.' = :'.$col;
 
             if (in_array($col, $keys, true)) {
@@ -233,7 +229,6 @@ class SQL extends Store
      */
     private function cleanKVStore()
     {
-
         Logger::debug('store.sql: Cleaning key-value store.');
 
         $query = 'DELETE FROM '.$this->prefix.'_kvstore WHERE _expire < :now';
@@ -323,7 +318,6 @@ class SQL extends Store
             '_expire' => $expire,
         );
 
-
         $this->insertOrUpdate($this->prefix.'_kvstore', array('_type', '_key'), $data);
     }
 
diff --git a/tests/lib/SimpleSAML/Store/SQLTest.php b/tests/lib/SimpleSAML/Store/SQLTest.php
index 33187547c0a6ef2a7ff8c99df5f530c06fd48cb6..09b4ddbf5a9964662e5f7536be8c2adec472d392 100644
--- a/tests/lib/SimpleSAML/Store/SQLTest.php
+++ b/tests/lib/SimpleSAML/Store/SQLTest.php
@@ -1,14 +1,19 @@
 <?php
-/*
- * This file is part of the sgomezsimplesamlphp.
+
+namespace SimpleSAML\Test\Store;
+
+use \SimpleSAML_Configuration as Configuration;
+use \SimpleSAML\Store;
+
+/**
+ * Tests for the SQL store.
  *
- * (c) Sergio GĂłmez <sergio@uco.es>
+ * For the full copyright and license information, please view the LICENSE file that was distributed with this source
+ * code.
  *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
+ * @author Sergio GĂłmez <sergio@uco.es>
+ * @package simplesamlphp/simplesamlphp
  */
-
-
 class SQLTest extends \PHPUnit_Framework_TestCase
 {
     protected function setUp()
@@ -21,26 +26,26 @@ class SQLTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @covers SimpleSAML\Store::getInstance
-     * @covers SimpleSAML\Store\SQL::__construct
+     * @covers \SimpleSAML\Store::getInstance
+     * @covers \SimpleSAML\Store\SQL::__construct
      * @test
      */
     public function SQLInstance()
     {
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $this->assertInstanceOf('SimpleSAML\Store\SQL', $store);
     }
 
     /**
-     * @covers SimpleSAML\Store\SQL::initTableVersionTable
-     * @covers SimpleSAML\Store\SQL::initKVTable
+     * @covers \SimpleSAML\Store\SQL::initTableVersionTable
+     * @covers \SimpleSAML\Store\SQL::initKVTable
      * @test
      */
     public function kvstoreTableVersion()
     {
         /** @var \SimpleSAML\Store\SQL $store */
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $version = $store->getTableVersion('kvstore');
 
@@ -48,13 +53,13 @@ class SQLTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @covers SimpleSAML\Store\SQL::getTableVersion
+     * @covers \SimpleSAML\Store\SQL::getTableVersion
      * @test
      */
     public function newTableVersion()
     {
         /** @var \SimpleSAML\Store\SQL $store */
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $version = $store->getTableVersion('test');
 
@@ -62,14 +67,14 @@ class SQLTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @covers SimpleSAML\Store\SQL::setTableVersion
-     * @covers SimpleSAML\Store\SQL::insertOrUpdate
+     * @covers \SimpleSAML\Store\SQL::setTableVersion
+     * @covers \SimpleSAML\Store\SQL::insertOrUpdate
      * @test
      */
     public function testSetTableVersion()
     {
         /** @var \SimpleSAML\Store\SQL $store */
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $store->setTableVersion('kvstore', 2);
         $version = $store->getTableVersion('kvstore');
@@ -78,13 +83,13 @@ class SQLTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @covers SimpleSAML\Store\SQL::get
+     * @covers \SimpleSAML\Store\SQL::get
      * @test
      */
     public function testGetEmptyData()
     {
         /** @var \SimpleSAML\Store\SQL $store */
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $value = $store->get('test', 'foo');
 
@@ -92,15 +97,15 @@ class SQLTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @covers SimpleSAML\Store\SQL::get
-     * @covers SimpleSAML\Store\SQL::set
-     * @covers SimpleSAML\Store\SQL::insertOrUpdate
+     * @covers \SimpleSAML\Store\SQL::get
+     * @covers \SimpleSAML\Store\SQL::set
+     * @covers \SimpleSAML\Store\SQL::insertOrUpdate
      * @test
      */
     public function testInsertData()
     {
         /** @var \SimpleSAML\Store\SQL $store */
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
         
         $store->set('test', 'foo', 'bar');
         $value = $store->get('test', 'foo');
@@ -109,15 +114,15 @@ class SQLTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @covers SimpleSAML\Store\SQL::get
-     * @covers SimpleSAML\Store\SQL::set
-     * @covers SimpleSAML\Store\SQL::insertOrUpdate
+     * @covers \SimpleSAML\Store\SQL::get
+     * @covers \SimpleSAML\Store\SQL::set
+     * @covers \SimpleSAML\Store\SQL::insertOrUpdate
      * @test
      */
     public function testOverwriteData()
     {
         /** @var \SimpleSAML\Store\SQL $store */
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $store->set('test', 'foo', 'bar');
         $store->set('test', 'foo', 'baz');
@@ -127,16 +132,16 @@ class SQLTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @covers SimpleSAML\Store\SQL::get
-     * @covers SimpleSAML\Store\SQL::set
-     * @covers SimpleSAML\Store\SQL::insertOrUpdate
-     * @covers SimpleSAML\Store\SQL::delete
+     * @covers \SimpleSAML\Store\SQL::get
+     * @covers \SimpleSAML\Store\SQL::set
+     * @covers \SimpleSAML\Store\SQL::insertOrUpdate
+     * @covers \SimpleSAML\Store\SQL::delete
      * @test
      */
     public function testDeleteData()
     {
         /** @var \SimpleSAML\Store\SQL $store */
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $store->set('test', 'foo', 'bar');
         $store->delete('test', 'foo');
@@ -146,16 +151,16 @@ class SQLTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @covers SimpleSAML\Store\SQL::get
-     * @covers SimpleSAML\Store\SQL::set
-     * @covers SimpleSAML\Store\SQL::insertOrUpdate
-     * @covers SimpleSAML\Store\SQL::delete
+     * @covers \SimpleSAML\Store\SQL::get
+     * @covers \SimpleSAML\Store\SQL::set
+     * @covers \SimpleSAML\Store\SQL::insertOrUpdate
+     * @covers \SimpleSAML\Store\SQL::delete
      * @test
      */
     public function testVeryLongKey()
     {
         /** @var \SimpleSAML\Store\SQL $store */
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $key = str_repeat('x', 100);
         $store->set('test', $key, 'bar');
@@ -167,8 +172,8 @@ class SQLTest extends \PHPUnit_Framework_TestCase
 
     protected function tearDown()
     {
-        $config = SimpleSAML_Configuration::getInstance();
-        $store = \SimpleSAML\Store::getInstance();
+        $config = Configuration::getInstance();
+        $store = Store::getInstance();
 
         $this->clearInstance($config, '\SimpleSAML_Configuration');
         $this->clearInstance($store, '\SimpleSAML\Store');
@@ -176,10 +181,10 @@ class SQLTest extends \PHPUnit_Framework_TestCase
 
     protected function clearInstance($service, $className)
     {
-        $reflectedClass = new ReflectionClass($className);
+        $reflectedClass = new \ReflectionClass($className);
         $reflectedInstance = $reflectedClass->getProperty('instance');
         $reflectedInstance->setAccessible(true);
         $reflectedInstance->setValue($service, null);
         $reflectedInstance->setAccessible(false);
     }
-}
\ No newline at end of file
+}
diff --git a/tests/lib/SimpleSAML/StoreTest.php b/tests/lib/SimpleSAML/StoreTest.php
index 2165bb4e79eea62727345189128c33f377538c4d..6fd9650fc9120938c36112cefe75ab6984351b1d 100644
--- a/tests/lib/SimpleSAML/StoreTest.php
+++ b/tests/lib/SimpleSAML/StoreTest.php
@@ -1,14 +1,19 @@
 <?php
-/*
- * This file is part of the sgomezsimplesamlphp.
+
+namespace SimpleSAML\Test;
+
+use \SimpleSAML_Configuration as Configuration;
+use \SimpleSAML\Store;
+
+/**
+ * Tests for the Store abstract class.
  *
- * (c) Sergio GĂłmez <sergio@uco.es>
+ * For the full copyright and license information, please view the LICENSE file that was distributed with this source
+ * code.
  *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
+ * @author Sergio GĂłmez <sergio@uco.es>
+ * @package simplesamlphp/simplesamlphp
  */
-
-
 class StoreTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -17,108 +22,115 @@ class StoreTest extends \PHPUnit_Framework_TestCase
      */
     public function defaultStore()
     {
-        \SimpleSAML_Configuration::loadFromArray(array(
+        Configuration::loadFromArray(array(
         ), '[ARRAY]', 'simplesaml');
 
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $this->assertEquals(false, $store);
     }
 
+
     /**
      * @covers \SimpleSAML\Store::getInstance
      * @test
      */
     public function phpSessionStore()
     {
-        \SimpleSAML_Configuration::loadFromArray(array(
+        Configuration::loadFromArray(array(
         ), '[ARRAY]', 'simplesaml');
 
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $this->assertEquals(false, $store);
     }
 
+
     /**
      * @covers \SimpleSAML\Store::getInstance
      * @test
      */
     public function memcacheStore()
     {
-        \SimpleSAML_Configuration::loadFromArray(array(
+        Configuration::loadFromArray(array(
             'store.type'                    => 'memcache',
         ), '[ARRAY]', 'simplesaml');
 
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $this->assertInstanceOf('\SimpleSAML\Store\Memcache', $store);
     }
 
+
     /**
-     * @covers SimpleSAML\Store::getInstance
+     * @covers \SimpleSAML\Store::getInstance
      * @test
      */
     public function sqlStore()
     {
-        \SimpleSAML_Configuration::loadFromArray(array(
+        Configuration::loadFromArray(array(
             'store.type'                    => 'sql',
             'store.sql.dsn'                 => 'sqlite::memory:',
             'store.sql.prefix'              => 'phpunit_',
         ), '[ARRAY]', 'simplesaml');
 
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $this->assertInstanceOf('SimpleSAML\Store\SQL', $store);
     }
 
+
     /**
-     * @covers SimpleSAML\Store::getInstance
+     * @covers \SimpleSAML\Store::getInstance
      * @test
      */
     public function pathStore()
     {
-        \SimpleSAML_Configuration::loadFromArray(array(
+        Configuration::loadFromArray(array(
             'store.type'                    => '\SimpleSAML\Store\SQL',
             'store.sql.dsn'                 => 'sqlite::memory:',
             'store.sql.prefix'              => 'phpunit_',
         ), '[ARRAY]', 'simplesaml');
 
-        $store = \SimpleSAML\Store::getInstance();
+        $store = Store::getInstance();
 
         $this->assertInstanceOf('SimpleSAML\Store\SQL', $store);
     }
 
+
     /**
-     * @covers SimpleSAML\Store::getInstance
-     * @expectedException SimpleSAML\Error\CriticalConfigurationError
+     * @covers \SimpleSAML\Store::getInstance
+     * @expectedException \SimpleSAML\Error\CriticalConfigurationError
      * @test
      */
     public function notFoundStoreException()
     {
-        \SimpleSAML_Configuration::loadFromArray(array(
+        Configuration::loadFromArray(array(
             'store.type'                    => '\Test\SimpleSAML\Store\Dummy',
             'store.sql.dsn'                 => 'sqlite::memory:',
             'store.sql.prefix'              => 'phpunit_',
         ), '[ARRAY]', 'simplesaml');
 
-        $store = \SimpleSAML\Store::getInstance();
+        Store::getInstance();
     }
-    
+
+
     protected function tearDown()
     {
-        $config = SimpleSAML_Configuration::getInstance();
-        $store = \SimpleSAML\Store::getInstance();
+        $config = Configuration::getInstance();
+        $store = Store::getInstance();
 
         $this->clearInstance($config, '\SimpleSAML_Configuration');
         $this->clearInstance($store, '\SimpleSAML\Store');
     }
 
+
     protected function clearInstance($service, $className)
     {
-        $reflectedClass = new ReflectionClass($className);
+        $reflectedClass = new \ReflectionClass($className);
         $reflectedInstance = $reflectedClass->getProperty('instance');
         $reflectedInstance->setAccessible(true);
         $reflectedInstance->setValue($service, null);
         $reflectedInstance->setAccessible(false);
     }
-}
\ No newline at end of file
+}