Refactor nonce submit