"Extract module" refactoring of config code