refactor(config): moved dsl constructor into method for testability