Rewrote `uuid` to avoid string methods to avoid platform-specific bugs