Fixed UUID serialization and made it simpler.