CB-6440 Move config logic to its own module