Extract ConfigLoader class

Refactoring of the long class `Config`.