Changed the way DH function recieve data

Made the master add URIs to the database