Function _get_root() copied from acme.sh and is not needed here. Other cleanup as recommended by acme.sh test bot.
DNS api usage:
https://github.com/Neilpang/acme.sh/wiki/dnsapi