diff --git a/README.md b/README.md
index 2be3abe..7c10d01 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,34 @@ Importing all configs during development is not convenient and can lead to a bad
 
 So there is a need for importing only of specific configs via `hook_update_N()`.
 
+## Usage
+
+All the work happening with the `config_import.importer` service. Let's instantiate it:
+
+```php
+/* @var \Drupal\config_import\ConfigImporterService $config_importer */
+$config_importer = \Drupal::service('config_import.importer');
+```
+
+By default, import and export operations will use the [sync](https://www.drupal.org/docs/8/configuration-management/changing-the-storage-location-of-the-sync-directory) directory. But, if needed, it could be changed to a path of existing directory or type of already configured configuration directories. For instance:
+
+```php
+// $config_importer->setDirectory(CONFIG_STAGING_DIRECTORY);
+$config_importer->setDirectory('/var/config');
+```
+
+You may do so to import existing configs:
+
+```php
+$config_importer->importConfigs(['core.extension']);
+```
+
+And export can be achieved with a similar construction:
+
+```php
+$config_importer->exportConfigs(['core.extension']);
+```
+
 ## Drush integration
 
 Execute the next command to see the list of available commands from a group:
@@ -19,7 +47,3 @@ Then use the following syntax to find out more information about concrete comman
 ```shell
 drush help COMMAND_NAME
 ```
-
-## Todo
-
-- Add tests.
diff --git a/config_import.info.yml b/config_import.info.yml
index ca6579a..b7717fc 100644
--- a/config_import.info.yml
+++ b/config_import.info.yml
@@ -1,6 +1,5 @@
 name: Config Import
-type: module
 description: Clever configuration import.
+package: Configuration
+type: module
 core: 8.x
-package: FFW
-
diff --git a/config_import.services.yml b/config_import.services.yml
index cc0bb6e..1dcba3d 100644
--- a/config_import.services.yml
+++ b/config_import.services.yml
@@ -1,4 +1,15 @@
 services:
   config_import.importer:
     class: Drupal\config_import\ConfigImporterService
-    arguments: ["@uuid", "@config.storage", "@config.manager", "@event_dispatcher", "@lock", "@config.typed", "@module_handler", "@module_installer", "@theme_handler", "@string_translation", "@file_system"]
+    arguments:
+     - @uuid
+     - @config.storage
+     - @config.manager
+     - @event_dispatcher
+     - @lock
+     - @config.typed
+     - @module_handler
+     - @module_installer
+     - @theme_handler
+     - @string_translation
+     - @file_system
diff --git a/src/ConfigImporterService.php b/src/ConfigImporterService.php
index 64a3a44..b679012 100644
--- a/src/ConfigImporterService.php
+++ b/src/ConfigImporterService.php
@@ -2,9 +2,7 @@
 
 namespace Drupal\config_import;
 
-use Drupal\Component\Uuid\UuidInterface;
 use Drupal\Core\Config\CachedStorage;
-use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher;
 use Drupal\Core\Config\ConfigImporterException;
 use Drupal\Core\Config\ConfigManagerInterface;
 use Drupal\Core\Lock\LockBackendInterface;
@@ -15,15 +13,15 @@ use Drupal\Core\Extension\ThemeHandler;
 use Drupal\Core\StringTranslation\TranslationManager;
 use Drupal\Core\File\FileSystem;
 use Drupal\Core\Config\ConfigException;
-use Exception;
 use Drupal\Core\Config\FileStorage;
 use Drupal\Core\Config\StorageComparer;
 use Drupal\Core\Config\ConfigImporter;
+use Drupal\Component\Uuid\UuidInterface;
+use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Class ConfigImporterService.
- *
- * @package Drupal\config_import
  */
 class ConfigImporterService implements ConfigImporterServiceInterface {
 
@@ -33,76 +31,72 @@ class ConfigImporterService implements ConfigImporterServiceInterface {
    * @var UuidInterface
    */
   protected $uuid;
-
   /**
    * CachedStorage definition.
    *
    * @var CachedStorage
    */
   protected $configStorage;
-
   /**
    * ConfigManager definition.
    *
    * @var ConfigManagerInterface
    */
   protected $configManager;
-
   /**
    * ContainerAwareEventDispatcher definition.
    *
    * @var ContainerAwareEventDispatcher
    */
   protected $eventDispatcher;
-
   /**
    * LockBackend definition.
    *
    * @var LockBackendInterface
    */
   protected $lock;
-
   /**
    * TypedConfigManager definition.
    *
    * @var TypedConfigManager
    */
   protected $configTyped;
-
   /**
    * ModuleHandler definition.
    *
    * @var ModuleHandler
    */
   protected $moduleHandler;
-
   /**
    * ModuleInstaller definition.
    *
    * @var ModuleInstaller
    */
   protected $moduleInstaller;
-
   /**
    * ThemeHandler definition.
    *
    * @var ThemeHandler
    */
   protected $themeHandler;
-
   /**
    * TranslationManager definition.
    *
    * @var TranslationManager
    */
   protected $translationManager;
-
   /**
    * FileSystem definition.
    *
    * @var FileSystem
    */
   protected $fileSystem;
+  /**
+   * Path to directory where configs located.
+   *
+   * @var string
+   */
+  protected $directory = '';
 
   /**
    * ConfigImporterService constructor.
@@ -130,7 +124,19 @@ class ConfigImporterService implements ConfigImporterServiceInterface {
    * @param FileSystem $file_system
    *   FileSystem.
    */
-  public function __construct(UuidInterface $uuid, CachedStorage $config_storage, ConfigManagerInterface $config_manager, ContainerAwareEventDispatcher $event_dispatcher, LockBackendInterface $lock, TypedConfigManager $config_typed, ModuleHandler $module_handler, ModuleInstaller $module_installer, ThemeHandler $theme_handler, TranslationManager $translation_manager, FileSystem $file_system) {
+  public function __construct(
+    UuidInterface $uuid,
+    CachedStorage $config_storage,
+    ConfigManagerInterface $config_manager,
+    ContainerAwareEventDispatcher $event_dispatcher,
+    LockBackendInterface $lock,
+    TypedConfigManager $config_typed,
+    ModuleHandler $module_handler,
+    ModuleInstaller $module_installer,
+    ThemeHandler $theme_handler,
+    TranslationManager $translation_manager,
+    FileSystem $file_system
+  ) {
     $this->uuid = $uuid;
     $this->configStorage = $config_storage;
     $this->configManager = $config_manager;
@@ -142,39 +148,144 @@ class ConfigImporterService implements ConfigImporterServiceInterface {
     $this->themeHandler = $theme_handler;
     $this->translationManager = $translation_manager;
     $this->fileSystem = $file_system;
+
+    // Sync directory must be configured.
+    $this->setDirectory(CONFIG_SYNC_DIRECTORY);
   }
 
   /**
    * {@inheritdoc}
    */
-  public function importConfigs(array $files) {
-    // @todo The next string doesn't work during installation. Hardcode it.
-    // $uri = 'temporary://confi_tmp_' . $this->uuid->->generate();
-    $tmp_dir = '/tmp/confi_tmp_' . $this->uuid->generate();
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('uuid'),
+      $container->get('config.storage'),
+      $container->get('config.manager'),
+      $container->get('event_dispatcher'),
+      $container->get('lock'),
+      $container->get('config.typed'),
+      $container->get('module_handler'),
+      $container->get('module_installer'),
+      $container->get('theme_handler'),
+      $container->get('string_translation'),
+      $container->get('file_system')
+    );
+  }
 
-    try {
-      $this->export($tmp_dir);
+  /**
+   * Set path to directory where configs stored.
+   *
+   * @param string $directory
+   *   Path to directory with configs or type of config directory.
+   */
+  public function setDirectory($directory) {
+    if (!is_dir($directory)) {
+      $directory = config_get_config_directory($directory);
+    }
+
+    if (!is_dir($directory)) {
+      throw new \InvalidArgumentException($directory . ' - is not valid path or type of directory with configurations.');
+    }
+
+    $this->directory = $directory;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getDirectory() {
+    return $this->directory;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function importConfigs(array $configs) {
+    // Stream wrappers are not available during installation.
+    $tmp_dir = (defined('MAINTENANCE_MODE') ? '/tmp' : 'temporary:/') . '/confi_' . $this->uuid->generate();
+
+    if (!$this->fileSystem->mkdir($tmp_dir)) {
+      throw new ConfigImporterException('Failed to create temporary directory: ' . $tmp_dir);
     }
-    catch (Exception $e) {
-      throw new ConfigImporterException($e->getMessage());
+
+    // Define temporary storage for our shenanigans.
+    $tmp_storage = new FileStorage($tmp_dir);
+    // Dump all configurations into temporary directory.
+    $this->export($tmp_storage);
+
+    // Overwrite exported configurations by our custom ones.
+    foreach ($configs as $config) {
+      $file = "$this->directory/$config.yml";
+
+      if (file_exists($file)) {
+        file_unmanaged_copy($file, $tmp_dir, FILE_EXISTS_REPLACE);
+      }
+      else {
+        // Possibly, config has been exported a little bit above. This could
+        // happen if you removed it from disc, but not from database. Export
+        // operation will generate it inside of temporary storage and we should
+        // take care about this.
+        $tmp_storage->delete($config);
+        // Remove config if it was specified, but file does not exists.
+        $this->configStorage->delete($config);
+      }
     }
 
-    foreach ($files as $source) {
-      file_unmanaged_copy($source, $tmp_dir, FILE_EXISTS_REPLACE);
+    // Remove configurations from storage which are not allowed for import.
+    $this->filter($tmp_storage);
+    // Import changed, just overwritten items, into config storage.
+    $this->import($tmp_storage);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function exportConfigs(array $configs) {
+    $storage = new FileStorage($this->directory);
+
+    foreach ($configs as $config) {
+      $storage->write($config, $this->configStorage->read($config));
     }
+  }
+
+  /**
+   * Clean storage.
+   *
+   * @param FileStorage $storage
+   *   A storage to prepare.
+   *
+   * @see hook_config_import_configs_alter()
+   */
+  protected function filter(FileStorage $storage) {
+    $configs = [];
+    // Collect config names which are not allowed for import.
+    $this->moduleHandler->alter('config_import_configs', $configs);
 
-    $this->import($tmp_dir);
+    foreach ($configs as $config) {
+      $storage->delete($config);
+    }
   }
 
   /**
-   * Import config from temporary directory.
+   * Dump configurations to files storage.
    *
-   * @param string $dir
-   *   Temporary directory.
+   * @param FileStorage $storage
+   *   A storage to dump to.
    */
-  protected function import($dir) {
-    $source_storage = new FileStorage($dir);
-    $storage_comparer = new StorageComparer($source_storage, $this->configStorage, $this->configManager);
+  protected function export(FileStorage $storage) {
+    foreach ($this->configStorage->listAll() as $config) {
+      $storage->write($config, $this->configStorage->read($config));
+    }
+  }
+
+  /**
+   * Import configurations from files storage.
+   *
+   * @param FileStorage $storage
+   *   A storage to import from.
+   */
+  protected function import(FileStorage $storage) {
+    $storage_comparer = new StorageComparer($storage, $this->configStorage, $this->configManager);
 
     if (!$storage_comparer->createChangelist()->hasChanges()) {
       return;
@@ -196,37 +307,7 @@ class ConfigImporterService implements ConfigImporterServiceInterface {
       $config_importer->import();
     }
     catch (ConfigException $e) {
-      $message = 'The import failed due for the following reasons:' . "\n";
-      $message .= implode("\n", $config_importer->getErrors());
-      throw new ConfigImporterException($message);
-    }
-  }
-
-  /**
-   * Export configuration to temporary directory.
-   *
-   * @param string $dir
-   *   Path to directory.
-   *
-   * @throws \Exception
-   *   When fails to create temporary directory.
-   */
-  protected function export($dir) {
-    $result = $this->fileSystem->mkdir($dir);
-    if (!$result) {
-      throw new \Exception('Failed to create temporary directory: ' . $dir);
-    }
-    $source_storage = $this->configStorage;
-    $destination_storage = new FileStorage($dir);
-
-    $filters = [];
-    $this->moduleHandler->alter('config_import_configs', $filters);
-
-    foreach ($source_storage->listAll() as $name) {
-      if (in_array($name, $filters)) {
-        continue;
-      }
-      $destination_storage->write($name, $source_storage->read($name));
+      throw new ConfigImporterException(implode("\n", $config_importer->getErrors()));
     }
   }
 
diff --git a/src/ConfigImporterServiceInterface.php b/src/ConfigImporterServiceInterface.php
index 69cd4e4..bc053c2 100644
--- a/src/ConfigImporterServiceInterface.php
+++ b/src/ConfigImporterServiceInterface.php
@@ -2,19 +2,39 @@
 
 namespace Drupal\config_import;
 
+use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
+
 /**
  * Interface ConfigImporterServiceInterface.
- *
- * @package Drupal\config_import
  */
-interface ConfigImporterServiceInterface {
+interface ConfigImporterServiceInterface extends ContainerInjectionInterface {
+
+  /**
+   * Import configurations.
+   *
+   * @param string[] $configs
+   *   Configurations to import.
+   *
+   * @example
+   * The next example will import the following configs:
+   * - /directory/outside/webroot/user.role.authenticated.yml
+   * - /directory/outside/webroot/user.role.anonymous.yml
+   *
+   * @code
+   * $this->importConfigs([
+   *   'user.role.authenticated',
+   *   'user.role.anonymous',
+   * ]);
+   * @endcode
+   */
+  public function importConfigs(array $configs);
 
   /**
-   * Import config files.
+   * Export configurations.
    *
-   * @param array $files
-   *   Config files to import.
+   * @param string[] $configs
+   *   Configurations to export.
    */
-  public function importConfigs(array $files);
+  public function exportConfigs(array $configs);
 
 }
