Refactored domain and hypervisor retrieval