Refactored Code. Made it better. Uses UUIDs.