Construct the service registry correctly