[lib] Move exceptions to another module.
[exceptions] Update imports of the exceptions.
[config] Small PEP8.
[config] Fix typo in decorator usage.