WIP: Making progress on the dns refresh logic
DNS refresh now works as expected.
little cleanup