some small refactoring of the configuration loading