Small refactoring and better testing of UUID.
Expanded bit field testing.