Refactoring again
Generate some ids