Removed some unused code and refactored to use utility functions and types from SkyDNS