diff --git a/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php
index 80937863d056dd90796e5fcfcf0908dcaf8ce438..fadc01f90ae60b75a9492ef2f9f1b7631b8d7010 100644
--- a/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php
+++ b/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php
@@ -54,7 +54,7 @@ class EdsBackendFactory implements FactoryInterface
      *
      * @var Zend\Log\LoggerInterface
      */
-    protected $logger;
+    protected $logger = null;
 
     /**
      * Superior service manager.
@@ -63,13 +63,6 @@ class EdsBackendFactory implements FactoryInterface
      */
     protected $serviceLocator;
 
-    /**
-     * VuFind configuration
-     *
-     * @var \Zend\Config\Config
-     */
-    protected $config;
-
     /**
      * EDS configuration
      *
@@ -79,11 +72,11 @@ class EdsBackendFactory implements FactoryInterface
 
     /**
      * EDS Account data
+     *
      * @var array
      */
     protected $accountData;
 
-
     /**
      * Create the backend.
      *
@@ -94,17 +87,12 @@ class EdsBackendFactory implements FactoryInterface
     public function createService(ServiceLocatorInterface $serviceLocator)
     {
         $this->serviceLocator = $serviceLocator;
-        $configReader = $this->serviceLocator->get('VuFind\Config');
-        $this->config = $configReader->get('config');
-        $this->edsConfig = $configReader->get('EDS');
-        $this->accountData = $this->getAccountData();
+        $this->edsConfig = $this->serviceLocator->get('VuFind\Config')->get('EDS');
         if ($this->serviceLocator->has('VuFind\Logger')) {
             $this->logger = $this->serviceLocator->get('VuFind\Logger');
         }
         $connector = $this->createConnector();
-        $backend   = $this->createBackend($connector);
-        $backend->setAuthManager($this->serviceLocator->get('VuFind\AuthManager'));
-        return $backend;
+        return $this->createBackend($connector);
     }
 
     /**
@@ -117,9 +105,11 @@ class EdsBackendFactory implements FactoryInterface
     protected function createBackend(Connector $connector)
     {
         $backend = new Backend(
-            $connector, $this->createRecordCollectionFactory(), $this->accountData
+            $connector, $this->createRecordCollectionFactory(),
+            $this->serviceLocator->get('VuFind\CacheManager')->getCache('object'),
+            new \Zend\Session\Container('EBSCO'), $this->edsConfig
         );
-        $backend->setServiceLocator($this->serviceLocator);
+        $backend->setAuthManager($this->serviceLocator->get('VuFind\AuthManager'));
         $backend->setLogger($this->logger);
         $backend->setQueryBuilder($this->createQueryBuilder());
         return $backend;
@@ -171,32 +161,4 @@ class EdsBackendFactory implements FactoryInterface
         };
         return new RecordCollectionFactory($callback);
     }
-
-
-    /**
-     * Set the default account data for use with the EDS API
-     *
-     * @return array Default account settings
-     */
-    protected function getAccountData()
-    {
-        $accountData = array();
-        if (isset($this->edsConfig->EBSCO_Account->user_name)) {
-            $accountData['username'] = $this->edsConfig->EBSCO_Account->user_name;
-        }
-        if (isset($this->edsConfig->EBSCO_Account->password)) {
-            $accountData['password'] = $this->edsConfig->EBSCO_Account->password;
-        }
-        if (isset($this->edsConfig->EBSCO_Account->ip_auth)) {
-            $accountData['ipauth'] = $this->edsConfig->EBSCO_Account->ip_auth;
-        }
-        if (isset($this->edsConfig->EBSCO_Account->profile)) {
-            $accountData['profile'] = $this->edsConfig->EBSCO_Account->profile;
-        }
-        if (isset($this->edsConfig->EBSCO_Account->organization_id)) {
-            $accountData['orgid'] = $this->edsConfig->EBSCO_Account->organization_id;
-        }
-        return $accountData;
-
-    }
 }
\ No newline at end of file
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php
index d09ed1ad28fb4dc73b22ddfca4c4cdcefbda8d09..e1ae1dff0cb77d4ddb96e838659ebbeba1d8c58e 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php
@@ -44,7 +44,9 @@ use Zend\Log\LoggerInterface;
 use VuFindSearch\Backend\EDS\Response\RecordCollection;
 use VuFindSearch\Backend\EDS\Response\RecordCollectionFactory;
 
-use Zend\ServiceManager\ServiceLocatorInterface;
+use Zend\Cache\Storage\Adapter\AbstractAdapter as CacheAdapter;
+use Zend\Config\Config;
+use Zend\Session\Container as SessionContainer;
 
 /**
  *  EDS API Backend
@@ -55,7 +57,7 @@ use Zend\ServiceManager\ServiceLocatorInterface;
  * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
  * @link     http://vufind.org
  */
-class Backend implements BackendInterface
+class Backend implements BackendInterface, \Zend\Log\LoggerAwareInterface
 {
     /**
      * Client user to make the actually requests to the EdsApi
@@ -69,7 +71,7 @@ class Backend implements BackendInterface
      *
      * @var identifier
      */
-    protected $identifier;
+    protected $identifier = null;
 
     /**
      * Query builder
@@ -107,12 +109,20 @@ class Backend implements BackendInterface
     protected $password = null;
 
     /**
-     * Profile for EBSCO EDS API account
+     * Profile for EBSCO EDS API account (may be overridden)
      *
      * @var string
      */
     protected $profile = null;
 
+    /**
+     * Default profile for EBSCO EDS API account (taken from initial config and
+     * never changed)
+     *
+     * @var string
+     */
+    protected $defaultProfile = null;
+
     /**
      * Whether or not to use IP Authentication for communication with the EDS API
      *
@@ -128,37 +138,64 @@ class Backend implements BackendInterface
     protected $orgid = null;
 
     /**
-     * Superior service manager.
+     * Vufind Authentication manager
      *
-     * @var ServiceLocatorInterface
+     * @var \VuFind\Auth\Manager
      */
-    protected $serviceLocator;
+    protected $authManager = null;
 
     /**
-     * Vufind Authentication manager
+     * Object cache (for storing authentication tokens)
      *
-     * @var \VuFind\Auth\Manager
+     * @var CacheAdapter
      */
-    protected $authManager = null;
+    protected $cache;
+
+    /**
+     * Session container
+     *
+     * @var SessionContainer
+     */
+    protected $session;
 
     /**
      * Constructor.
      *
      * @param ApiClient                        $client  EdsApi client to use
      * @param RecordCollectionFactoryInterface $factory Record collection factory
-     * @param array                            $account Account details
+     * @param CacheAdapter                     $cache   Object cache
+     * @param SessionContainer                 $session Session container
+     * @param Config                           $config  Object representing EDS.ini
      */
     public function __construct(ApiClient $client,
-        RecordCollectionFactoryInterface $factory, array $account
+        RecordCollectionFactoryInterface $factory, CacheAdapter $cache,
+        SessionContainer $session, Config $config = null
     ) {
-        $this->setRecordCollectionFactory($factory);
+        // Save dependencies:
         $this->client = $client;
-        $this->identifier   = null;
-        $this->userName = isset($account['username']) ? $account['username'] : null;
-        $this->password = isset($account['password']) ? $account['password'] : null;
-        $this->ipAuth = isset($account['ipauth']) ? $account['ipauth'] : null;
-        $this->profile = isset($account['profile']) ? $account['profile'] : null;
-        $this->orgId = isset($account['orgid']) ? $account['orgid'] : null;
+        $this->setRecordCollectionFactory($factory);
+        $this->cache = $cache;
+        $this->session = $session;
+
+        // Extract key values from configuration:
+        if (isset($config->EBSCO_Account->user_name)) {
+            $this->userName = $config->EBSCO_Account->user_name;
+        }
+        if (isset($config->EBSCO_Account->password)) {
+            $this->password = $config->EBSCO_Account->password;
+        }
+        if (isset($config->EBSCO_Account->ip_auth)) {
+            $this->ipAuth = $config->EBSCO_Account->ip_auth;
+        }
+        if (isset($config->EBSCO_Account->profile)) {
+            $this->profile = $config->EBSCO_Account->profile;
+        }
+        if (isset($config->EBSCO_Account->organization_id)) {
+            $this->orgId = $config->EBSCO_Account->organization_id;
+        }
+
+        // Save default profile value, since profile property may be overriden:
+        $this->defaultProfile = $this->profile;
     }
 
     /**
@@ -183,28 +220,6 @@ class Backend implements BackendInterface
         return $this->identifier;
     }
 
-    /**
-     * Sets the superior service locator
-     *
-     * @param ServiceLocatorInterface $serviceLocator Superior service locator
-     *
-     * @return void
-     */
-    public function setServiceLocator($serviceLocator)
-    {
-        $this->serviceLocator =  $serviceLocator;
-    }
-
-    /**
-     * gets the superior service locator
-     *
-     * @return ServiceLocatorInterface Superior service locator
-     */
-    public function getServiceLocator()
-    {
-        return $this->serviceLocator;
-    }
-
      /**
      * Perform a search and return record collection.
      *
@@ -302,7 +317,6 @@ class Backend implements BackendInterface
         return $collection;
     }
 
-
     /**
      * Retrieve a single document.
      *
@@ -508,12 +522,10 @@ class Backend implements BackendInterface
         if (!empty($this->ipAuth) && true == $this->ipAuth) {
             return $token;
         }
-        $cache = $this->getServiceLocator()->get('VuFind\CacheManager')
-            ->getCache('object');
         if ($isInvalid) {
-            $cache->setItem('edsAuthenticationToken', null);
+            $this->cache->setItem('edsAuthenticationToken', null);
         }
-        $authTokenData = $cache->getItem('edsAuthenticationToken');
+        $authTokenData = $this->cache->getItem('edsAuthenticationToken');
         if (isset($authTokenData)) {
             $currentToken =  isset($authTokenData['token'])
                 ? $authTokenData['token'] : '';
@@ -544,12 +556,11 @@ class Backend implements BackendInterface
             $token = $results['AuthToken'];
             $timeout = $results['AuthTimeout'] + time();
             $authTokenData = array('token' => $token, 'expiration' => $timeout);
-            $cache->setItem('edsAuthenticationToken', $authTokenData);
+            $this->cache->setItem('edsAuthenticationToken', $authTokenData);
         }
         return $token;
     }
 
-
     /**
      * Print a message if debug is enabled.
      *
@@ -559,14 +570,9 @@ class Backend implements BackendInterface
      */
     protected function debugPrint($msg)
     {
-        if ($this->logger) {
-            $this->logger->debug("$msg\n");
-        } else {
-            parent::debugPrint($msg);
-        }
+        $this->log('debug', "$msg\n");
     }
 
-
     /**
      * Obtain the session token from the Session container. If it doesn't exist,
      * generate a new one.
@@ -579,15 +585,14 @@ class Backend implements BackendInterface
     public function getSessionToken($isInvalid = false)
     {
         $sessionToken = '';
-        $container = new \Zend\Session\Container('EBSCO');
-        if (!$isInvalid && !empty($container->sessionID)) {
+        if (!$isInvalid && !empty($this->session->sessionID)) {
             // check to see if the user has logged in/out between the creation
             // of this session token and now
-            $sessionGuest = $container->sessionGuest;
+            $sessionGuest = $this->session->sessionGuest;
             $currentGuest = $this->isGuest();
 
             if ($sessionGuest == $currentGuest) {
-                return $container->sessionID;
+                return $this->session->sessionID;
             }
         }
 
@@ -610,22 +615,17 @@ class Backend implements BackendInterface
         // using IP Authentication.
         // If IP Authentication is used, then don't treat them as a guest.
         $guest = ($this->isAuthenticationIP()) ? 'n' : $this->isGuest();
-        $container = new \Zend\Session\Container('EBSCO');
 
-        // if there is no profile passed, use the one set in the configuration file
+        // if there is no profile passed, restore the default from the config file
         $profile = $this->profile;
         if (null == $profile) {
-            $config = $this->getServiceLocator()->get('VuFind\Config')->get('EDS');
-            if (isset($config->EBSCO_Account->profile)) {
-                $profile = $config->EBSCO_Account->profile;
-            }
+            $profile = $this->defaultProfile;
         }
         $session = $this->createSession($guest, $profile);
-        $container->sessionID = $session;
-        $container->profileID = $profile;
-        $container->sessionGuest = $guest;
-        return $container->sessionID;
-
+        $this->session->sessionID = $session;
+        $this->session->profileID = $profile;
+        $this->session->sessionGuest = $guest;
+        return $this->session->sessionID;
     }
 
     /**
@@ -649,9 +649,7 @@ class Backend implements BackendInterface
      */
     protected function isAuthenticationIP()
     {
-        $config = $this->getServiceLocator()->get('VuFind\Config')->get('EDS');
-        return (isset($config->EBSCO_Account->ip_auth)
-            && 'true' ==  $config->EBSCO_Account->ip_auth);
+        return 'true' == $this->ipAuth;
     }
 
     /**
@@ -743,10 +741,9 @@ class Backend implements BackendInterface
     */
     protected function createSearchCriteria($sessionToken)
     {
-        $container = new \Zend\Session\Container('EBSCO');
         $info = $this->getInfo($sessionToken);
-        $container->info = $info;
-        return $container->info;
+        $this->session->info = $info;
+        return $this->session->info;
     }
 
 
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php
index d858d600ad4221aba5f4eeed72692f52d713a2b0..0b0adf3463688b28b798d4e4b739210ec7095164 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php
@@ -114,13 +114,22 @@ class BackendTest extends \VuFindTest\Unit\TestCase
      *
      * @param \VuFindSearch\Backend\EDS\Zend2                         $connector Connector
      * @param \VuFindSearch\Response\RecordCollectionFactoryInterface $factory   Record collection factory
+     * @param \Zend\Cache\Storage\Adapter\AbstractAdapter             $cache     Object cache adapter
+     * @param \Zend\Session\Container                                 $container Session container
      * @param array                                                   $settings  Additional settings
      */
-    protected function getBackend($connector, $factory = null, $settings = array())
+    protected function getBackend($connector, $factory = null, $cache = null, $container = null, $settings = array())
     {
         if (null === $factory) {
             $factory = $this->getMock('VuFindSearch\Response\RecordCollectionFactoryInterface');
         }
-        return new Backend($connector, $factory, $settings);
+        if (null === $cache) {
+            $cache = $this->getMock('Zend\Cache\Storage\Adapter\Filesystem');
+        }
+        if (null === $container) {
+            // Using a mock here causes an error for some reason -- investigate later.
+            $container = new \Zend\Session\Container('EBSCO');
+        }
+        return new Backend($connector, $factory, $cache, $container, new \Zend\Config\Config($settings));
     }
 }