Refactoring

Signed-off-by: Levi <levi.lirvat@niji.fr>
Work on settings import and exprot. Factorize the code.

Signed-off-by: Levi <levi.lirvat@niji.fr>