Overhaul the code to properly support UUIDs