Added keyring support to the stats model.
Fix and test the keyring controller.
Add keyring support to the repl.