Update the service implementation and key-making to work more robustly,
and create unit tests that can verify this functionality.  Also added
various documentation and re-generated docs.