Refactoring existing functionality for explicit configuration directory