Use random 8 character string instead of uuids. Rearranged some code a little.