Add support for AAAA records as well as fix some bugs in various files.