Refactor code and improve FQDN to zone check/mapping