more refactoring and fixes to goto-daemon and mdns-announcer