Broke DNS-SD publishing out to own class.

Minor refactoring.