Added nonce verification and updated test script