Implement subdomain with tests