Refactored dns_manager module according to DRY principle

Converted similar code to create multiple DNS records into a series of function calls. Also created web service for this module.