updated exception handling
fixed issue with nonce
updated javadocs and added more details to helper classes