added support for named encryption services.
removed out dated code.
made service authoritative about its name.
improved error handling.