DNS discovery via TXT plus minor fixes.

As per title.