Refactored namespaces. Also added DomainService base class.