Refactoring: more compact config method.
Refactoring: extracted some methods from has_random_unique_id.