First working commit of dns functionality