Refactored creation of uuids.

The $.Uuid method had a problem where if it were called in rapid
succession it wouldn’t create a unique id. This has been corrected.