key storage improvements