Removed duplicate code to generate uuids.