Some cleanup.
More cleanup.
More cleanup.
More cleanup.
More consistent key prefix handling.
Fixed bug in _key_base() and more cleanup.
Adjusted tests to not close client before cleaning up context.