Added support for services and clients

This adds the structures needed for services in the middleware interface.