Cleanup and reorder magic numbers.

Update hashes in test, export uuid5 in core.