Unit tests for DNS and CLI

Don't merge this yet, still working on it.

Trying to get tests put together.