nonce storage abstraction, fixes #25 & fixes #24