Working for A and AAAA records

Lots of error checking needs to be added. But the basics
are there.