Add the `createUUID` function again that were deleted in the last commit by mistake.
And also modify the if else conditional to the ternary operator conditional for clone function.