Moved the functions to classes that they belong to.
Also added a UUIDType enum-like class for determining UUID type.