Added XID handling on NSUUID, refactor to use NSUUID