Added Unique ID Check and Generation