renamed token-key-prefix to namespace
tidied up tests