Adding multi-domain and timeout support