Moved nonce creation and verification
Moved nonce creation and verification into their own functions which are now called when needed