Split off ID generation.