don't hardcode nameserver
Use environment vars when available and some clean-up