Further work on ID generation